html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

@property --mx {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}
@property --my {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}
.sl-grid {
  width: min(320px, 88vw);
  aspect-ratio: 340/190;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  --mx: 50%;
  --my: 50%;
}

.sl-tile {
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
  color: #fff7e6;
  background: #17141a;
  font: 600 12px/1 -apple-system, "Segoe UI", sans-serif;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.sl-tile__tag {
  position: relative;
  z-index: 1;
  opacity: 0.85;
}

.sl-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140px circle at var(--mx) var(--my), rgba(47, 109, 246, 0.6), transparent 70%);
  opacity: 0;
  transition: opacity 200ms linear;
  pointer-events: none;
}

.sl-grid:has(.sl-tile:hover) .sl-tile::before {
  opacity: 1;
}

@keyframes sl-drift {
  0% {
    --mx: 10%;
    --my: 15%;
  }
  25% {
    --mx: 90%;
    --my: 10%;
  }
  50% {
    --mx: 85%;
    --my: 90%;
  }
  75% {
    --mx: 10%;
    --my: 85%;
  }
  100% {
    --mx: 10%;
    --my: 15%;
  }
}
.sl-grid.is-demo {
  animation: sl-drift 2s linear infinite;
}

.sl-grid.is-demo .sl-tile::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .sl-grid.is-demo {
    animation: none !important;
  }
  .sl-tile::before {
    transition: none !important;
  }
}
