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

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0a0908;
  color: #c4bbb0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse 70% 58% at 50% 46%, #161210 0%, #0b0a09 55%, #070706 100%);
}

main {
  width: 100%;
  padding: 2.5vh 4vw 4vh;
}

.piece {
  margin: 0 auto;
  width: min(94vw, 880px);
}

.crt-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1860 / 1750;
}

.crt-stage canvas,
.crt-stage .fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.crt-stage canvas {
  display: block;
}
.crt-stage .fallback[hidden] {
  display: none !important;
}

.fallback .split,
.fallback .ch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

.fallback .split {
  background: #000;
  filter: url(#underwater);
}

.fallback .ch {
  mix-blend-mode: screen;
}

.fallback .ch-r {
  filter: url(#iso-r);
  transform: translate(calc(var(--split, 1.6px) * -1), 0);
}

.fallback .ch-g {
  filter: url(#iso-g);
}

.fallback .ch-b {
  filter: url(#iso-b);
  transform: translate(var(--split, 1.6px), 0);
}

.crt-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: block;
}

.crt-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.links {
  display: flex;
  justify-content: center;
  gap: 2.4em;
  margin: 0.2rem 0 0;
  padding: 0;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
  text-align: center;
}

.links a {
  color: #c9c0b4;
  text-decoration: none;
}

.links a:hover,
.links a:focus-visible {
  color: #f4efe8;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fallback .split {
    filter: none;
  }
}
