:root {
  color-scheme: dark;
  --bg: #060c18;
  --panel: #07101f;
  --panel-line: #1d4ed8;
  --text: #ffffff;
  --muted: #4a7099;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #2563eb;
  --font-display: "Creato Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Creato Display";
  src: url("assets/fonts/CreatoDisplay-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Creato Display";
  src: url("assets/fonts/CreatoDisplay-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Creato Display";
  src: url("assets/fonts/CreatoDisplay-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Creato Display";
  src: url("assets/fonts/CreatoDisplay-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Press Start 2P";
  src: url("assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background: #040912;
  color: var(--text);
  font-family: var(--font-display);
  text-rendering: geometricPrecision;
}

.game-shell {
  container-type: size;
  position: relative;
  width: min(100vw, calc(100vh * 0.693548));
  height: min(100vh, calc(100vw * 1.442));
  max-width: 645px;
  max-height: 930px;
  overflow: hidden;
  background: var(--bg);
  border: 4px solid #1a3a6e;
  box-shadow: 0 0 0 4px #010408, 0 24px 0 rgba(0, 0, 0, 0.32);
  user-select: none;
  touch-action: manipulation;
  image-rendering: pixelated;
}

canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.hud,
.ticker,
.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hud,
.ticker {
  display: none !important;
}

.brand {
  position: absolute;
  top: 2%;
  left: 3%;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  color: #f4fbff;
  font-size: clamp(0.72rem, 2vw, 0.94rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #03101a;
}

.brand span:last-child {
  display: grid;
  line-height: 1;
}

.brand em {
  color: var(--green);
  font-style: normal;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: clamp(1.35rem, 4vw, 1.9rem);
  height: clamp(1.35rem, 4vw, 1.9rem);
  font-size: clamp(1.45rem, 4.5vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.brand-mark::before {
  color: #f4fbff;
  content: "";
  border-right: 0.18em solid transparent;
  border-bottom: 0.92em solid #f4fbff;
  border-left: 0.18em solid transparent;
  filter: drop-shadow(-0.32em 0.28em 0 #f4fbff);
  transform: translateY(-0.02em) skew(-4deg);
}

.brand-mark::after {
  position: absolute;
  width: 0.56em;
  height: 0.14em;
  margin-top: 0.72em;
  margin-left: 0.1em;
  background: #f4fbff;
  content: "";
  transform: rotate(57deg);
}

.stats-panel,
.best-panel {
  position: absolute;
  border: 3px solid var(--blue);
  border-radius: 0;
  background: var(--panel);
  box-shadow: 5px 5px 0 #010408;
}

.stats-panel {
  top: 7%;
  left: 2.6%;
  display: grid;
  width: min(14.3%, 92px);
  min-width: 76px;
  padding: 0.65rem 0.62rem;
  gap: 0.2rem;
}

.stats-panel span,
.best-panel span {
  color: var(--muted);
  font-size: clamp(0.58rem, 1.6vw, 0.72rem);
  text-transform: uppercase;
}

.stats-panel strong,
.best-panel strong {
  font-size: clamp(0.95rem, 2.7vw, 1.22rem);
}

#scoreText {
  color: var(--green);
}

.center-score {
  position: absolute;
  top: 9.1%;
  left: 50%;
  width: 42%;
  transform: translateX(-50%);
  color: #fbfdff;
  font-size: clamp(1.7rem, 6vw, 2.55rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 4px 4px 0 #010408;
}

.best-panel {
  top: 2%;
  right: 17%;
  display: grid;
  width: min(13.6%, 88px);
  min-width: 78px;
  padding: 0.56rem 0.7rem;
}

.icon-button,
.primary-button {
  border: 1px solid rgba(94, 157, 206, 0.48);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.icon-button {
  position: absolute;
  top: 2%;
  right: 2.8%;
  display: grid;
  place-items: center;
  width: clamp(2.45rem, 6vw, 3.25rem);
  aspect-ratio: 1;
  border: 3px solid var(--blue);
  border-radius: 0;
  background: var(--panel);
  box-shadow: 5px 5px 0 #010408;
  font-weight: 900;
}

.icon-button:focus-visible,
.primary-button:focus-visible {
  outline: 3px solid rgba(255, 157, 55, 0.75);
  outline-offset: 3px;
}

.ticker {
  top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 6%;
  padding: 0 4% 1%;
  border-top: 0;
  color: #4a7099;
  font-size: clamp(0.48rem, 1.1vw, 0.62rem);
  letter-spacing: 0.3em;
  line-height: 1;
  text-shadow: 2px 2px 0 #02070c;
  text-transform: uppercase;
}

.overlay {
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(2, 4, 8, 0.2) 35%, rgba(2, 4, 8, 0.66)),
    rgba(2, 4, 8, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 160ms ease;
  z-index: 5;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay [hidden] {
  display: none !important;
}

.overlay-panel {
  width: min(86%, 370px);
  padding: 1.35rem;
  border: 1px solid rgba(95, 159, 207, 0.42);
  border: 4px solid var(--blue);
  border-radius: 0;
  background: rgba(7, 16, 31, 0.96);
  box-shadow: 8px 8px 0 #010408;
  text-align: center;
}

.kicker {
  margin: 0 0 0.45rem;
  color: var(--green);
  font-size: 0.76rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(2.15rem, 9vw, 4rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 #17283a;
}

.copy {
  margin: 0.95rem auto 1.25rem;
  max-width: 28ch;
  color: #b6ccda;
  font-size: 0.95rem;
  line-height: 1.5;
}

.primary-button {
  min-width: 12.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border: 4px solid #0b431d;
  border-radius: 0;
  background: #43ff72;
  color: #02110a;
  box-shadow: 5px 5px 0 #06190c;
  font-weight: 900;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.pixel-panel {
  position: relative;
  width: min(62%, 300px);
  border: 2px solid #1a3a6e;
  border-radius: 0;
  background: rgba(4, 9, 18, 0.96);
  box-shadow:
    4px 4px 0 #010408,
    inset 0 0 0 1px #2563eb,
    0 0 0 2px rgba(37, 99, 235, 0.18),
    0 0 22px rgba(37, 99, 235, 0.28);
  color: var(--text);
  pointer-events: auto;
  animation: panel-pop 180ms steps(3, end), panel-glow 1.6s steps(2, end) infinite;
}

.pixel-panel::before,
.reward-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #1a3a6e;
  content: "";
}

.pixel-panel::after,
.reward-card::after {
  position: absolute;
  inset: 8px;
  border-top: 1px solid rgba(127, 183, 255, 0.26);
  border-bottom: 1px solid rgba(74, 222, 128, 0.15);
  content: "";
  pointer-events: none;
}

.panel-top {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 1.15rem;
  margin: 0 0 0.55rem;
  color: #7fb7ff;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #010408;
}

.panel-top img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.panel-dot {
  width: 0.55rem;
  height: 0.55rem;
  background: #4ade80;
  box-shadow: 2px 2px 0 #010408;
  animation: signal-blink 0.85s steps(2, end) infinite;
}

.email-panel {
  padding: 0.7rem 0.78rem 0.82rem;
}

.email-panel h1,
.reward-card h2 {
  margin: 0 0 0.28rem;
  color: #f4fbff;
  font-size: clamp(0.9rem, 3vw, 1.08rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 #010408;
  text-transform: uppercase;
}

.email-panel h1 {
  color: #ffffff;
  text-shadow: 2px 2px 0 #010408, 0 0 12px rgba(127, 183, 255, 0.62);
}

.panel-copy {
  margin: 0 0 0.65rem;
  color: #7fb7ff;
  font-size: 0.62rem;
  font-weight: 700;
  text-shadow: 2px 2px 0 #010408;
}

.email-form {
  display: grid;
  gap: 0.45rem;
}

.email-form input {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.34rem 0.48rem;
  border: 2px solid #1a3a6e;
  border-radius: 0;
  background: #07101f;
  color: #f4fbff;
  font: 900 clamp(0.7rem, 2.7vw, 0.86rem) var(--font-display);
  outline: none;
  box-shadow: inset 3px 3px 0 #010408;
}

.email-form input::placeholder {
  color: #4a7099;
}

.email-form input:focus {
  border-color: #7fb7ff;
  box-shadow: inset 3px 3px 0 #010408, 0 0 0 2px rgba(37, 99, 235, 0.34), 0 0 16px rgba(37, 99, 235, 0.34);
}

.form-error {
  min-height: 0.65rem;
  margin: -0.28rem 0 0;
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: left;
}

.pixel-button {
  position: relative;
  width: 100%;
  min-height: 2.25rem;
  border: 3px solid #7f1d1d;
  border-radius: 0;
  background: #ef4444;
  color: #fff;
  box-shadow: inset 0 0 0 3px #fb7185, 4px 4px 0 #010408;
  cursor: pointer;
  font: 900 clamp(0.74rem, 2.8vw, 0.92rem) var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #7f1d1d;
  pointer-events: auto;
  transition: transform 80ms steps(2, end), filter 120ms steps(2, end);
  animation: button-idle 1.25s steps(2, end) infinite;
}

.pixel-button::after {
  position: absolute;
  top: 6px;
  right: 8px;
  left: 8px;
  height: 3px;
  background: rgba(255, 255, 255, 0.34);
  content: "";
  pointer-events: none;
}

.pixel-button:hover {
  filter: brightness(1.12);
}

.pixel-button--blue {
  border-color: #0f2f8f;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #60a5fa, 4px 4px 0 #010408, 0 0 16px rgba(37, 99, 235, 0.42);
  text-shadow: 2px 2px 0 #12347f;
}

.pixel-button--green {
  border-color: #064e3b;
  background: #22c55e;
  color: #02110a;
  box-shadow: inset 0 0 0 3px #86efac, 4px 4px 0 #010408, 0 0 16px rgba(34, 197, 94, 0.38);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.28);
}

.pixel-button--amber {
  border-color: #78350f;
  background: #f59e0b;
  color: #07101f;
  box-shadow: inset 0 0 0 3px #fcd34d, 4px 4px 0 #010408, 0 0 16px rgba(245, 158, 11, 0.42);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.24);
}

.send-code-button {
  position: relative;
  overflow: hidden;
}

.send-code-button::before {
  display: none;
}

.send-code-button.is-loading::before {
  display: none;
}

.send-code-button.is-loading,
.send-code-button.is-sent {
  color: #ffffff;
  text-shadow: 2px 2px 0 #12347f;
}

.send-code-button.is-sent,
.send-code-button.is-sent:disabled {
  border-color: #0f2f8f;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #60a5fa, 4px 4px 0 #010408;
  opacity: 1;
}

.send-code-button.is-sent::before {
  display: none;
}

.pixel-button:active {
  transform: translateY(3px);
  box-shadow: 3px 3px 0 #010408;
}

.pixel-button:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.send-code-button.is-loading:disabled {
  background: linear-gradient(180deg, #d99218, #a56a0c);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.16), 0 4px 0 rgba(0, 0, 0, 0.2);
  opacity: 0.6;
}

.send-code-button.is-sent:disabled {
  opacity: 1;
}

.link-button {
  display: block;
  margin: 0.65rem auto 0;
  padding: 0.12rem 0;
  border: 0;
  border-bottom: 2px solid #7fb7ff;
  background: transparent;
  color: #7fb7ff;
  cursor: pointer;
  font: 900 0.8rem var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #010408;
}

.end-stack {
  display: grid;
  width: min(64%, 310px);
  gap: 0.42rem;
  pointer-events: auto;
}

.leaderboard-panel {
  width: 100%;
  padding: 0.7rem 0.78rem 0.82rem;
}

.leaderboard-list {
  display: grid;
  gap: 0.32rem;
  margin: 0 0 0.7rem;
  padding: 0;
  list-style: none;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.45rem;
  padding: 0.12rem 0.28rem;
  border: 1px solid transparent;
  color: #d1e0f5;
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  font-weight: 900;
  text-shadow: 2px 2px 0 #010408;
}

.leaderboard-list li.is-you {
  border-color: #2563eb;
  border-radius: 0;
  background: rgba(37, 99, 235, 0.24);
  color: #4ade80;
  box-shadow: inset 3px 0 0 #4ade80, 0 0 14px rgba(74, 222, 128, 0.22);
  animation: you-pulse 1.1s steps(2, end) infinite;
}

.leaderboard-list .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list .score-wrap {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  white-space: nowrap;
}

.leaderboard-list .score-label {
  color: #7fb7ff;
  font-size: 0.86em;
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 2px 2px 0 #010408;
}

.leaderboard-list .score {
  justify-self: end;
}

.leaderboard-list::after {
  display: block;
  height: 3px;
  margin-top: 0.25rem;
  background: #1a3a6e;
  content: "";
}

.reward-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem 0.65rem;
  width: min(100%, 310px);
  margin: 0 auto;
  padding: 0.7rem 0.78rem 0.82rem;
  border: 2px solid var(--blue);
  border-radius: 0;
  background: rgba(7, 16, 31, 0.98);
  box-shadow: 5px 5px 0 #010408, inset 0 0 0 1px #1a3a6e, 0 0 22px rgba(245, 158, 11, 0.26);
  color: var(--text);
  pointer-events: auto;
  animation: reward-bump 1s steps(2, end) infinite;
}

.gift-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.35rem;
  aspect-ratio: 1;
  border: 2px solid #1a3a6e;
  border-radius: 0;
  background: #040912;
  box-shadow: 5px 5px 0 #010408, 0 0 16px rgba(245, 158, 11, 0.36);
  animation: gift-pop 0.9s steps(2, end) infinite;
}

.gift-icon img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  image-rendering: pixelated;
}

.reward-card h2 {
  align-self: center;
  margin: 0;
}

.reward-tease {
  grid-column: 2;
  margin: -0.1rem 0 0;
  color: #f59e0b;
  font-size: clamp(0.58rem, 2.1vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #010408;
}

.reward-card .pixel-button {
  grid-column: 1 / -1;
}

.reward-panel {
  width: min(64%, 310px);
  padding: 0.72rem 0.8rem 0.86rem;
}

.reward-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0 0.58rem;
  border-bottom: 2px solid #1a3a6e;
  color: #d1e0f5;
  font-size: clamp(0.74rem, 2.6vw, 0.92rem);
  font-weight: 900;
  text-shadow: 2px 2px 0 #010408;
}

.reward-code {
  margin: 0.62rem 0 0.72rem;
  padding: 0.55rem;
  border: 2px solid #1a3a6e;
  border-radius: 0;
  background: #07101f;
  color: #f59e0b;
  font-size: clamp(0.66rem, 2.5vw, 0.82rem);
  font-weight: 900;
  text-align: center;
  box-shadow: inset 3px 3px 0 #010408, 0 0 14px rgba(245, 158, 11, 0.2);
  animation: code-glow 1.25s steps(2, end) infinite;
}

@keyframes panel-pop {
  from {
    transform: translateY(8px) scale(0.98);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-glow {
  50% {
    box-shadow:
      4px 4px 0 #010408,
      inset 0 0 0 1px #60a5fa,
      0 0 0 2px rgba(96, 165, 250, 0.26),
      0 0 26px rgba(37, 99, 235, 0.42);
  }
}

@keyframes signal-blink {
  50% {
    background: #f59e0b;
  }
}

@keyframes button-idle {
  50% {
    transform: translateY(-1px);
  }
}

@keyframes you-pulse {
  50% {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.38);
  }
}

@keyframes reward-bump {
  50% {
    border-color: #f59e0b;
  }
}

@keyframes gift-pop {
  50% {
    transform: translateY(-2px);
  }
}

@keyframes code-glow {
  50% {
    border-color: #f59e0b;
  }
}

/* Clean popup UI */
.overlay {
  background: rgba(2, 5, 12, 0.64);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.pixel-panel,
.reward-card {
  border: 0;
  background: rgba(5, 12, 24, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(127, 183, 255, 0.12);
  animation: panel-pop 180ms steps(3, end);
}

.pixel-panel::before,
.pixel-panel::after,
.reward-card::before,
.reward-card::after,
.pixel-button::after {
  display: none;
}

.panel-top {
  margin-bottom: 0.66rem;
  color: #80b8ff;
  letter-spacing: 0.18em;
}

.panel-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: #4ade80;
  box-shadow: none;
  animation: none;
}

.email-panel h1,
.reward-card h2 {
  color: #f6fbff;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.66);
}

.panel-copy,
.reward-tease {
  color: #9dc8ff;
}

.email-form input,
.reward-code {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -2px 0 rgba(127, 183, 255, 0.22);
}

.email-form input:focus {
  border-color: transparent;
  box-shadow: inset 0 -2px 0 #7fb7ff, 0 0 0 2px rgba(127, 183, 255, 0.16);
}

.pixel-button,
.pixel-button--blue,
.pixel-button--green,
.pixel-button--amber,
.send-code-button.is-sent,
.send-code-button.is-sent:disabled {
  border: 0;
  background: #2f6df6;
  color: #ffffff;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.52), inset 0 -3px 0 rgba(0, 0, 0, 0.22);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.58);
  animation: none;
}

.pixel-button--green {
  background: #33d477;
  color: #03130b;
  text-shadow: none;
}

.pixel-button--amber {
  background: #f5a20b;
  color: #07101f;
  text-shadow: none;
}

.pixel-button:hover {
  filter: brightness(1.06);
}

.leaderboard-list li {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.leaderboard-list li.is-you {
  border: 0;
  background: rgba(47, 109, 246, 0.2);
  color: #59f08e;
  box-shadow: inset 3px 0 0 #59f08e;
  animation: none;
}

.leaderboard-list::after {
  height: 1px;
  background: rgba(127, 183, 255, 0.22);
}

.reward-card {
  grid-template-columns: 2.15rem minmax(0, 1fr);
  gap: 0.4rem 0.6rem;
}

.gift-icon {
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  animation: none;
}

.reward-row {
  border-bottom: 1px solid rgba(127, 183, 255, 0.22);
}

.reward-code {
  color: #ffb020;
  animation: none;
}

.link-button {
  border-bottom-color: rgba(127, 183, 255, 0.8);
}

/* Product-style popup redesign */
.overlay {
  padding: 1.1rem;
  background:
    radial-gradient(circle at 50% 23%, rgba(47, 109, 246, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 15, 0.34), rgba(2, 6, 15, 0.82));
  backdrop-filter: blur(9px) saturate(1.08);
  -webkit-backdrop-filter: blur(9px) saturate(1.08);
}

.overlay,
.overlay button,
.overlay input {
  font-family: var(--font-display);
}

.pixel-panel,
.reward-card {
  width: min(78%, 365px);
  padding: 1.05rem;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(11, 22, 41, 0.96), rgba(5, 10, 20, 0.96)),
    rgba(5, 12, 24, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.58), 0 1px 0 rgba(255, 255, 255, 0.07) inset;
  animation: product-rise 180ms ease-out;
}

.email-panel {
  padding: 1.15rem;
}

.panel-top {
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  color: #84b9ff;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.panel-top img {
  width: 1.3rem;
  height: 1.3rem;
}

.panel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: #4ade80;
}

.email-panel h1,
.reward-card h2 {
  margin-bottom: 0.35rem;
  color: #ffffff;
  font: 850 clamp(1.45rem, 5vw, 2.05rem) / 0.98 var(--font-display);
  letter-spacing: 0;
  text-shadow: none;
  text-transform: none;
}

.panel-copy {
  max-width: 25ch;
  margin: 0 0 0.9rem;
  color: #9eb9d9;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: none;
}

.email-form {
  gap: 0.55rem;
}

.email-form input {
  min-height: 2.8rem;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: 800 clamp(0.82rem, 2.8vw, 1rem) / 1 var(--font-display);
  box-shadow: 0 0 0 1px rgba(132, 185, 255, 0.12) inset;
}

.email-form input:focus {
  box-shadow: 0 0 0 2px rgba(132, 185, 255, 0.55), 0 10px 28px rgba(47, 109, 246, 0.18);
}

.form-error {
  color: #ff9da6;
  font-size: 0.68rem;
}

.pixel-button,
.pixel-button--blue,
.pixel-button--green,
.pixel-button--amber,
.send-code-button.is-sent,
.send-code-button.is-sent:disabled {
  min-height: 2.8rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #3b82ff, #245be7);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28), 0 5px 0 rgba(0, 0, 0, 0.28);
  font: 850 clamp(0.78rem, 2.7vw, 0.95rem) var(--font-display);
  letter-spacing: 0;
  text-shadow: none;
  text-transform: none;
}

.pixel-button--green {
  background: linear-gradient(180deg, #45e486, #20b960);
  color: #021109;
  box-shadow: 0 12px 24px rgba(32, 185, 96, 0.22), 0 5px 0 rgba(0, 0, 0, 0.25);
}

.pixel-button--amber {
  background: linear-gradient(180deg, #ffbd32, #ef9700);
  color: #100b02;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.22), 0 5px 0 rgba(0, 0, 0, 0.25);
}

.pixel-button:active {
  transform: translateY(3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.pixel-button:disabled {
  opacity: 0.78;
}

.end-stack {
  width: min(82%, 390px);
  gap: 0.7rem;
}

.leaderboard-panel {
  width: 100%;
  padding: 1rem;
}

.leaderboard-list {
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.leaderboard-list li {
  min-height: 2.05rem;
  grid-template-columns: 1.35rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.32rem 0.5rem;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: #d8e7fb;
  font: 780 clamp(0.74rem, 2.5vw, 0.92rem) var(--font-display);
  text-shadow: none;
}

.leaderboard-list li.is-you {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.2), rgba(47, 109, 246, 0.16));
  color: #ffffff;
  box-shadow: none;
}

.leaderboard-list li.is-you .name {
  color: #65f09a;
}

.leaderboard-list::after {
  display: none;
}

.reward-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.12rem 0.7rem;
  width: 100%;
  margin: 0;
  padding: 0.95rem;
  background:
    radial-gradient(circle at 84% 0%, rgba(255, 184, 49, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(12, 23, 39, 0.98), rgba(7, 15, 28, 0.98));
}

.gift-icon {
  grid-row: 1 / 3;
  width: 3rem;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 184, 49, 0.12);
}

.gift-icon img {
  width: 74%;
  height: 74%;
}

.reward-card h2 {
  margin: 0;
  font-size: clamp(1rem, 3.7vw, 1.35rem);
}

.reward-tease {
  grid-column: 2;
  margin: 0;
  color: #ffbd32;
  font: 800 clamp(0.62rem, 2.2vw, 0.76rem) var(--font-display);
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

.reward-card .pixel-button {
  grid-column: 1 / -1;
  margin-top: 0.55rem;
}

.reward-panel {
  width: min(78%, 365px);
  padding: 1.05rem;
}

.reward-row {
  padding: 0.2rem 0 1rem;
  border: 0;
  color: #ffffff;
  font: 900 clamp(1.55rem, 5.8vw, 2.15rem) var(--font-display);
  line-height: 1.02;
  text-shadow: none;
}

.reward-code {
  margin: 0 0 0.8rem;
  padding: 0.8rem;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 184, 49, 0.1);
  color: #ffbd32;
  box-shadow: none;
  font: 850 clamp(0.76rem, 2.6vw, 0.94rem) var(--font-display);
}

.link-button {
  margin-top: 0.85rem;
  border-bottom: 0;
  color: #9dc8ff;
  font: 800 0.76rem var(--font-display);
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 0.22rem;
  text-transform: none;
  text-shadow: none;
}

@keyframes product-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Figma Make 1:1 overlay screens */
.figma-scene {
  display: block;
  padding: 0;
  overflow: hidden;
  background: #050a14;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: "Press Start 2P", "Courier New", monospace;
}

.figma-scene .figma-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 207%;
  height: 139%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.figma-logo {
  position: absolute;
  left: 50%;
  top: 3.66%;
  width: 6.2%;
  height: auto;
  transform: translateX(-50%);
  image-rendering: pixelated;
}

.figma-mascot {
  position: absolute;
  left: 50%;
  top: 25.22%;
  width: 30.64%;
  height: auto;
  opacity: 1;
  transform: translateX(-50%);
  image-rendering: pixelated;
}

.figma-title {
  position: absolute;
  left: 50%;
  top: 40.55%;
  width: 77.46%;
  height: 20.12%;
  transform: translateX(-50%);
  color: #fff;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 11.35cqw;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.figma-title span {
  display: block;
}

.figma-title-glow,
.figma-title-main {
  position: absolute;
  inset: 0;
}

.figma-title-glow {
  opacity: 0.2;
  filter: blur(7.7px);
  transform: translateY(3.5px);
}

.figma-title-glow span:last-child {
  color: #b147fb;
}

.figma-title-main span:last-child {
  background: linear-gradient(180deg, #1a5dfd 0%, #6e97f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.figma-subtitle {
  position: absolute;
  left: 50%;
  top: 61.25%;
  display: flex;
  justify-content: center;
  gap: 0.78rem;
  width: 65.4%;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font: 400 14px/1.49 Inter, var(--font-display);
  text-align: center;
}

.figma-subtitle strong {
  color: #fff;
  font-weight: 700;
}

.figma-email-form {
  position: absolute;
  left: 50%;
  top: 66.2%;
  display: grid;
  grid-template-columns: 1fr 19.58%;
  gap: 1.16%;
  width: 68.1%;
  height: 6.89%;
  transform: translateX(-50%);
}

.figma-email-form input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font: 400 13px/1 "Press Start 2P", "Courier New", monospace;
  letter-spacing: 0.85px;
  text-align: center;
}

.figma-email-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.figma-arrow-button {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #1a5dfd 0%, #6e97f9 100%);
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 6px 0 rgba(255, 255, 255, 0.13));
  font: 400 28.5px/1 "Press Start 2P", "Courier New", monospace;
}

.figma-arrow-button::before {
  display: none;
}

.figma-email-form .form-error {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: 100%;
  margin: 0;
  color: #fca5a5;
  font: 400 9px/1.5 "Press Start 2P", "Courier New", monospace;
  text-align: center;
}

.figma-leaderboard-scene {
  position: static;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.figma-board-label {
  position: absolute;
  left: 5.24%;
  top: 9.33%;
  width: 89.52%;
  margin: 0;
  color: rgba(209, 224, 245, 0.6);
  font: 400 7px/1.5 "Press Start 2P", "Courier New", monospace;
  letter-spacing: 2px;
  text-align: center;
}

.figma-board-list {
  position: absolute;
  left: 50%;
  top: 12.66%;
  display: grid;
  width: 89.52%;
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
  transform: translateX(-50%);
}

.figma-board-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  color: #d1e0f5;
  font-family: "Press Start 2P", "Courier New", monospace;
  text-shadow: none;
}

.figma-board-list li:first-child {
  background: rgba(84, 98, 245, 0.15);
}

.figma-board-list li.is-you {
  opacity: 0.6;
}

.figma-board-list .rank-badge {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 11.455px;
  line-height: 1;
}

.figma-board-list li[data-rank="1"] .rank-badge {
  background: #f59e0b;
}

.figma-board-list li[data-rank="2"] .rank-badge {
  background: #828282;
}

.figma-board-list li[data-rank="3"] .rank-badge {
  background: #592b1e;
}

.figma-board-list .name {
  overflow: hidden;
  color: #d1e0f5;
  font-size: 10px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.figma-board-list .score-wrap {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.figma-board-list .score-label {
  color: #7fb7ff;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #010408;
}

.figma-board-list .score {
  justify-self: end;
  color: #22c55e;
  font-size: 9.75px;
  line-height: 1.5;
  white-space: nowrap;
}

.figma-board-fade {
  position: absolute;
  left: 4.13%;
  top: 38.44%;
  width: 91.1%;
  height: 17.1%;
  background: linear-gradient(180deg, rgba(5, 10, 20, 0), #050a14);
  pointer-events: none;
}

.figma-reward-unlocked {
  position: absolute;
  left: 0.16%;
  top: 55.55%;
  display: block;
  width: 100%;
  height: 44.45%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.figma-panel-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.figma-reward-unlocked .gift-icon {
  position: absolute;
  left: 50%;
  top: 6%;
  display: grid;
  width: 12.22%;
  aspect-ratio: 77 / 77;
  place-items: center;
  border: 0;
  border-radius: 12.2px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: none;
  transform: translateX(-50%);
}

.figma-reward-unlocked .gift-icon img {
  width: 68.3%;
  height: auto;
  image-rendering: pixelated;
}

.figma-reward-unlocked h2 {
  position: absolute;
  left: 50%;
  top: 28.75%;
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  font: 400 9.9cqw/1.35 "Press Start 2P", "Courier New", monospace;
  text-align: center;
  white-space: nowrap;
}

.figma-ghost-button,
.figma-no-reward-play {
  border: 0;
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  font-family: "Press Start 2P", "Courier New", monospace;
}

.figma-reward-unlocked .figma-ghost-button {
  position: absolute;
  left: 50%;
  top: 78.25%;
  width: 93.8%;
  min-height: 62px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.1);
  font-size: 13px;
  letter-spacing: 0.85px;
}

.figma-no-reward-play {
  position: absolute;
  left: 50%;
  bottom: 4.3%;
  width: 60%;
  min-height: 62px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.1);
  font-size: 13px;
  letter-spacing: 0.85px;
}

.figma-offer-panel {
  position: absolute;
  left: 0.16%;
  top: 65.66%;
  display: block;
  width: 100%;
  height: 34.34%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.figma-offer-panel .reward-row {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 89.05%;
  height: 44%;
  padding: 0;
  transform: translateX(-50%);
}

.figma-offer-panel .reward-row strong {
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  font-family: "Press Start 2P", "Courier New", monospace;
}

.figma-offer-panel .reward-percent {
  position: absolute;
  left: 25.5%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 15.96cqw;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
}

.figma-offer-panel .reward-desc {
  position: absolute;
  left: 55.4%;
  top: 50%;
  max-width: none;
  padding: 0;
  transform: translateY(-50%);
  color: #fff;
  font-size: clamp(0.85rem, 3.65vw, 1.43rem);
  line-height: 1.35;
  white-space: normal;
}

.figma-offer-panel .reward-desc::first-line {
  line-height: 1.35;
}

.figma-offer-panel .figma-ghost-button {
  position: absolute;
  left: 50%;
  top: 61.48%;
  width: 93.8%;
  min-height: 62px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.1);
  font-size: 13px;
  letter-spacing: 0.85px;
}

.figma-offer-panel .figma-ghost-button.is-loading,
.figma-offer-panel .figma-ghost-button:disabled {
  opacity: 0.6;
}

.figma-offer-panel .link-button {
  position: absolute;
  left: 50%;
  top: 87%;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 400 10px/2.55 "Press Start 2P", "Courier New", monospace;
  letter-spacing: 0.85px;
  text-decoration: underline;
  white-space: nowrap;
}

.figma-scene [hidden] {
  display: none !important;
}

/* Simple fun reward energy */
.overlay {
  background:
    radial-gradient(circle at 50% 18%, rgba(47, 109, 246, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(2, 6, 15, 0.36), rgba(2, 6, 15, 0.84));
}

.pixel-panel,
.reward-card {
  overflow: hidden;
}

.pixel-panel::before,
.reward-card::before {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #3b82ff;
  content: "";
}

.email-panel h1 {
  max-width: none;
  font-size: clamp(1.55rem, 5.2vw, 2.1rem);
  white-space: nowrap;
}

.promo-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0 0 0.68rem;
}

.promo-strip span {
  display: grid;
  min-height: 1.55rem;
  place-items: center;
  border-radius: 999px;
  font: 800 clamp(0.58rem, 2.1vw, 0.7rem) var(--font-display);
}

.promo-strip span:first-child {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.22), rgba(47, 109, 246, 0.12));
  color: #8cffb5;
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.16);
}

.promo-strip span:last-child {
  background: linear-gradient(135deg, rgba(255, 189, 50, 0.26), rgba(239, 151, 0, 0.12));
  color: #ffd36b;
  box-shadow: inset 0 0 0 1px rgba(255, 189, 50, 0.16);
}

.pixel-button,
.pixel-button--blue,
.pixel-button--green,
.pixel-button--amber {
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.pixel-button:hover {
  transform: translateY(-1px);
}

.pixel-button--blue {
  background: linear-gradient(180deg, #4385ff, #245be7);
}

.pixel-button--green {
  background: linear-gradient(180deg, #54e58c, #20b960);
}

.pixel-button--amber {
  background: linear-gradient(180deg, #ffc04a, #f59e0b);
}

.leaderboard-list li:nth-child(1) {
  background: rgba(255, 189, 50, 0.11);
}

.leaderboard-list li:nth-child(2),
.leaderboard-list li:nth-child(3) {
  background: rgba(127, 183, 255, 0.075);
}

.reward-card {
  grid-template-columns: 3.15rem minmax(0, 1fr);
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 189, 50, 0.15), transparent 36%),
    linear-gradient(135deg, rgba(11, 25, 43, 0.98), rgba(6, 14, 27, 0.98));
}

.reward-badge {
  grid-column: 2;
  width: fit-content;
  margin-bottom: 0.05rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 189, 50, 0.12);
  color: #ffca57;
  font: 850 0.58rem var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gift-icon {
  grid-row: 1 / 3;
  width: 3.15rem;
  background: rgba(255, 189, 50, 0.11);
  transform: none;
}

.reward-card h2 {
  font-size: clamp(1.15rem, 4vw, 1.55rem);
}

.reward-panel {
  width: min(76%, 350px);
  padding: 1rem;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 189, 50, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(11, 22, 41, 0.96), rgba(5, 10, 20, 0.96));
}

.reward-panel .panel-top {
  margin-bottom: 0.95rem;
}

.reward-panel .pixel-button {
  margin-top: 0.15rem;
}

.reward-panel .link-button {
  margin-top: 0.7rem;
}

.reward-row strong {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 0.55rem;
  color: #fff4d6;
}

.reward-percent {
  font-size: clamp(3.15rem, 11vw, 4.2rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
}

.reward-desc {
  max-width: 8.8rem;
  padding-bottom: 0.12rem;
  color: #fff0c4;
  font-size: clamp(1.08rem, 3.8vw, 1.42rem);
  line-height: 0.94;
}

.link-button:hover {
  color: #ffffff;
}

/* Figma Make final overrides */
.figma-scene.overlay {
  display: block;
  padding: 0;
  background: #050a14;
}

.figma-scene .pixel-button,
.figma-scene .pixel-button--blue,
.figma-scene .pixel-button--green,
.figma-scene .pixel-button--amber,
.figma-scene .figma-ghost-button,
.figma-scene .figma-no-reward-play {
  border: 0;
  border-radius: 0;
  text-transform: none;
  text-shadow: none;
}

.figma-scene .reward-panel,
.figma-scene .reward-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.figma-scene .reward-panel::before,
.figma-scene .reward-panel::after,
.figma-scene .reward-card::before,
.figma-scene .reward-card::after {
  display: none;
}

.figma-scene .send-code-button::before,
.figma-scene .send-code-button.is-loading::before {
  display: none;
}

.figma-scene .figma-board-list li:first-child {
  background: rgba(84, 98, 245, 0.15);
}

.figma-scene .figma-board-list li:nth-child(2),
.figma-scene .figma-board-list li:nth-child(3) {
  background: rgba(255, 255, 255, 0.02);
}

.figma-scene .figma-reward-unlocked,
.figma-scene .figma-offer-panel {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #2867ff 0%, #6d93f3 100%);
  box-shadow: none;
  clip-path: polygon(
    0 7%,
    1.8% 7%,
    1.8% 3.5%,
    3.6% 3.5%,
    3.6% 0,
    96.4% 0,
    96.4% 3.5%,
    98.2% 3.5%,
    98.2% 7%,
    100% 7%,
    100% 100%,
    0 100%
  );
  animation: panel-slide-up 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.figma-scene .figma-reward-unlocked {
  top: auto;
  height: 43.5%;
}

.figma-scene .figma-offer-panel {
  top: auto;
  height: 31.5%;
}

.figma-scene .figma-reward-unlocked .figma-panel-art,
.figma-scene .figma-offer-panel .figma-panel-art {
  display: none;
}

.figma-scene .figma-reward-unlocked .gift-icon {
  top: 7%;
  width: 11.9%;
}

.figma-scene .figma-reward-unlocked h2 {
  top: 30%;
  font-size: 8.2cqw;
  line-height: 1.28;
}

.figma-scene .figma-reward-unlocked .figma-ghost-button {
  top: auto;
  bottom: 3.2%;
  width: 88%;
  min-height: 56px;
  font-size: 2.3cqw;
}

.figma-scene .figma-offer-panel .reward-row {
  top: 9%;
  width: 86%;
  height: 39%;
}

.figma-scene .figma-offer-panel .reward-percent {
  left: 28%;
  font-size: 12.8cqw;
}

.figma-scene .figma-offer-panel .reward-desc {
  left: 54%;
  width: 36%;
  font-size: 2.78cqw;
  line-height: 1.34;
}

.figma-scene .figma-offer-panel .figma-ghost-button {
  top: 58%;
  width: 88%;
  min-height: 54px;
  font-size: 2.15cqw;
}

.figma-scene .figma-offer-panel .link-button {
  top: 84%;
}

@keyframes panel-slide-up {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.figma-scene .figma-title {
  font-size: 11.35cqw;
}

.figma-scene .figma-subtitle {
  font-size: 2.22cqw;
}

.figma-scene .figma-email-form input {
  font-size: 1.56cqw;
  letter-spacing: 0.35px;
}

.figma-scene .figma-arrow-button {
  font-size: 4.52cqw;
  font-family: "Press Start 2P", "Courier New", monospace;
}

.figma-scene .figma-board-label {
  font-size: 1.11cqw;
}

.figma-scene .figma-board-list .rank-badge {
  font-size: 1.82cqw;
}

.figma-scene .figma-board-list .name {
  font-size: 1.59cqw;
}

.figma-scene .figma-board-list .score {
  font-size: 1.55cqw;
}

.figma-scene .figma-reward-unlocked h2 {
  font-size: 8.2cqw;
}

.figma-scene .figma-ghost-button,
.figma-scene .figma-no-reward-play {
  font-size: 2.06cqw;
}

.figma-scene .figma-offer-panel .reward-percent {
  font-size: 12.8cqw;
}

.figma-scene .figma-offer-panel .reward-desc {
  font-size: 2.78cqw;
}

.figma-scene .figma-offer-panel .link-button {
  font-size: 1.59cqw;
}

/* Leaderboard depth + consistent pixel geometry */
.figma-scene .figma-board-list {
  top: 14.1%;
  bottom: 15.7%;
  height: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 0 112px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(109, 147, 243, 0.82) transparent;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 5.5%,
    #000 79%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 5.5%,
    #000 79%,
    transparent 100%
  );
}

.figma-scene .figma-board-list::-webkit-scrollbar {
  width: 6px;
}

.figma-scene .figma-board-list::-webkit-scrollbar-track {
  background: transparent;
}

.figma-scene .figma-board-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2867ff, #6d93f3);
}

.figma-scene .figma-board-list li {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(127, 183, 255, 0.045);
  clip-path: polygon(
    0 10px,
    10px 10px,
    10px 0,
    calc(100% - 10px) 0,
    calc(100% - 10px) 10px,
    100% 10px,
    100% calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px),
    calc(100% - 10px) 100%,
    10px 100%,
    10px calc(100% - 10px),
    0 calc(100% - 10px)
  );
}

.figma-scene .figma-board-list li:first-child {
  background: linear-gradient(90deg, rgba(40, 103, 255, 0.28), rgba(109, 147, 243, 0.16));
}

.figma-scene .figma-board-list li:nth-child(2),
.figma-scene .figma-board-list li:nth-child(3) {
  background: rgba(255, 255, 255, 0.045);
}

.figma-scene .figma-board-list li.is-you {
  opacity: 1;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(40, 103, 255, 0.18));
  color: #59f08e;
  box-shadow: inset 4px 0 0 #4ade80, inset 0 0 0 1px rgba(74, 222, 128, 0.18);
}

.figma-scene .figma-board-list .rank-badge {
  width: 44px;
  height: 34px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  clip-path: polygon(
    0 8px,
    8px 8px,
    8px 0,
    calc(100% - 8px) 0,
    calc(100% - 8px) 8px,
    100% 8px,
    100% calc(100% - 8px),
    calc(100% - 8px) calc(100% - 8px),
    calc(100% - 8px) 100%,
    8px 100%,
    8px calc(100% - 8px),
    0 calc(100% - 8px)
  );
}

.figma-scene .figma-board-list li[data-rank="1"] .rank-badge {
  background: #f59e0b;
}

.figma-scene .figma-board-list li[data-rank="2"] .rank-badge {
  background: #7e8795;
}

.figma-scene .figma-board-list li[data-rank="3"] .rank-badge {
  background: #8a452c;
}

.figma-scene .figma-board-fade {
  left: 0;
  right: 0;
  top: auto;
  bottom: 12.9%;
  width: 100%;
  height: 18%;
  background: linear-gradient(180deg, rgba(5, 10, 20, 0), rgba(5, 10, 20, 0.78) 58%, #050a14 100%);
}

.figma-scene .figma-ghost-button,
.figma-scene .figma-no-reward-play {
  border-radius: 0;
  clip-path: polygon(
    0 10px,
    10px 10px,
    10px 0,
    calc(100% - 10px) 0,
    calc(100% - 10px) 10px,
    100% 10px,
    100% calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px),
    calc(100% - 10px) 100%,
    10px 100%,
    10px calc(100% - 10px),
    0 calc(100% - 10px)
  );
}

.figma-scene .figma-no-reward-play {
  left: 50%;
  bottom: 4.4%;
  width: 88%;
  min-height: 56px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2867ff 0%, #6d93f3 100%);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font-size: 2.15cqw;
}

/* Reward panel spacing + button font lock */
.figma-scene button,
.figma-scene .figma-ghost-button,
.figma-scene .figma-no-reward-play,
.figma-scene .link-button {
  font-family: "Press Start 2P", "Courier New", monospace !important;
  font-weight: 400;
}

.figma-scene .figma-reward-unlocked .figma-ghost-button {
  bottom: 8.6%;
  min-height: 58px;
  font-size: 1.86cqw;
  letter-spacing: 0;
}

.figma-scene .figma-offer-panel .figma-ghost-button {
  top: 54%;
  min-height: 56px;
  font-size: 1.72cqw;
  letter-spacing: 0;
}

.figma-scene .figma-offer-panel .link-button {
  top: 82%;
}

.figma-scene .figma-no-reward-play {
  bottom: 6.4%;
  min-height: 58px;
  font-size: 1.72cqw;
  letter-spacing: 0;
}

/* Final reward sheet tuning */
.figma-scene .figma-leaderboard-scene:has(.figma-reward-unlocked:not([hidden])) .figma-board-fade {
  bottom: 43.5%;
}

.figma-scene:has(.figma-offer-panel:not([hidden])) .figma-board-fade {
  bottom: 31.5%;
}

.figma-scene .figma-offer-panel .reward-row {
  top: 4.8%;
  height: 43%;
}

.figma-scene .figma-offer-panel .reward-percent {
  top: auto;
  bottom: 0;
  left: 30%;
  transform: translateX(-50%);
  font-size: 14.35cqw;
  line-height: 0.9;
}

.figma-scene .figma-offer-panel .reward-desc {
  top: auto;
  bottom: 2.5%;
  left: 56.2%;
  width: 39%;
  transform: none;
  font-size: 3.12cqw;
  line-height: 1.12;
}

.figma-scene .figma-reward-unlocked .figma-ghost-button {
  bottom: 10.2%;
  font-size: 1.68cqw;
}

.figma-scene .figma-offer-panel .figma-ghost-button {
  top: 53%;
  font-size: 1.48cqw;
}

.figma-scene .figma-offer-panel .link-button {
  top: 79.5%;
  font-size: 1.48cqw;
}

.figma-scene .figma-no-reward-play {
  bottom: 8%;
  font-size: 1.48cqw;
}

.figma-scene button,
.figma-scene button *,
.figma-scene .figma-ghost-button,
.figma-scene .figma-no-reward-play,
.figma-scene .link-button {
  font-family: "Press Start 2P", "Courier New", monospace !important;
  -webkit-font-smoothing: none;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

/* Clean send reward states */
.figma-scene .send-code-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  white-space: nowrap;
}

.figma-scene .send-code-button.is-loading,
.figma-scene .send-code-button.is-loading:disabled {
  opacity: 1;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(35, 92, 232, 0.76), rgba(109, 147, 243, 0.48));
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.figma-scene .send-code-button.is-loading::before {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 30px;
  background: #ffffff;
  box-shadow: 14px 0 0 rgba(255, 255, 255, 0.35), 28px 0 0 rgba(255, 255, 255, 0.35);
  content: "";
  animation: reward-send-pulse 780ms steps(1, end) infinite;
}

.figma-scene .send-code-button.is-sent,
.figma-scene .send-code-button.is-sent:disabled {
  opacity: 1;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(40, 103, 255, 0.86), rgba(109, 147, 243, 0.58));
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.24);
}

.figma-scene .send-code-button.is-sent::before {
  display: none;
}

@keyframes reward-send-pulse {
  0% {
    box-shadow: 14px 0 0 rgba(255, 255, 255, 0.35), 28px 0 0 rgba(255, 255, 255, 0.35);
  }

  33% {
    box-shadow: 14px 0 0 #ffffff, 28px 0 0 rgba(255, 255, 255, 0.35);
  }

  66% {
    box-shadow: 14px 0 0 rgba(255, 255, 255, 0.35), 28px 0 0 #ffffff;
  }
}

/* Sticky player rank marker */
.figma-scene .figma-player-sticky {
  position: absolute;
  left: 50%;
  bottom: 17.6%;
  z-index: 8;
  width: 89.52%;
  transform: translateX(-50%);
  pointer-events: none;
}

.figma-scene .figma-leaderboard-scene:has(.figma-reward-unlocked:not([hidden])) .figma-player-sticky {
  bottom: 44.8%;
}

.figma-scene:has(.figma-offer-panel:not([hidden])) .figma-player-sticky {
  display: none;
}

.figma-scene .figma-player-sticky > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 14px;
  color: #59f08e;
  font-family: "Press Start 2P", "Courier New", monospace;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.34), rgba(40, 103, 255, 0.28));
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.22), inset 4px 0 0 #4ade80, inset 0 0 0 1px rgba(74, 222, 128, 0.22);
  clip-path: polygon(
    0 10px,
    10px 10px,
    10px 0,
    calc(100% - 10px) 0,
    calc(100% - 10px) 10px,
    100% 10px,
    100% calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px),
    calc(100% - 10px) 100%,
    10px 100%,
    10px calc(100% - 10px),
    0 calc(100% - 10px)
  );
}

.figma-scene .figma-player-sticky .rank-badge {
  display: grid;
  width: 44px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  font-size: 1.82cqw;
  background: #2f7d57;
  clip-path: polygon(
    0 8px,
    8px 8px,
    8px 0,
    calc(100% - 8px) 0,
    calc(100% - 8px) 8px,
    100% 8px,
    100% calc(100% - 8px),
    calc(100% - 8px) calc(100% - 8px),
    calc(100% - 8px) 100%,
    8px 100%,
    8px calc(100% - 8px),
    0 calc(100% - 8px)
  );
}

.figma-scene .figma-player-sticky .name {
  overflow: hidden;
  color: #d1e0f5;
  font-size: 1.59cqw;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.figma-scene .figma-player-sticky .score-wrap {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.figma-scene .figma-player-sticky .score-label {
  color: #7fb7ff;
  font-size: 1.1cqw;
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #010408;
}

.figma-scene .figma-player-sticky .score {
  justify-self: end;
  color: #22c55e;
  font-size: 1.55cqw;
  line-height: 1.5;
  white-space: nowrap;
}

/* Keep the start screen copy in flow below the title at every aspect ratio. */
.figma-scene .figma-intro {
  position: absolute;
  top: 40.55%;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.figma-scene .figma-intro .figma-title {
  position: relative;
  top: auto;
  left: auto;
  flex: none;
  height: 2.7em;
  transform: none;
}

.figma-scene .figma-intro .figma-subtitle {
  position: static;
  display: grid;
  justify-items: center;
  gap: 0.22em;
  width: 82%;
  margin-top: 10px;
  transform: none;
  font-size: clamp(18px, 3.46cqw, 23px);
  line-height: 1.32;
  white-space: normal;
}

.figma-scene .figma-intro .figma-subtitle strong {
  margin-left: 0;
  white-space: nowrap;
}

.figma-scene .figma-email-form input {
  font-size: 16px;
}

.figma-scene .figma-intro .figma-email-form {
  position: relative;
  top: auto;
  left: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  grid-template-areas:
    "name name"
    "email go";
  width: 88%;
  height: auto;
  margin-top: clamp(16px, 2.4cqh, 22px);
  gap: 8px;
  transform: none;
}

.figma-scene .figma-intro .figma-email-form #nameInput {
  grid-area: name;
  height: 48px;
}

.figma-scene .figma-intro .figma-email-form #emailInput {
  grid-area: email;
  height: 48px;
}

.figma-scene .figma-intro .figma-email-form .figma-arrow-button {
  grid-area: go;
  height: 48px;
}

.figma-scene .figma-arrow-button {
  font-size: clamp(30px, 6.36cqw, 42px);
}

@container (max-width: 559px) {
  .figma-scene .figma-intro .figma-subtitle {
    gap: 0.14em;
    width: 88%;
    font-size: clamp(18px, 4.65cqw, 20px);
    line-height: 1.3;
  }

  .figma-scene .figma-intro .figma-email-form {
    width: 88%;
    height: auto;
    margin-top: clamp(16px, 2.4cqh, 20px);
    gap: 8px;
  }

  .figma-scene .figma-email-form input {
    padding: 0 12px;
    font-size: 16px;
    letter-spacing: 0.2px;
    text-align: left;
  }

  .figma-scene .figma-arrow-button {
    font-size: clamp(20px, 5.4cqw, 26px);
  }
}

.figma-scene .figma-board-label {
  font-size: 1.36cqw;
}

.figma-scene .figma-board-list li,
.figma-scene .figma-player-sticky > div {
  min-height: 60px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  padding: 10px 16px;
}

.figma-scene .figma-board-list .rank-badge,
.figma-scene .figma-player-sticky .rank-badge {
  width: 48px;
  height: 38px;
  font-size: 2.02cqw;
}

.figma-scene .figma-board-list .name,
.figma-scene .figma-player-sticky .name {
  font-size: 1.88cqw;
}

.figma-scene .figma-board-list .score-label,
.figma-scene .figma-player-sticky .score-label {
  font-size: 1.55cqw;
}

.figma-scene .figma-board-list .score,
.figma-scene .figma-player-sticky .score {
  font-size: 1.82cqw;
}

.figma-scene .figma-reward-unlocked .figma-ghost-button,
.figma-scene .figma-no-reward-play {
  min-height: 64px;
  font-size: 2.24cqw;
}

.figma-scene .figma-offer-panel .figma-ghost-button {
  min-height: 62px;
  font-size: 2.02cqw;
}

.figma-scene .figma-offer-panel .link-button {
  font-size: 2.02cqw;
}

.figma-scene .figma-offer-panel .reward-desc {
  font-size: 3.34cqw;
}

/* Clean bottom sheet reveal */
.figma-scene.figma-end {
  overflow: hidden;
}

.figma-scene .figma-reward-unlocked,
.figma-scene .figma-offer-panel {
  box-shadow: none !important;
  will-change: transform, opacity;
  animation: panel-slide-up-clean 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.figma-scene .figma-reward-unlocked .gift-icon,
.figma-scene .figma-reward-unlocked h2,
.figma-scene .figma-reward-unlocked .figma-ghost-button {
  z-index: 3;
}

.figma-scene .figma-reward-unlocked.is-shining::before {
  position: absolute;
  z-index: 2;
  inset: -22% -56%;
  display: block;
  background: linear-gradient(
    112deg,
    transparent 34%,
    rgba(255, 255, 255, 0.18) 42%,
    rgba(255, 255, 255, 0.58) 49%,
    rgba(255, 255, 255, 0.16) 56%,
    transparent 66%
  );
  content: "";
  pointer-events: none;
  transform: translateX(-62%);
  animation: reward-shine-sweep 980ms steps(14, end) 160ms both;
}

.figma-scene .figma-reward-unlocked.is-shining::after {
  position: absolute;
  z-index: 2;
  top: 16%;
  left: 50%;
  display: block;
  width: 6px;
  height: 6px;
  background: #ffffff;
  box-shadow:
    -118px 28px 0 #fcd34d,
    -82px -18px 0 #ffffff,
    -34px 54px 0 #86efac,
    46px -28px 0 #ffffff,
    96px 38px 0 #fcd34d,
    132px -2px 0 #86efac;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  animation: reward-spark-pop 900ms steps(5, end) 260ms both;
}

@keyframes reward-shine-sweep {
  to {
    transform: translateX(62%);
  }
}

@keyframes reward-spark-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.4);
  }

  20%,
  72% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(-50%) scale(0.3);
  }
}

@keyframes panel-slide-up-clean {
  0% {
    opacity: 0;
    transform: translate3d(0, 105%, 0);
  }

  1% {
    opacity: 1;
    transform: translate3d(0, 105%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 460px) {
  .stats-panel {
    min-width: 70px;
    padding: 0.52rem;
  }

  .best-panel {
    right: 17.5%;
    min-width: 72px;
    padding: 0.48rem 0.54rem;
  }

  .center-score {
    top: 10.8%;
  }

  .ticker {
    letter-spacing: 0.22em;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  html,
  body {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--bg);
    touch-action: none;
  }

  body {
    display: block;
  }

  .game-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100svh;
    max-width: none;
    max-height: none;
    border: 0;
    box-shadow: none;
    transform: none;
    touch-action: none;
  }

  canvas {
    touch-action: none;
  }

  .figma-email-form input,
  .figma-board-list {
    touch-action: manipulation;
  }
}

.figma-scene .figma-email-form input {
  font-family: "Creato Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.figma-scene .figma-board-list {
  bottom: calc(4.4% + 76px);
  padding-bottom: 8px;
  -webkit-mask-image: none;
  mask-image: none;
}

.figma-scene .figma-leaderboard-scene:has(#playerSticky:not([hidden])) .figma-board-list {
  bottom: calc(4.4% + 148px);
}

.figma-scene .figma-board-list li,
.figma-scene .figma-player-sticky > div {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.figma-scene .figma-board-list .rank-badge,
.figma-scene .figma-player-sticky .rank-badge {
  width: auto;
  min-width: 44px;
  padding: 0 6px;
  font-size: max(9px, 1.35cqw);
}

.figma-scene .figma-board-list .name,
.figma-scene .figma-player-sticky .name {
  font-size: max(10px, 1.7cqw);
}

.figma-scene .figma-player-sticky {
  bottom: calc(4.4% + 76px);
  z-index: 6;
}

.figma-scene .figma-player-sticky > div {
  background: #071426;
  box-shadow: inset 4px 0 0 #4ade80, inset 0 0 0 1px rgba(74, 222, 128, 0.45);
}

.figma-scene .figma-no-reward-play {
  bottom: 4.4%;
  z-index: 7;
}

.figma-scene .figma-leaderboard-scene:has(.figma-reward-unlocked:not([hidden])) #leaderboardList {
  bottom: 54%;
}

.figma-scene .figma-leaderboard-scene:has(.figma-reward-unlocked:not([hidden])) .figma-player-sticky {
  bottom: 45.6%;
}

.figma-scene .figma-offer-panel {
  height: 31.5%;
}

.figma-scene:has(.figma-offer-panel:not([hidden])) .figma-board-fade {
  bottom: 31.5%;
}

.figma-scene .figma-offer-panel .reward-code {
  display: none !important;
}

.figma-scene .figma-offer-panel .figma-ghost-button {
  top: 52%;
}

.figma-scene .figma-offer-panel .link-button {
  top: 80%;
}
