:root {
  --sky: #1873d9;
  --skydeep: #0c48c0;
  --skylight: #8ec4f4;
  --grass: #3a9a1c;
  --grassdark: #246612;
  --lips: #f2a3b3;
  --lipsdeep: #b36a6a;
  --tabby: #e07a2a;
  --paper: #f3edd8;
  --xpblue: #0a246a;
  --xpblue2: #3a6ea5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "VT323", monospace;
  font-size: 22px;
  color: #1c2410;
  background: linear-gradient(180deg, var(--skydeep) 0%, var(--sky) 30%, var(--skylight) 62%, #d4ecfa 68%, var(--grass) 68.5%, var(--grassdark) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
img, canvas { max-width: 100%; height: auto; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 14px 60px; }

.marquee {
  background: #0c48c0;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid #fff;
  box-shadow: 0 3px 0 var(--tabby);
}
.marquee span {
  display: inline-block;
  padding: 8px 0;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  animation: slide 22s linear infinite;
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero { text-align: center; padding: 34px 0 10px; }
.hero img {
  width: min(340px, 76vw);
  height: auto;
  border: 5px solid #fff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .35);
}
.hero h1 {
  font-family: "Press Start 2P", monospace;
  color: #fff;
  font-size: clamp(34px, 8vw, 64px);
  margin: 22px 0 10px;
  text-shadow: 6px 6px 0 var(--skydeep), -3px -3px 0 var(--tabby);
}
.hero .tag {
  font-family: "Press Start 2P", monospace;
  color: var(--lips);
  font-size: clamp(13px, 3.4vw, 20px);
  text-shadow: 3px 3px 0 var(--skydeep);
}
.hero .cta { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.win {
  background: var(--paper);
  border: 2px solid #003;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  margin: 34px 0;
}
.win .bar {
  background: linear-gradient(180deg, #4d8fd4, var(--xpblue));
  color: #fff;
  padding: 7px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--tabby);
}
.win .bar .x {
  background: #c75050;
  border: 2px outset #e8a0a0;
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
}
.win .body { padding: 20px 22px; }

.btn {
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  padding: 13px 18px;
  border: 3px outset #d8d4c4;
  background: var(--paper);
  cursor: pointer;
  color: #1c2410;
  text-decoration: none;
  display: inline-block;
}
.btn:active { border-style: inset; }
.btn.pink { background: var(--lips); border-color: #f8cdd6; }
.btn.green { background: #7ddc5a; border-color: #b8f0a4; }
.btn.orange { background: var(--tabby); border-color: #f3b57a; color: #fff; }

.ticket { font-size: 24px; line-height: 1.55; }
.ticket .lbl { color: #7a2020; font-weight: bold; }

.nomics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; text-align: center; }
.nomics .cell { border: 2px inset #cfc9b4; padding: 16px 8px; }
.nomics .big { font-family: "Press Start 2P", monospace; font-size: 16px; margin-top: 8px; }

.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gal img {
  width: 100%;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .3);
  display: block;
  cursor: pointer;
  transition: transform .08s;
}
.gal img:hover { transform: translate(-2px, -2px); }
.gal.collapsed img:nth-child(n+9) { display: none; }
.gal-toggle { margin-top: 16px; text-align: center; }
.gal-hint { font-size: 19px; color: #666; margin-top: 10px; text-align: center; }

#pfp-canvas {
  width: min(420px, 88vw);
  height: auto;
  border: 5px solid #fff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .35);
  background: #9cf;
  touch-action: manipulation;
}
.gen-wrap { text-align: center; }
.gen-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 8px; }
.gen-controls .btn { font-size: 11px; padding: 11px 13px; }
.slot-label { display: block; font-size: 18px; margin-top: 2px; color: #555; }

.steps li { margin: 10px 0 10px 22px; font-size: 23px; }
.ca-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.ca-box code {
  background: #fff;
  border: 2px inset #cfc9b4;
  padding: 12px 16px;
  font-family: "VT323", monospace;
  font-size: 24px;
  letter-spacing: 1px;
}
.src-note { font-size: 20px; color: #555; margin-top: 12px; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.chip {
  background: rgba(12, 72, 192, .55);
  border: 2px solid rgba(255, 255, 255, .35);
  color: #fff;
  padding: 8px 14px;
  font-size: 19px;
}

.artist-flex { display: flex; gap: 18px; align-items: center; }
.artist-art { width: 180px; flex: 0 0 auto; border: 3px solid #fff; box-shadow: 4px 4px 0 rgba(0, 0, 0, .3); cursor: pointer; }
@media (max-width: 640px) {
  .artist-flex { flex-direction: column; }
  .artist-art { width: 70%; }
}

.acro-strip { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 26px; }
.acro .pix { color: var(--tabby); font-size: 24px; margin-right: 2px; }

.theatre-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; grid-template-columns: none; }
.theatre-row img { flex: 0 0 auto; width: 300px; }

.poll-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.poll-btn { font-size: 10px; padding: 9px 11px; }
.poll-label { flex: 1 1 240px; font-size: 21px; }
.poll-bar { flex: 1 1 140px; height: 18px; border: 2px inset #cfc9b4; background: #fff; min-width: 110px; }
.poll-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--lips), var(--tabby)); transition: width .6s; }
.poll-pct { width: 52px; text-align: right; font-family: "Press Start 2P", monospace; font-size: 11px; }

.gorf-pop {
  position: fixed;
  font-family: "Press Start 2P", monospace;
  color: var(--lips);
  text-shadow: 2px 2px 0 #01207e;
  pointer-events: none;
  z-index: 60;
  animation: pop 1.1s ease-out forwards;
}
@keyframes pop {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-90px) scale(1.5); }
}

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 20, 60, .88);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}
#lightbox.open { display: flex; }
#lb-img {
  max-width: min(640px, 92vw);
  max-height: 64vh;
  width: auto;
  border: 5px solid #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
#lb-hint { color: #cfe0ff; font-size: 19px; text-align: center; }

footer {
  text-align: center;
  color: #eaf6df;
  padding: 30px 16px 46px;
  font-size: 19px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .5);
}
footer .socials { margin-bottom: 14px; }
footer a { color: #fff; }

#sugg-input {
  flex: 1;
  min-width: 200px;
  font-family: "VT323", monospace;
  font-size: 22px;
  padding: 12px;
  border: 2px inset #cfc9b4;
  background: #fff;
}

.live-pill {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  padding: 4px 8px;
  border: 2px outset #e8a0a0;
  background: #c75050;
  color: #fff;
}
.live-pill.ok {
  background: #7ddc5a;
  border-color: #b8f0a4;
  color: #123;
}
.live-pill.wait { background: #c75050; }

.deltas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
}
.deltas span {
  border: 2px inset #cfc9b4;
  background: #fff;
  padding: 8px 10px;
}
.deltas span.up { color: #1a7a2a; }
.deltas span.down { color: #7a2020; }

.live-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.flash { animation: flash .35s ease; }
@keyframes flash {
  from { background: #fff3b0; }
  to { background: transparent; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(16px);
  background: var(--paper);
  border: 3px outset #d8d4c4;
  padding: 10px 16px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
