:root {
  --play-bg: #212121;
  --play-ink: #f2f2f2;
  --play-muted: rgba(242, 242, 242, 0.62);
  --play-soft: rgba(255, 255, 255, 0.1);
  --play-panel: rgba(33, 33, 33, 0.9);
  --play-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --play-transition-duration: 300ms;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--play-bg);
  color: var(--play-ink);
  font-family: "Darker Grotesque", "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

button {
  font: inherit;
}

.playground-welcome-transition {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--play-bg);
  color: var(--play-ink);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity var(--play-transition-duration) linear,
    transform var(--play-transition-duration) linear;
}

.playground-welcome-transition.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.playground-welcome-transition__text {
  max-width: min(760px, calc(100vw - 48px));
  font-family: "Plus Jakarta Sans", "Geist", "Inter", sans-serif;
  font-size: clamp(28px, 7vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-align: center;
}

.playground-shell {
  position: relative;
  display: flex;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 44%, rgba(255, 255, 255, 0.04), transparent 24vw),
    var(--play-bg);
}

.playground-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(180deg, rgba(33, 33, 33, 0.78), rgba(33, 33, 33, 0));
  pointer-events: none;
}

.playground-logo,
.playground-back {
  color: var(--play-ink);
  position: relative;
  z-index: 2;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.playground-logo {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  pointer-events: none;
  user-select: none;
}

.playground-back {
  pointer-events: auto;
}

.playground-back {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #212121;
  transition: transform 220ms var(--play-ease), background-color 220ms ease;
}

.playground-back:hover {
  transform: translateY(-1px);
}

.playground-galaxy {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  cursor: default;
}

.playground-galaxy canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.playground-stage {
  display: none;
  position: absolute;
  inset: -18vh 0 -18vh 34vw;
  z-index: 3;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 88%, transparent 100%);
}

.playground-stage.is-dragging {
  cursor: grabbing;
}

.playground-lane {
  position: relative;
  min-width: 0;
  will-change: transform;
}

.playground-lane:nth-child(2) {
  margin-top: -13vh;
}

.playground-lane:nth-child(3) {
  margin-top: 8vh;
}

.playground-card {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  transform: translateZ(0);
}

.playground-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #2b2b2b;
}

.playground-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(0.86) contrast(1.02);
  transition: transform 720ms var(--play-ease), filter 260ms ease, opacity 260ms ease;
}

.playground-card__content {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.playground-card__meta,
.playground-hint,
.playground-footer p,
.playground-drawer__top,
.playground-detail-row {
  color: var(--play-muted);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.playground-card__title {
  display: block;
  color: #ffffff;
  font-size: clamp(24px, 2.4vw, 38px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.9;
}

.playground-card:hover img,
.playground-card:focus-visible img {
  opacity: 1;
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.04);
}

.playground-footer {
  position: fixed;
  right: 32px;
  bottom: 32px;
  left: 32px;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 24px;
  pointer-events: none;
}

.playground-footer p {
  margin: 0;
  max-width: 320px;
  font-size: 15px;
  font-weight: 300;
}

.playground-hint {
  position: fixed;
  right: 32px;
  top: 32px;
  z-index: 6;
  margin: 0;
  pointer-events: none;
}

.playground-card:focus-visible,
.playground-logo:focus-visible,
.playground-back:focus-visible,
.playground-drawer__close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.playground-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.playground-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: opacity 320ms ease, backdrop-filter 320ms ease;
}

.playground-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 50vw;
  height: 100vh;
  padding: 32px;
  background: #1f1f1f;
  color: #f2f2f2;
  box-shadow: -32px 0 110px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  transform: translateX(104%);
  transition: transform 620ms var(--play-ease);
}

.playground-drawer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  color: rgba(242, 242, 242, 0.74);
  font-family: "Plus Jakarta Sans", "Geist", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -1.04px;
  line-height: 28.6px;
  text-transform: none;
}

.playground-drawer__top-meta {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
  white-space: nowrap;
}

.playground-drawer__close {
  display: inline-flex;
  min-width: 0;
  height: auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f2f2f2;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", "Geist", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -1.04px;
  line-height: 28.6px;
  white-space: nowrap;
  transition: color 220ms ease, opacity 220ms ease;
}

.playground-drawer__close:hover {
  color: #ffffff;
  opacity: 0.7;
}

.playground-drawer__body {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
  padding: 0;
  scrollbar-width: none;
}

.playground-drawer__body::-webkit-scrollbar {
  display: none;
}

.playground-drawer__media {
  flex: none;
  width: 100%;
  min-width: min(100%, 320px);
  max-width: 100%;
  aspect-ratio: var(--drawer-media-ratio, 1.7777778);
  overflow: hidden;
  border-radius: 0;
  background: #2b2b2b;
}

.playground-drawer__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playground-drawer__body h2 {
  margin: 0;
  color: #f2f2f2;
  font-family: "Plus Jakarta Sans", "Geist", "Inter", sans-serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1.04px;
  line-height: 28.6px;
}

.playground-drawer__body p {
  margin: 0;
  color: rgba(242, 242, 242, 0.88);
  font-family: "Plus Jakarta Sans", "Geist", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
}

.playground-drawer__description {
  color: rgba(242, 242, 242, 0.68);
  font-weight: 400;
}

.playground-drawer__details {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.playground-detail-row {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border-top: 0;
  color: rgba(242, 242, 242, 0.56);
  font-family: "Plus Jakarta Sans", "Geist", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 28.6px;
}

.playground-detail-row dd,
.playground-detail-row dt {
  margin: 0;
}

.playground-detail-row dd {
  color: rgba(242, 242, 242, 0.9);
  overflow: hidden;
  font-size: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.playground-drawer-open body {
  overflow: hidden;
}

html.playground-drawer-open .playground-drawer {
  pointer-events: auto;
}

html.playground-drawer-open .playground-drawer__backdrop {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html.playground-drawer-open .playground-drawer__panel {
  pointer-events: auto;
  transform: translateX(0);
}

@media (max-width: 1100px) {
  .playground-galaxy {
    inset: 0;
  }

  .playground-stage {
    left: 300px;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .playground-lane:nth-child(3) {
    display: none;
  }
}

@media (max-width: 809px) {
  .playground-shell {
    min-height: 100svh;
  }

  .playground-welcome-transition {
    padding: 20px;
  }

  .playground-welcome-transition__text {
    max-width: min(360px, calc(100vw - 40px));
    font-size: clamp(34px, 13vw, 54px);
    line-height: 0.92;
  }

  .playground-header {
    min-height: 68px;
    padding: 0 24px;
  }

  .playground-galaxy {
    inset: 0;
  }

  .playground-stage {
    inset: 34vh -32vw -30vh 18vw;
    grid-template-columns: 1fr;
    transform: rotate(-6deg) scale(1.06);
  }

  .playground-lane:nth-child(2),
  .playground-lane:nth-child(3) {
    display: none;
  }

  .playground-footer {
    right: 24px;
    bottom: 24px;
    left: 24px;
  }

  .playground-hint {
    display: none;
  }

  .playground-drawer__panel {
    width: 100vw;
    padding: 24px;
  }

  .playground-drawer__media {
    width: 100%;
    min-width: 0;
  }

  .playground-drawer__body p {
    font-size: 16px;
    line-height: 1.45;
  }

  .playground-drawer__details {
    flex-direction: column;
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
  }

  .playground-detail-row {
    width: 100%;
    flex: none;
    gap: 2px;
  }

  .playground-detail-row[data-detail="type"] {
    order: 1;
  }

  .playground-detail-row[data-detail="source"] {
    order: 2;
  }

  .playground-detail-row[data-detail="status"] {
    order: 3;
  }

  .playground-detail-row dd {
    font-size: 18px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .playground-welcome-transition {
    transform: none;
  }
}
