/* Super Roadster ($SR) — comic-book issue on a desk */
:root {
  --royal: #1a3a8f;
  --royal-deep: #0d1f5c;
  --royal-bright: #2e5bd8;
  --red: #e10600;
  --red-hot: #ff2a1f;
  --cream: #f4e8d0;
  --paper: #f7f0e0;
  --ink: #0a0a0a;
  --gutter: #0a0a0a;
  --halftone-blue: rgba(26, 58, 143, 0.18);
  --halftone-red: rgba(225, 6, 0, 0.14);
  --desk: #3d2a1a;
  --shadow: rgba(0, 0, 0, 0.45);
  --font-display: "Bangers", Impact, sans-serif;
  --font-body: "Comic Neue", "Comic Sans MS", cursive, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(46, 91, 216, 0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(225, 6, 0, 0.12), transparent 45%),
    linear-gradient(160deg, #2a1a10 0%, var(--desk) 40%, #1a1008 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* Fixed issue stamp */
.issue-stamp {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  background: var(--red);
  color: #fff;
  border: 3px solid var(--ink);
  padding: 0.35rem 0.65rem;
  transform: rotate(6deg);
  box-shadow: 3px 3px 0 var(--ink);
  pointer-events: none;
}

/* Desk + open comic */
.desk {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}
.comic-book {
  background: var(--paper);
  border: 5px solid var(--ink);
  box-shadow:
    12px 16px 0 rgba(0,0,0,0.35),
    0 0 0 8px rgba(244, 232, 208, 0.15);
  position: relative;
  /* Ben-Day / halftone dots */
  background-image:
    radial-gradient(circle, var(--halftone-blue) 1.1px, transparent 1.25px),
    radial-gradient(circle, var(--halftone-red) 1px, transparent 1.15px),
    linear-gradient(var(--paper), var(--cream));
  background-size: 10px 10px, 14px 14px, auto;
  background-position: 0 0, 5px 7px, 0 0;
}

/* Cover bar */
.cover-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(90deg, var(--royal-deep), var(--royal) 55%, var(--red));
  border-bottom: 5px solid var(--ink);
  color: #fff;
}
.cover-logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  flex-shrink: 0;
}
.cover-titles { flex: 1 1 180px; min-width: 0; }
.cover-titles .series {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  opacity: 0.9;
  font-family: var(--font-body);
  font-weight: 700;
}
.cover-titles h1 {
  margin: 0.1rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 3px 3px 0 var(--ink);
}
.cover-titles .ticker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #ffe566;
}
.cover-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cover-nav a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: #fff;
  color: var(--royal-deep);
  border: 2px solid var(--ink);
  padding: 0.3rem 0.55rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.cover-nav a:hover {
  background: #ffe566;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

/* Panels & gutters */
.panel {
  background: transparent;
  padding: 0;
}
.panel-frame {
  position: relative;
  border: 4px solid var(--gutter);
  background: #111;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.panel-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.ratio-16x9 {
  aspect-ratio: 16 / 9;
}
.splash .panel-frame {
  aspect-ratio: 16 / 9;
}
.panel-row {
  display: grid;
  gap: 12px; /* thick black gutters via page bg */
  padding: 12px;
  background: var(--gutter);
}
.two-col { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .two-col, .three-col { grid-template-columns: 1fr; }
  .issue-stamp { font-size: 0.7rem; top: 8px; right: 8px; }
}

.panel > .caption-box { margin: 0; }

/* Caption boxes */
.caption-box {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  background: #fff8dc;
  border: 3px solid var(--ink);
  padding: 0.55rem 0.7rem;
  margin-top: 0;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}

/* Sound-effect wordmarks */
.sfx, .sfx-title {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    3px 3px 0 var(--ink),
    -1px -1px 0 var(--ink),
    1px -1px 0 var(--ink),
    -1px 1px 0 var(--ink);
}
.sfx {
  position: absolute;
  top: 10%;
  left: 4%;
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 1;
  color: #ffe566;
  transform: rotate(-8deg);
  z-index: 2;
  pointer-events: none;
}
.sfx-sm {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  top: auto;
  bottom: 12%;
  left: auto;
  right: 6%;
  transform: rotate(8deg);
  color: #fff;
}
.sfx-red { color: var(--red-hot); }
.sfx-boom { color: #ffe566; }
.sfx-title {
  text-align: center;
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--red);
  margin: 0.4rem 0 0.6rem;
  padding: 0 0.5rem;
  text-shadow:
    3px 3px 0 var(--ink),
    0 0 0 var(--ink);
}

/* Splash overlays */
.splash-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.1rem 1.2rem;
  background: linear-gradient(transparent 35%, rgba(10, 20, 60, 0.85) 100%);
  z-index: 1;
}
.splash-bottom { justify-content: flex-end; }
.splash-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 4.5rem);
  color: #fff;
  margin: 0.2rem 0 0.5rem;
  letter-spacing: 0.04em;
  text-shadow: 4px 4px 0 var(--ink);
  line-height: 0.95;
}
.splash-overlay .bio {
  max-width: 52rem;
  margin: 0;
  position: relative;
  z-index: 2;
}
.splash-overlay .sfx { position: relative; left: 0; top: 0; transform: rotate(-6deg); margin: 0 0 0.2rem; }

/* Token / CA card */
.panel-info {
  background: var(--paper);
  border: 4px solid var(--ink);
  padding: 0.85rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-image:
    radial-gradient(circle, var(--halftone-blue) 1px, transparent 1.15px);
  background-size: 12px 12px;
}
.ca-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.75rem;
  align-items: center;
  background: #fff;
  border: 3px solid var(--ink);
  padding: 0.75rem 0.9rem;
  cursor: not-allowed;
  box-shadow: 3px 3px 0 var(--ink);
}
.ca-card[aria-disabled="false"] { cursor: pointer; }
.ca-card[aria-disabled="false"]:hover { background: #fff8dc; }
.ca-label {
  font-family: var(--font-display);
  background: var(--royal);
  color: #fff;
  border: 2px solid var(--ink);
  padding: 0.15rem 0.45rem;
  font-size: 0.95rem;
}
.ca-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  word-break: break-all;
  font-weight: 700;
}
.ca-hint {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--royal);
  font-weight: 700;
}
.toast {
  display: none;
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.2rem;
}
.toast.show { display: block; }

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.btn {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 3px solid var(--ink);
  padding: 0.45rem 0.8rem;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-block;
}
.btn-buy { background: var(--red); color: #fff; }
.btn-chart { background: var(--royal); color: #fff; }
.btn-gmgn { background: #ffe566; color: var(--ink); }
.btn:not(.is-disabled):hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.25);
}

/* How to buy */
.howto {
  padding: 0.5rem 0 0;
  background: var(--gutter);
}
.howto .sfx-title {
  background: var(--paper);
  margin: 0;
  padding: 0.75rem 0.5rem 0.25rem;
  border-bottom: 0;
}
.howto .panel-row { margin: 0; }
.step {
  background: #fff;
  border: 4px solid var(--ink);
  padding: 1rem;
  text-align: center;
}
.step-num {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--ink);
  margin-bottom: 0.4rem;
}
.step h3 {
  font-family: var(--font-display);
  margin: 0.2rem 0 0.4rem;
  font-size: 1.45rem;
  color: var(--royal-deep);
}
.step p { margin: 0; font-weight: 700; font-size: 0.95rem; }

/* Gallery */
.gallery { background: var(--gutter); }
.gallery > .sfx-title {
  background: var(--paper);
  margin: 0;
  padding: 0.75rem 0.5rem 0.25rem;
}
.gallery-banner { padding: 12px; background: var(--gutter); }
.gallery-banner .panel-frame {
  aspect-ratio: 3 / 1;
}

/* Footer */
.comic-footer {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.1rem 1.5rem;
  border-top: 5px solid var(--ink);
  background: linear-gradient(180deg, var(--royal-deep), #070f2e);
  color: #fff;
}
.comic-footer img {
  border: 2px solid var(--ink);
  background: #fff;
  flex-shrink: 0;
}
.footer-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  letter-spacing: 0.05em;
}
.disclaimer {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 1rem;
  color: #ffe566;
  border: 2px solid #ffe566;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(0,0,0,0.25);
}
.fineprint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.btn-x { background: #0a0a0a; color: #fff; }
.nav-x { background: #0a0a0a !important; color: #fff !important; }
.hero-social { margin: 0.75rem 0 0; position: relative; z-index: 2; }
.footer-social { margin: 0.5rem 0 0; }
.footer-social a {
  font-family: var(--font-display);
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid #ffe566;
  letter-spacing: 0.04em;
}
.footer-social a:hover { color: #ffe566; }
.howto-x {
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  background: var(--paper);
  border-top: 0;
}
.howto-x a { color: var(--royal-deep); font-weight: 700; }
