:root {
  --sp-night: #130b2b;
  --sp-violet: #7e43ff;
  --sp-pink: #f36eff;
  --sp-cyan: #41f0ff;
  --sp-soft: #f0edff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: #ece9ff;
  background:
    radial-gradient(circle at 12% 6%, rgba(243, 110, 255, 0.25), transparent 34%),
    radial-gradient(circle at 90% 85%, rgba(65, 240, 255, 0.25), transparent 37%),
    linear-gradient(170deg, #0f0821, #1a0f34 55%, #120a29);
}

.sp-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #3d2c79;
  backdrop-filter: blur(9px);
  background: color-mix(in srgb, #140d2e 84%, transparent);
}

.sp-head-inner {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sp-brand {
  text-decoration: none;
  color: #f4ecff;
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  font-family: "Syne", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.sp-brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #f36eff, #41f0ff);
  color: #130c2a;
  font-weight: 900;
  font-size: 0.82rem;
}

.sp-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #4d3a8b;
  border-radius: 10px;
  background: #1a1140;
}

.sp-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #e7ddff;
}

.sp-nav {
  display: flex;
  gap: 0.45rem;
}

.sp-nav a {
  text-decoration: none;
  color: #e9ddff;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.sp-nav a:hover,
.sp-nav a.sp-active {
  background: #312164;
}

main {
  width: min(1400px, calc(100% - 2rem));
  margin: 1.15rem auto 2.3rem;
}

.sp-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.sp-main-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1rem;
}

.sp-panel {
  background:
    linear-gradient(150deg, rgba(38, 22, 76, 0.92), rgba(20, 12, 45, 0.94));
  border: 1px solid #4c3890;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.26);
}

.sp-panel h1,
.sp-panel h2,
.sp-panel h3 {
  margin: 0 0 0.55rem;
  font-family: "Syne", sans-serif;
}

.sp-panel h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.sp-rules {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.5rem;
}

.sp-rules div {
  border-left: 4px solid var(--sp-cyan);
  border-radius: 8px;
  background: #1d1242;
  padding: 0.52rem 0.7rem;
  font-weight: 700;
}

.sp-cards {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.sp-card {
  border: 1px solid #523f97;
  border-radius: 12px;
  background: #1b103e;
  padding: 0.68rem;
}

.sp-progress {
  margin-top: 0.8rem;
  border-radius: 999px;
  border: 1px solid #56439a;
  overflow: hidden;
  height: 13px;
}

.sp-progress span {
  display: block;
  height: 100%;
  width: 73%;
  background: linear-gradient(90deg, #f36eff, #41f0ff);
}

.sp-game {
  border: 1px solid #4f3f9a;
  border-radius: 20px;
  background: #130c31;
  padding: 0.75rem;
}

.sp-game iframe {
  width: 100%;
  height: min(72vw, 660px);
  border: 0;
  border-radius: 12px;
  background: #000;
}

.sp-triad {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sp-foot {
  border-top: 1px solid #3c2e77;
  background: #120b2d;
}

.sp-foot-inner {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.sp-safe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.sp-safe a {
  color: #b9e9ff;
}

.sp-age {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(11, 7, 24, 0.85);
}

.sp-age[hidden] {
  display: none;
}

.sp-age-box {
  width: min(560px, 100%);
  border: 1px solid #604db2;
  border-radius: 18px;
  background: #1a1040;
  padding: 1rem;
}

.sp-age-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.7rem;
}

.sp-age-actions button {
  border: 0;
  padding: 0.62rem 0.88rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.sp-age-yes {
  background: linear-gradient(120deg, #f36eff, #41f0ff);
  color: #120a27;
}

.sp-age-no {
  background: #3a2b74;
  color: #f2edff;
}

.sp-age-msg {
  min-height: 1.4em;
  color: #ff9ec8;
}

@media (max-width: 1024px) {
  .sp-main-grid,
  .sp-triad {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sp-toggle {
    display: inline-block;
  }

  .sp-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.25rem);
    display: none;
    flex-direction: column;
    background: #1a1042;
    border: 1px solid #5847a8;
    border-radius: 12px;
    padding: 0.65rem;
  }

  .sp-nav.sp-open {
    display: flex;
  }

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