:root {
  color-scheme: dark;
  --background: #000000;
  --foreground: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --muted-strong: rgba(255, 255, 255, 0.9);
  --panel: rgba(255, 255, 255, 0.05);
  --panel-hover: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding: clamp(1rem, 4vw, 2.5rem);
}

.art {
  display: grid;
  place-items: center;
  min-height: 0;
}

.mark {
  display: block;
  width: min(84vw, 560px);
  max-height: min(68vh, 560px);
  aspect-ratio: 1;
  object-fit: contain;
}

.mark-fallback {
  display: none;
  width: min(84vw, 560px);
  max-height: min(68vh, 560px);
  aspect-ratio: 1;
  object-fit: contain;
}

.mark.is-hidden {
  display: none;
}

.mark.is-ended {
  animation: none;
}

.mark-fallback.is-visible {
  display: block;
}

.credit {
  display: flex;
  justify-content: center;
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.credit-link {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(0.77rem, 1.6vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition:
    background-color 180ms ease,
    color 180ms ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.credit-link:hover,
.credit-link:focus-visible {
  color: var(--muted-strong);
  background: var(--panel-hover);
}

@media (max-width: 520px) {
  .stage {
    gap: 0.6rem;
    padding: 0.75rem 0.85rem 0.95rem;
  }

  .art {
    transform: translateY(-2.5vh);
  }

  .mark {
    width: min(86vw, 348px);
    max-height: min(54vh, 320px);
  }

  .mark-fallback {
    width: min(86vw, 348px);
    max-height: min(54vh, 320px);
  }

  .credit-link {
    padding: 0.38rem 0.68rem;
    font-size: 0.76rem;
  }
}
