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

:root {
  --night: #070910;
  --panel: #10161f;
  --ink: #eaf8e0;
  --muted: #9bb4a6;
  --lime: #d4ff5a;
  --lime-deep: #8fd42a;
  --gold: #ffe066;
  --purple: #9b7dff;
  --stroke: #d4ff5a;
  --shadow: #05040c;
  --font-display: "Bagel Fat One", "Fredoka", "Comic Sans MS", cursive;
  --font-body: "Fredoka", "Segoe UI", sans-serif;
  --font-wow: "Nunito", "Fredoka", sans-serif;
  --rail: 228px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--night);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.paw-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}

.paw-stamp {
  position: absolute;
  width: var(--paw-size, 42px);
  height: var(--paw-size, 42px);
  margin: calc(var(--paw-size, 42px) / -2) 0 0 calc(var(--paw-size, 42px) / -2);
  color: var(--lime-deep);
  filter: drop-shadow(0 0 8px rgba(212, 255, 90, 0.65));
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--rot, 0deg)) scale(0.4);
  animation: paw-press var(--paw-life, 1.4s) ease-out forwards;
}

.paw-stamp.is-walk { color: rgba(255, 224, 102, 0.85); animation-name: paw-walk-fade; }
.paw-stamp svg { width: 100%; height: 100%; display: block; }

@keyframes paw-press {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.35); }
  16% { opacity: 0.95; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1.1); }
  42% { opacity: 0.82; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(calc(var(--rot) + 8deg)) scale(0.88); }
}

@keyframes paw-walk-fade {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.5); }
  14% { opacity: 0.7; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.92); }
}

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* Rail */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.2rem 1.1rem 1.4rem;
  background: rgba(7, 9, 16, 0.92);
  border-right: 2px solid rgba(212, 255, 90, 0.35);
  backdrop-filter: blur(16px);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--lime);
}

.rail-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  box-shadow: 0 0 16px rgba(212, 255, 90, 0.4);
}

.rail-brand b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.05;
}

.rail-brand small {
  font-family: var(--font-wow);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.55rem 0.2rem;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(212, 255, 90, 0.12);
}

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

.rail-nav i {
  font-style: normal;
  font-family: var(--font-wow);
  font-size: 0.72rem;
  color: var(--gold);
}

.rail-foot {
  margin-top: auto;
  display: grid;
  gap: 0.55rem;
}

.rail-foot a:not(.btn) {
  font-family: var(--font-wow);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--gold);
}

.rail-buy { width: 100%; font-size: 0.82rem; padding: 0.75rem 0.6rem; }

.rail-toggle {
  display: none;
  position: fixed;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 120;
  width: 46px;
  height: 46px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  background: rgba(7, 9, 16, 0.82);
  border: 2px solid var(--stroke);
  border-radius: 14px;
  cursor: pointer;
}

.rail-toggle span {
  display: block;
  height: 3px;
  background: var(--lime);
  border-radius: 99px;
}

.stage { margin-left: var(--rail); }

/* Opening artwork */
.opening {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: #05070d;
}

.opening-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% center;
}

.opening-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 16, 0.18) 0%, transparent 38%),
    linear-gradient(180deg, transparent 42%, rgba(7, 9, 16, 0.88) 100%);
  pointer-events: none;
}

.opening-card {
  position: absolute;
  right: 5%;
  bottom: 7%;
  z-index: 2;
  width: min(420px, 86%);
}

.kicker {
  font-family: var(--font-wow);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.opening-card h1 {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  line-height: 0.88;
  color: var(--lime);
  -webkit-text-stroke: 4px #ffe566;
  paint-order: stroke fill;
  text-shadow: 0 0 28px rgba(255, 224, 102, 0.55), 5px 6px 0 #1a0a2e;
}

.opening-ticker {
  margin: 0.7rem 0 0.55rem;
  font-family: var(--font-wow);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--lime);
}

.opening-note {
  max-width: 22em;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  border: 3px solid var(--stroke);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #1a0a2e;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #1a0a2e, 0 0 18px rgba(212, 255, 90, 0.35);
}

.btn-primary {
  background: linear-gradient(180deg, #d4ff5a, var(--lime-deep));
  color: var(--shadow);
}

.btn-ghost {
  background: rgba(16, 22, 31, 0.78);
  color: var(--ink);
}

.btn-copy {
  background: var(--lime);
  color: var(--shadow);
  flex-shrink: 0;
}

.btn-copy.copied { filter: brightness(1.08); }

.ticker {
  overflow: hidden;
  background: linear-gradient(90deg, var(--lime), #7dff9a 50%, var(--purple));
  color: var(--shadow);
  border-block: 2px solid var(--stroke);
}

.ticker-track {
  display: flex;
  gap: 1.6rem;
  width: max-content;
  padding: 0.7rem 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  animation: slide 22s linear infinite;
}

/* Chapters */
main { background: var(--night); }

.chapter {
  width: min(980px, calc(100% - 8vw));
  margin: 0 auto;
  padding: 5.2rem 0 1.5rem;
  scroll-margin-top: 1.2rem;
}

.chapter.shout,
.chapter.look {
  width: min(1160px, calc(100% - 6vw));
}

.chapter-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem 1.4rem;
  align-items: end;
  margin-bottom: 1.4rem;
}

.chapter-head span {
  font-family: var(--font-wow);
  font-size: 1rem;
  color: var(--gold);
  padding-bottom: 0.35rem;
}

.chapter-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 0.92;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(212, 255, 90, 0.28);
}

.chapter-lead {
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 1.6rem;
}

.lore-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.lore-copy p {
  color: var(--muted);
  margin-bottom: 0.85rem;
  max-width: 34em;
}

.lore-copy strong { color: var(--lime); }

.lore-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin-top: 1.1rem;
}

.lore-tags li {
  padding: 0.28rem 0.7rem;
  border: 2px solid var(--stroke);
  border-radius: 999px;
  font-family: var(--font-wow);
  font-size: 0.82rem;
  color: var(--gold);
}

.lore-stamp {
  margin: 0;
  position: relative;
}

.lore-stamp img {
  width: 100%;
  border-radius: 28px;
  border: 3px solid var(--stroke);
  box-shadow: 10px 10px 0 #1a0a2e, 0 0 32px rgba(212, 255, 90, 0.22);
  object-fit: cover;
  object-position: center 40%;
}

.lore-stamp figcaption {
  position: absolute;
  left: -6px;
  bottom: 18px;
  padding: 0.35rem 0.75rem;
  background: var(--purple);
  color: #fff;
  border: 2px solid var(--stroke);
  border-radius: 999px;
  font-family: var(--font-wow);
  transform: rotate(-8deg);
}

/* Broadcast / tweets */
.broadcast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.embed-stage {
  min-width: 0;
  background: var(--panel);
  border: 3px solid var(--stroke);
  border-radius: 24px;
  padding: 0.85rem;
  box-shadow: 7px 7px 0 #1a0a2e, 0 0 24px rgba(155, 125, 255, 0.16);
}

.embed-stage-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--font-wow);
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.embed-stage-bar a { color: var(--muted); text-decoration: none; }

.social-card {
  background: #15202b;
  color: #e7e9ea;
  padding: 1rem;
  border-radius: 16px;
}

.social-card header { display: grid; margin-bottom: 0.55rem; }
.social-card header span { color: #8b98a5; font-size: 0.85rem; }
.social-card p { font-weight: 600; margin-bottom: 0.75rem; }
.social-card a {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--lime);
  text-decoration: none;
}

.embed-frame {
  display: flex;
  justify-content: center;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  background: #15202b;
  border-radius: 16px;
}

.embed-stage.is-embedded .social-card { display: none; }
.embed-stage.is-embedded .embed-frame {
  height: auto;
  overflow: visible;
  visibility: visible;
}

.tweet-embed twitter-widget,
.tweet-embed iframe {
  width: 100% !important;
  max-width: 100% !important;
}

blockquote.twitter-tweet { display: none; }

/* Prints — toad + pistachio art */
.prints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.print {
  margin: 0;
  background: var(--panel);
  padding: 0.65rem 0.65rem 1.15rem;
  border: 3px solid var(--stroke);
  border-radius: 20px;
  box-shadow: 8px 8px 0 #1a0a2e;
}

.print img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

.print-wide {
  grid-column: 1 / -1;
}

.print-wide img { aspect-ratio: 16 / 9; }

.print-mid {
  grid-column: 1 / -1;
}

.print-mid img { aspect-ratio: 4 / 3; }

.print figcaption {
  margin-top: 0.65rem;
  font-family: var(--font-wow);
  color: var(--gold);
  letter-spacing: 0.04em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.stats article {
  padding: 1.15rem 1rem;
  background: var(--panel);
  border: 3px solid var(--stroke);
  border-radius: 20px;
  box-shadow: 5px 5px 0 #1a0a2e;
}

.stats article:first-child {
  background: linear-gradient(180deg, #d4ff5a, var(--lime-deep));
  color: var(--shadow);
}

.stats article:first-child b,
.stats article:first-child h3 { color: var(--shadow); }
.stats article:first-child p { color: #2f3f28; }

.stats b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--lime);
}

.stats h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0.4rem 0 0.25rem;
}

.stats p { color: var(--muted); font-size: 0.92rem; }

.ca-wrap { max-width: 860px; scroll-margin-top: 1.4rem; }

.ca-kicker {
  font-family: var(--font-wow);
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.ca-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1rem 1rem 1.15rem;
  background: #05040c;
  border: 3px solid var(--lime);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--lime);
}

.ca-address {
  flex: 1;
  font-family: var(--font-wow);
  font-weight: 800;
  word-break: break-all;
  color: var(--lime);
}

.ca-address.is-tba {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.12em;
  text-align: center;
}

.copy-toast {
  min-height: 1.4rem;
  margin-top: 0.55rem;
  font-family: var(--font-wow);
  color: var(--gold);
  opacity: 0;
}

.copy-toast.show { opacity: 1; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.steps li {
  padding: 1.1rem 1rem;
  background: var(--panel);
  border: 3px solid var(--stroke);
  border-radius: 20px;
}

.steps b {
  font-family: var(--font-display);
  color: var(--gold);
}

.steps h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0.3rem 0;
}

.steps p { color: var(--muted); font-size: 0.92rem; }

.footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem 1rem;
  align-items: center;
  margin-top: 3rem;
  padding: 1.6rem 6vw 2rem;
  border-top: 3px solid var(--stroke);
  background: #05040c;
}

.footer img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 50%;
  border: 2px solid var(--lime);
}

.footer strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--lime);
}

.footer span,
.footer p { color: #c8e8b0; font-size: 0.88rem; }

.footer p { grid-column: 1 / -1; max-width: 48em; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .paw-stamp { animation: none; }
  .paw-layer { display: none; }
}

@media (max-width: 1080px) {
  .rail-toggle { display: flex; }
  .rail {
    transform: translateX(-110%);
    transition: transform 0.22s ease;
  }
  .rail.is-open { transform: translateX(0); }
  .stage { margin-left: 0; }
  .opening { height: 100svh; }
  .opening-card { right: 5%; left: 5%; width: auto; bottom: 6%; }
  .lore-body,
  .stats,
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .broadcast,
  .prints { grid-template-columns: 1fr; }
  .print-wide,
  .print-mid { grid-column: auto; }
}

@media (max-width: 680px) {
  .chapter-head,
  .lore-body,
  .stats,
  .steps,
  .footer { grid-template-columns: 1fr; }
  .opening-card h1 { -webkit-text-stroke-width: 3px; }
}
