:root {
  color-scheme: dark;
  --card-aspect: 7 / 5;
  --pointer-x: 50%;
  --pointer-y: 50%;
  --pointer-from-center: 0;
  --pointer-from-top: .5;
  --pointer-from-left: .5;
  --background-x: 50%;
  --background-y: 50%;
  --card-opacity: 0;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
img { -webkit-user-drag: none; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #000;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: -1;
  background: url("img/bg.webp") center / cover no-repeat;
  opacity: 1;
  pointer-events: none;
}
main {
  flex: 1;
  min-height: 0;
  padding: 24px 0;
  display: grid;
  place-items: center;
}
.site-disclaimer {
  margin: 0 auto;
  padding: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #ccc;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .1em;
  text-align: left;
  opacity: 0.5;
}
.site-disclaimer__text {
  min-width: 0;
  overflow-wrap: break-word;
}
.site-disclaimer__discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.site-disclaimer__discord img {
  display: block;
  width: 14px;
  height: 14px;
}
.card-slot,
.site-disclaimer {
  width: min(1000px, 80vw, calc(100vh * 5 / 7));
  width: min(1000px, 80vw, calc(100svh * 5 / 7));
}
@media (max-width: 640px) {
  .site-disclaimer {
    flex-direction: column;
    gap: 12px;
    font-size: 12px;
    text-align: center;
  }
  .site-disclaimer__discord img {
    width: 12px;
    height: 12px;
  }
}
.card-slot {
  container-type: inline-size;
  aspect-ratio: var(--card-aspect);
}
.card {
  --card-radius: 4.545455cqw;
  --glare-strength: .1;
  --px: 0cqw;
  --py: 0cqw;
  width: 100%;
  transform: translate3d(0cqw, 0cqw, 0.003788cqw);
  pointer-events: none;
  transform-style: preserve-3d;
}
.card,
.card__rotator {
  aspect-ratio: var(--card-aspect);
  border-radius: var(--card-radius);
}
.card__translater,
.card__rotator {
  display: grid;
  perspective: 227.272727cqw;
  will-change: transform, box-shadow;
  transform-origin: center;
  transform-style: preserve-3d;
}
.card__translater {
  position: relative;
  transform: translate3d(0, 0, calc(56.818182cqw + 0.003788cqw));
}
.card__rotator {
  width: 100%;
  transform: rotateY(var(--rotate-x)) rotateX(var(--rotate-y));
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0cqw 4cqw 8cqw -2cqw rgba(0,0,0,0.75),
    0 1cqw 6cqw -2cqw rgba(0,0,0,0.75);
}
.card__front {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-aspect);
  isolation: isolate;
  transform-style: flat;
  transform: translate3d(0cqw, 0cqw, 0.003788cqw);
  overflow: hidden;
  border-radius: var(--card-radius);
  background: #121212;
}
.card__front,
.card__front * {
  backface-visibility: hidden;
  pointer-events: none;
}
.card-scene,
.frame-plane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  isolation: isolate;
}
.card-scene { overflow: hidden; }
.character-plane {
  position: absolute;
  inset: -6.439394cqw;
  width: calc(100% + 12.878788cqw);
  height: calc(100% + 12.878788cqw);
  z-index: 2;
  isolation: isolate;
  transform: translate(calc(var(--px) * .35), calc(var(--py) * .35)) scale(1.03);
  will-change: transform;
}
.art-character {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}
.foil-surface { display: contents; }
.pin-field {
  --pin-label-width: 48px;
  --pin-label-height: 18px;
  color: #242424;
  position: absolute;
  top: 72%;
  left: 50%;
  width: 28cqw;
  height: 8cqw;
  min-height: 44px;
  border-radius: 5px;
  z-index: 3;
  transform: translate(-50%, -50%);
  isolation: isolate;
}
.pin-field::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid currentColor;
  border-radius: inherit;
  clip-path: polygon(
    0 0,
    calc(50% - var(--pin-label-width) / 2) 0,
    calc(50% - var(--pin-label-width) / 2) 3px,
    calc(50% + var(--pin-label-width) / 2) 3px,
    calc(50% + var(--pin-label-width) / 2) 0,
    100% 0, 100% 100%, 0 100%
  );
}
.pin-label {
  position: absolute;
  top: 1.5px;
  left: 50%;
  padding: 0 8px;
  transform: translate(-50%, -50%);
  color: inherit;
  font: 700 clamp(12px, 2cqw, 18px) / 1 "Segoe UI", Arial, sans-serif;
  pointer-events: auto;
  cursor: text;
}
.card__front .pin-input {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 8px;
  appearance: none;
  border: 3px solid transparent;
  border-radius: inherit;
  background: transparent;
  color: #242424;
  caret-color: #242424;
  font: 700 clamp(16px, 3cqw, 30px) / 1 "Segoe UI", Arial, sans-serif;
  text-align: center;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}
.pin-input:focus-visible {
  outline: none;
  outline-offset: 3px;
}
.pin-input::-ms-reveal {
  display: none;
}
.pin-etch {
  position: absolute;
  inset: calc(var(--pin-label-height) / -2) 0 0;
}
.card__shine {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  transform: translateZ(0.378788cqw);
  overflow: hidden;
  z-index: 2;
  background: transparent;
  background-size: cover;
  background-position: center;
  filter: brightness(.85) contrast(2.75) saturate(.65);
  mix-blend-mode: color-dodge;
  opacity: var(--card-opacity);
  will-change: transform, opacity, background-position, filter;
}
.card__shine::before,
.card__shine::after {
  grid-area: 1 / 1;
  transform: translateZ(0.378788cqw);
}
.card__shine::after { transform: translateZ(0.454545cqw); }

.effect-layer[data-effect="etched"] {
  --foil-brightness: .6;
  --etch-grain-size: 50cqw;
  --etch-grain-strength: .55;
}
.effect-layer[data-effect="etched"] .card__shine {
  --foil: url("img/etch.webp");
  background-blend-mode: soft-light, difference;
  background-image:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), #fff 5%, #000 50%, #fff 80%),
    linear-gradient(-45deg, #000 15%, #fff, #000 85%),
    var(--foil);
  background-position:
    center center,
    calc(100% * var(--pointer-from-left)) calc(100% * var(--pointer-from-top)),
    center center;
  background-size: 120% 120%, 200% 200%, cover;
  background-repeat: no-repeat;
  -webkit-mask-image: var(--foil);
  mask-image: var(--foil);
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-mode: alpha;
  filter: brightness(var(--foil-brightness)) contrast(1.5) saturate(1);
  mix-blend-mode: color-dodge;
  opacity: calc((1.5 * var(--card-opacity)) - var(--pointer-from-center));
}
.effect-layer[data-effect="etched"] .card__shine::before {
  content: "";
  background: url("img/grain.webp") center / var(--etch-grain-size) var(--etch-grain-size) repeat;
  mix-blend-mode: screen;
  opacity: var(--etch-grain-strength);
}
.frame-plane {
  --holo-strength: 1;
  --holo-transition: .6%;
  --holo-contrast: 2;
  z-index: 3;
}
.frame-shadow {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.foil-mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background: var(--mark) center / 100% 100% no-repeat;
}
.foil-mark .card__shine {
  -webkit-mask-image: var(--mark);
  mask-image: var(--mark);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-mode: alpha;
}
.foil-mark--silver {
  --mark: url("img/text.webp");
  --holo-tint: grayscale(1);
  --text-emboss-depth: .2cqw;
  --text-emboss-strength: .48;
}
.foil-mark--silver::before,
.foil-mark--silver::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: var(--text-emboss-strength);
  -webkit-mask-image: var(--mark), var(--mark);
  mask-image: var(--mark), var(--mark);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0, var(--emboss-offset) var(--emboss-offset);
  mask-position: 0 0, var(--emboss-offset) var(--emboss-offset);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
}
.foil-mark--silver::before {
  --emboss-offset: var(--text-emboss-depth);
  background: #000;
  mix-blend-mode: multiply;
}
.foil-mark--silver::after {
  --emboss-offset: calc(var(--text-emboss-depth) * -1);
  background: #fff;
  mix-blend-mode: screen;
}

.effect-layer[data-effect="silver-texture"] {
  --sunpillar-1: hsl(2, 100%, 73%);
  --sunpillar-2: #eea842;
  --sunpillar-3: hsl(93, 100%, 69%);
  --sunpillar-4: hsl(176, 100%, 76%);
  --sunpillar-5: hsl(228, 100%, 74%);
  --sunpillar-6: hsl(283, 100%, 73%);
  --angle: 133deg;
  --space: 5%;
}
.effect-layer[data-effect="silver-texture"] .card__shine {
  filter: brightness(.85) contrast(2.75) saturate(.65) var(--holo-tint);
  opacity: calc(var(--card-opacity) * var(--holo-strength));
}
.effect-layer[data-effect="silver-texture"] .card__shine::after {
  --sunpillar-clr-1: var(--sunpillar-6);
  --sunpillar-clr-2: var(--sunpillar-1);
  --sunpillar-clr-3: var(--sunpillar-2);
  --sunpillar-clr-4: var(--sunpillar-3);
  --sunpillar-clr-5: var(--sunpillar-4);
  --sunpillar-clr-6: var(--sunpillar-5);
  background-image: repeating-linear-gradient(calc(var(--angle)),
    var(--sunpillar-clr-1) calc(var(--space) * 1) calc(var(--space) * 2 - var(--holo-transition)),
    var(--sunpillar-clr-2) calc(var(--space) * 2) calc(var(--space) * 3 - var(--holo-transition)),
    var(--sunpillar-clr-3) calc(var(--space) * 3) calc(var(--space) * 4 - var(--holo-transition)),
    var(--sunpillar-clr-4) calc(var(--space) * 4) calc(var(--space) * 5 - var(--holo-transition)),
    var(--sunpillar-clr-5) calc(var(--space) * 5) calc(var(--space) * 6 - var(--holo-transition)),
    var(--sunpillar-clr-6) calc(var(--space) * 6) calc(var(--space) * 7 - var(--holo-transition)),
    var(--sunpillar-clr-1) calc(var(--space) * 7)
  );
  background-position:
    calc(50% + (50% - var(--background-x)) * 3)
    calc(50% + (50% - var(--background-y)) * 3);
  background-size: 400% 800%;
  content: "";
  filter: brightness(calc((var(--pointer-from-center) * .4) + .6)) contrast(var(--holo-contrast)) saturate(1.2);
  mix-blend-mode: difference;
}

.frame-geometry {
  position: absolute;
  inset: 0;
  border: 3.030303cqw solid #111;
  border-radius: 4.545455cqw;
  box-shadow: inset 0 0 0 .378788cqw #0000001f;
  z-index: 4;
}
.surface-glare {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  z-index: 6;
  background: radial-gradient(
    farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, .8) 10%,
    hsla(0, 0%, 100%, .65) 20%,
    hsla(0, 0%, 0%, .5) 90%
  );
  opacity: calc(var(--card-opacity) * var(--glare-strength));
  mix-blend-mode: overlay;
}
.border-etch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  z-index: 5;
  padding: 3.030303cqw;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  mix-blend-mode: color-dodge;
}
.border-etch[data-effect="etched"] .card__shine {
  --foil: none;
  -webkit-mask-image: none;
  mask-image: none;
}
