:root {
  --bg: #0b1228;
  --bg-soft: #151d3a;
  --ink: #0b1228;
  --paper: #fff7fb;
  --muted: #c9d2f5;
  --muted-on-paper: #1e2438;
  --pink: #ff4f8b;
  --pink-hot: #ff6eb4;
  --magenta: #d84890;
  --cyan: #1ec8d8;
  --cyan-soft: #7cf0ff;
  --violet: #5b6dff;
  --yellow: #ffe566;
  --mint: #30c078;
  --red: #e0244a;
  --outline: #0b1228;
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--bg);
  overflow-x: hidden;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 12% 8%, #5b6dff44 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 92% 18%, #ff4f8b38 0%, transparent 58%),
    radial-gradient(ellipse 65% 45% at 78% 88%, #1ec8d828 0%, transparent 62%),
    radial-gradient(ellipse 90% 40% at 40% 100%, #ff6eb422 0%, transparent 70%),
    radial-gradient(ellipse 70% 35% at 10% 95%, #5b6dff20 0%, transparent 65%),
    linear-gradient(180deg, #0b1228 0%, #101833 50%, #0b1228 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.4;
}

.orb-pink {
  width: 320px;
  height: 320px;
  top: 14%;
  right: -80px;
  background: #ff4f8b;
  animation: drift 10s ease-in-out infinite;
}

.orb-cyan {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: -70px;
  background: #1ec8d8;
  animation: drift 12s ease-in-out infinite reverse;
}

.orb-violet {
  width: 360px;
  height: 220px;
  bottom: -40px;
  left: 30%;
  background: #5b6dff;
  opacity: 0.28;
  animation: drift 14s ease-in-out infinite;
}

.spark {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 6px #ffe566aa);
  animation: twinkle 2.8s ease-in-out infinite;
}

.s1 { top: 10%; left: 6%; width: 16px; height: 16px; }
.s2 { top: 18%; left: 28%; width: 10px; height: 10px; animation-delay: 0.3s; animation-duration: 3.2s; }
.s3 { top: 7%; left: 52%; width: 8px; height: 8px; animation-delay: 0.7s; }
.s4 { top: 14%; right: 18%; width: 20px; height: 20px; animation-delay: 0.9s; animation-duration: 2.4s; }
.s5 { top: 28%; right: 8%; width: 11px; height: 11px; animation-delay: 1.2s; }
.s6 { top: 36%; left: 12%; width: 9px; height: 9px; animation-delay: 0.2s; animation-duration: 3.6s; }
.s7 { top: 42%; left: 48%; width: 13px; height: 13px; animation-delay: 1.5s; }
.s8 { top: 52%; right: 22%; width: 8px; height: 8px; animation-delay: 0.5s; }
.s9 { top: 58%; left: 22%; width: 15px; height: 15px; animation-delay: 1.8s; animation-duration: 2.6s; }
.s10 { top: 68%; right: 12%; width: 10px; height: 10px; animation-delay: 0.8s; }
.s11 { top: 74%; left: 8%; width: 12px; height: 12px; animation-delay: 1.1s; }
.s12 { top: 82%; left: 38%; width: 9px; height: 9px; animation-delay: 1.6s; animation-duration: 3.4s; }
.s13 { top: 88%; right: 30%; width: 14px; height: 14px; animation-delay: 0.4s; }
.s14 { top: 24%; left: 72%; width: 7px; height: 7px; animation-delay: 2s; }
.s15 { top: 46%; left: 78%; width: 11px; height: 11px; animation-delay: 0.6s; }
.s16 { top: 62%; left: 58%; width: 8px; height: 8px; animation-delay: 1.3s; }
.s17 { top: 32%; left: 38%; width: 6px; height: 6px; animation-delay: 2.2s; animation-duration: 2.2s; }
.s18 { top: 78%; right: 6%; width: 10px; height: 10px; animation-delay: 1.7s; }
.s19 { top: 16%; left: 88%; width: 5px; height: 5px; animation-delay: 0.1s; background: #fff; }
.s20 { top: 90%; left: 18%; width: 7px; height: 7px; animation-delay: 2.4s; background: #7cf0ff; }

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.8) rotate(0deg);
  }
  40% {
    opacity: 1;
    transform: scale(1.25) rotate(14deg);
  }
  70% {
    opacity: 0.7;
    transform: scale(0.95) rotate(-6deg);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 8px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1;
}

.logo-mark {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 10px #ffe56688);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--cyan-soft);
}

.auth-slot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.auth-slot .btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.auth-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 2px solid #ffffff33;
  border-radius: 999px;
  background: #ffffff12;
  font-size: 13px;
}

.auth-chip.is-btn {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff55;
  flex: 0 0 auto;
}

.auth-avatar.is-fallback {
  display: inline-grid;
  place-items: center;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}

.auth-avatar.is-lg {
  width: 72px;
  height: 72px;
  font-size: 28px;
  border-width: 3px;
  border-color: var(--outline);
}

.auth-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--paper);
}

.auth-card-wide {
  width: min(520px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
}

.auth-meta {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--muted-on-paper);
}

.acct-section {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 2px solid #00000014;
}

.acct-section h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}

.acct-section.is-danger h4 {
  color: #b71c1c;
}

.acct-avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.acct-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acct-file-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.auth-form textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 3px solid var(--outline);
  border-radius: 12px;
  font: inherit;
  resize: vertical;
}

.auth-optional {
  font-weight: 500;
  color: var(--muted-on-paper);
  font-size: 12px;
}

.auth-error.is-ok {
  color: #1b5e20;
}

.btn-danger {
  background: #ff4f8b;
  color: #fff;
  border-color: var(--outline);
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: #e03870;
  color: #fff;
}

.auth-coins {
  color: var(--yellow);
  font-weight: 800;
}

.shop-grid {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.shop-empty {
  padding: 28px 18px;
  text-align: center;
  border: 2px dashed #0b122833;
  border-radius: 16px;
  background: #0b122808;
}

.shop-empty-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.shop-empty-text {
  margin: 0;
  color: var(--muted-on-paper);
  font-size: 0.95rem;
}

.shop-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--outline);
  border-radius: 14px;
  background: #fff;
}

.shop-item h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  color: var(--ink);
}

.shop-item p {
  margin: 0;
  color: var(--muted-on-paper);
  font-size: 0.9rem;
}

.shop-item.is-owned {
  opacity: 0.85;
}

.shop-owned {
  font-weight: 800;
  color: var(--mint);
  font-size: 0.9rem;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  background: var(--pink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-link {
  border: 0;
  background: transparent;
  color: var(--cyan-soft);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #0b1228cc;
  cursor: pointer;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 20px;
  border: 3px solid var(--outline);
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--pink);
  display: grid;
  gap: 12px;
}

.auth-card .auth-meta,
.auth-card .auth-hint,
.auth-card .auth-optional {
  color: #1e2438 !important;
  opacity: 1;
}

.auth-card h3,
.auth-card h4,
.auth-card label {
  color: var(--ink);
}

.auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form.is-hidden {
  display: none !important;
}

.auth-switch {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  justify-self: start;
  padding: 0;
}

.auth-form label {
  display: grid;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
}

.auth-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 3px solid var(--outline);
  border-radius: 12px;
  font: inherit;
}

.auth-error {
  margin: 0;
  color: #c62828;
  font-size: 14px;
}

.auth-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted-on-paper);
}

.gmm-inline-link {
  border: 0;
  background: transparent;
  color: var(--cyan);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.gmm-admin-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 1px 7px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.gmm-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gmm-player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--outline);
  flex: 0 0 auto;
}

.gmm-player-avatar.is-fallback {
  display: inline-grid;
  place-items: center;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.gmm-coin-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  z-index: 95;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--outline);
  white-space: nowrap;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}

a:focus-visible {
  outline: 2px solid var(--cyan-soft);
  outline-offset: 3px;
}

.hero {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 36px 0 48px;
  min-height: min(72vh, 620px);
}

.hero-stage {
  position: relative;
  width: min(720px, 100%);
  padding: 48px 36px 44px;
  border: 3px solid #ffffff22;
  border-radius: 40px;
  background:
    radial-gradient(circle at 20% 20%, #ff4f8b33 0%, transparent 42%),
    radial-gradient(circle at 85% 25%, #1ec8d833 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, #5b6dff2e 0%, transparent 45%),
    linear-gradient(160deg, #1a2148ee 0%, #12183aee 55%, #0f1634ee 100%);
  box-shadow:
    0 0 0 1px #ffe56622,
    0 24px 60px #00000066,
    inset 0 1px 0 #ffffff22;
  overflow: visible;
}

.hero-glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 70%;
  background: radial-gradient(ellipse at center, #ff6eb444 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.hero-spark {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 10px #ffe566);
  animation: twinkle 2.4s ease-in-out infinite;
}

.hs1 { top: -10px; left: 12%; width: 26px; height: 26px; }
.hs2 { top: 18%; right: -12px; width: 18px; height: 18px; animation-delay: 0.4s; }
.hs3 { bottom: 22%; left: -14px; width: 20px; height: 20px; animation-delay: 0.9s; }
.hs4 { bottom: -8px; right: 18%; width: 24px; height: 24px; animation-delay: 1.2s; }
.hs5 { top: -6px; right: 28%; width: 14px; height: 14px; animation-delay: 0.2s; background: #7cf0ff; }
.hs6 { top: 42%; left: -10px; width: 12px; height: 12px; animation-delay: 1.6s; background: #ff6eb4; }
.hs7 {
  top: -16px;
  right: 8%;
  width: 34px;
  height: 34px;
  background: var(--pink);
  animation-delay: 0.5s;
  filter: drop-shadow(0 0 12px #ff4f8baa);
}
.hs8 {
  bottom: -14px;
  left: 8%;
  width: 30px;
  height: 30px;
  background: var(--cyan);
  animation-delay: 1s;
  filter: drop-shadow(0 0 12px #1ec8d8aa);
}
.hs9 {
  top: 48%;
  right: -16px;
  width: 28px;
  height: 28px;
  background: var(--yellow);
  animation-delay: 1.4s;
  filter: drop-shadow(0 0 12px #ffe566aa);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-shadow:
    0 0 24px #ff6eb466,
    4px 4px 0 #ff4f8b;
}

.lead {
  max-width: 34ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--outline);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.btn:hover,
.btn:focus-visible {
  outline: none;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--outline);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-pink {
  background: var(--pink);
  color: var(--paper);
}

.btn-pink:hover,
.btn-pink:focus-visible {
  background: var(--yellow);
  color: var(--ink);
}

.btn-cyan {
  background: var(--cyan);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: #ffffff88;
  box-shadow: 4px 4px 0 #ff4f8b88;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: #ffffff18;
  color: var(--cyan-soft);
}

.modes {
  padding: 8px 0 24px;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2,
.bubble h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

.section-head h2 {
  font-size: clamp(34px, 5vw, 48px);
  color: var(--paper);
  text-shadow: 0 0 18px #5b6dff66;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 210px;
  padding: 22px 20px;
  border: 3px solid var(--outline);
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: 6px 6px 0 var(--outline);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.card.is-playable {
  padding: 0;
  cursor: default;
}

.card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 210px;
  padding: 22px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-info {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--outline);
}

.card-info:hover,
.card-info:focus-visible {
  background: var(--yellow);
  outline: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 10px;
}

.card:hover {
  transform: translate(-2px, -4px) rotate(-0.4deg);
  box-shadow: 8px 10px 0 var(--outline);
}

.card-soon {
  cursor: default;
  opacity: 0.78;
}

.card-soon:hover {
  transform: none;
  box-shadow: 6px 6px 0 var(--outline);
}

.mode-info-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
}

.mode-info-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #0b1228cc;
  cursor: pointer;
}

.mode-info-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 22px 20px;
  border: 3px solid var(--outline);
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--cyan);
}

.mode-info-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
}

.mode-info-card .mode-info-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.mode-info-card .mode-info-goal {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.45;
}

.mode-info-card ol {
  margin: 0 0 16px;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
}

.mode-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tone-pink::before { background: linear-gradient(90deg, var(--pink), var(--yellow)); }
.tone-violet::before { background: linear-gradient(90deg, var(--violet), var(--pink-hot)); }
.tone-cyan::before { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.tone-yellow::before { background: linear-gradient(90deg, var(--yellow), var(--pink)); }
.tone-mint::before { background: linear-gradient(90deg, var(--mint), var(--cyan)); }
.tone-red::before { background: linear-gradient(90deg, var(--red), var(--magenta)); }

.tone-pink { background: linear-gradient(180deg, #fff 0%, #ffe3ef 100%); }
.tone-violet { background: linear-gradient(180deg, #fff 0%, #e6e8ff 100%); }
.tone-cyan { background: linear-gradient(180deg, #fff 0%, #d9f8fc 100%); }
.tone-yellow { background: linear-gradient(180deg, #fff 0%, #fff6c9 100%); }
.tone-mint { background: linear-gradient(180deg, #fff 0%, #d9f7e8 100%); }
.tone-red { background: linear-gradient(180deg, #fff 0%, #ffd9e1 100%); }

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: 4px;
  margin-bottom: 4px;
  border: 3px solid var(--outline);
  border-radius: 18px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--outline);
}

.card-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--ink);
}

.card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}

.card p {
  margin: 0;
  color: #4a3b5c;
  font-size: 16px;
}

.soon {
  align-self: flex-start;
  margin-top: auto;
  padding: 7px 12px;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.soon.is-live {
  background: var(--mint);
  color: var(--ink);
}

.community {
  padding: 56px 0 64px;
}

.bubble {
  position: relative;
  padding: 36px 32px;
  border: 3px solid var(--outline);
  border-radius: 36px;
  background:
    radial-gradient(circle at 90% 10%, #ffe56655 0%, transparent 30%),
    linear-gradient(135deg, #ff4f8b 0%, #5b6dff 48%, #1ec8d8 100%);
  box-shadow: 8px 8px 0 var(--outline);
  color: var(--paper);
}

.bubble-star {
  position: absolute;
  top: -14px;
  right: 36px;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 10px #ffe566aa);
}

.bubble h2 {
  font-size: clamp(30px, 4vw, 42px);
}

.bubble p {
  max-width: 46ch;
  margin: 0 0 22px;
  color: #fff7fb;
  font-size: 18px;
}

.bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer {
  padding: 8px 0 36px;
  color: var(--muted);
  font-size: 15px;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--cyan-soft);
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--yellow);
}

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

.game-view {
  padding: 24px 0 48px;
}

.game-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.game-bar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  color: var(--paper);
  text-shadow: 0 0 18px #5b6dff66;
}

.game-root {
  min-height: 420px;
  padding: 28px;
  border: 3px solid var(--outline);
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 20%, #ff4f8b33 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, #1ec8d833 0%, transparent 42%),
    #151d3a;
  box-shadow: 6px 6px 0 var(--pink);
}

.game-placeholder {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding-top: 32px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(1100px, calc(100% - 28px));
  }

  .topbar {
    flex-direction: column;
    align-items: center;
  }

  .nav {
    justify-content: center;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-stage {
    padding: 36px 20px 32px;
    border-radius: 28px;
  }

  .hs7,
  .hs8,
  .hs9 {
    width: 22px;
    height: 22px;
  }

  .hero-actions,
  .btn,
  .bubble-actions {
    width: 100%;
  }

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

  .bubble {
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .spark,
  .orb,
  .hero-spark,
  .btn,
  .card {
    animation: none !important;
    transition: none !important;
  }
}

/* Background music dock */
.audio-dock {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: flex-end;
}

.audio-dock-shell {
  position: relative;
  padding-top: 28px;
  padding-right: 10px;
}

.audio-dock-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: color-mix(in srgb, #151d3a 88%, transparent);
  box-shadow: 4px 4px 0 var(--pink);
  backdrop-filter: blur(8px);
}

.audio-dock.is-hidden .audio-dock-shell {
  display: none;
}

.audio-dock > .audio-show {
  display: none;
  background: color-mix(in srgb, #151d3a 92%, transparent);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--pink);
}

.audio-dock.is-hidden > .audio-show {
  display: grid;
}

.audio-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--outline);
}

.audio-btn:hover,
.audio-btn:focus-visible {
  outline: none;
  background: var(--yellow);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--outline);
}

/* Croix seule — après .audio-btn pour ne pas être écrasée */
#audio-hide.audio-hide {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #ff6eb4;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 0 6px #0b1228;
}

#audio-hide.audio-hide:hover,
#audio-hide.audio-hide:focus-visible {
  outline: none;
  background: transparent;
  color: #ffe566;
  transform: none;
  box-shadow: none;
}

#audio-mute {
  position: relative;
}

#audio-mute svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

#audio-mute .icon-off {
  display: none;
}

#audio-mute.is-muted .icon-on {
  display: none;
}

#audio-mute.is-muted .icon-off {
  display: block;
}

#audio-mute.is-muted {
  background: var(--pink);
  color: var(--paper);
}

.audio-slider {
  width: 96px;
  height: 8px;
  appearance: none;
  border-radius: 999px;
  background: #ffffff33;
  outline: none;
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px #ffe56655;
}

.audio-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--cyan);
}

@media (max-width: 640px) {
  .audio-dock {
    right: 12px;
    bottom: 12px;
  }

  .audio-dock-panel {
    padding: 7px 8px;
  }

  .audio-slider {
    width: 72px;
  }
}
