/* Original component: dexter-st, https://uiverse.io/dexter-st/slippery-bird-76
   MIT license: see LICENSE. */
html { min-height: 100%; background: #1c1c1c; }
body { margin: 0; font-family: Arial, sans-serif; color: #eae8e4; }
.page-heading { max-width: 600px; margin: 0 auto; padding: 32px 24px 12px; text-align: center; }
.page-heading h1 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 42px); letter-spacing: -1.5px; }
.page-heading p { margin: 0; color: #aaa7a3; font-size: 14px; line-height: 1.6; }
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 24px;
  box-sizing: border-box;
}
.sample { min-width: 0; }
.sample-title { font-size: 12px; font-weight: 400; letter-spacing: 0.5px; color: #b7b4b0; margin: 0; text-align: center; }
.ticket-stage { display: grid; place-items: center; min-height: 530px; padding: 22px 0; box-sizing: border-box; }
[hidden] { display: none !important; }
.chooser { display: flex; align-items: end; justify-content: center; gap: 12px; padding: 12px 20px; }
.variant-label { display: grid; gap: 6px; font-size: 11px; color: #aaa7a3; flex: 1; max-width: 260px; min-width: 0; }
button, select { font: 14px Arial, sans-serif; color: #eae8e4; background: #292929; border: 1px solid #555; border-radius: 6px; padding: 11px 14px; }
button { cursor: pointer; }
button:hover { background: #383838; }
button:focus-visible, select:focus-visible { outline: 2px solid #f0ce8b; outline-offset: 4px; }
select { width: 100%; max-width: 100%; box-sizing: border-box; }
.chooser button { flex: 0 0 auto; }
.selection-actions { text-align: center; padding: 0 20px 28px; }
#confirm { background: #ead7b5; color: #25221c; border-color: #ead7b5; font-weight: 700; padding: 13px 28px; }
#confirm:hover { background: #ffebc7; }
#change { border-color: transparent; background: transparent; color: #aaa7a3; font-size: 12px; }
#change:hover { color: #fff; }
#selection-status { font-size: 12px; color: #aaa7a3; }
.confirmed { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.confirmed .gallery { width: 100%; }
.confirmed .sample-title { display: none; }
.confirmed .ticket-stage { min-height: 0; padding: 24px 0 40px; }
.card {
  --width: 180px;
  --height: 320px;
  --perforation-size: 12px;
  --cutouts-adjust: 70px;

  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  grid-template-areas:
    "header"
    "body"
    "footer";

  width: var(--width);
  height: var(--height);
  padding: var(--perforation-size) 0;

  font-family: "Inter", sans-serif;
  font-size: 1rem;
  user-select: none;
  overflow: hidden;

  filter: drop-shadow(0 2px 1px #00000025) drop-shadow(0 4px 3px #00000025)
    drop-shadow(0 10px 9px #00000025) drop-shadow(0 20px 20px #00000025)
    drop-shadow(0 40px 40px #00000025);
  animation: hover 3s ease infinite;
  will-change: transform, filter;
}

@keyframes hover {
  50% {
    filter: drop-shadow(0 4px 3px #00000015) drop-shadow(0 6px 6px #00000015)
      drop-shadow(0 16px 14px #00000015) drop-shadow(0 30px 28px #00000015)
      drop-shadow(0 60px 60px #00000015);
    transform: translateY(-7px) scale(1.02);
  }
}

.filter {
  position: absolute;
}

.bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: #fff;
  filter: url(#bump);
  mask:
    /* top perforations */
    radial-gradient(
      circle at 50% 0,
      #fff0 calc(var(--perforation-size) - 5px),
      #000 calc(var(--perforation-size) - 4px)
    ),
    /* bottom perforations */
      radial-gradient(
        circle at 50% 100%,
        #fff0 calc(var(--perforation-size) - 5px),
        #000 calc(var(--perforation-size) - 4px)
      ),
    /* left notch */
      radial-gradient(circle 8px at left center, #000 98%, #0000 100%),
    /* right notch */
      radial-gradient(circle 8px at right center, #000 98%, #0000 100%),
    /* cut perforation */
      repeating-linear-gradient(
        90deg,
        #000 10px,
        #000 15px,
        #0000 16px,
        #0000 24px
      );

  mask-repeat: repeat-x, repeat-x, no-repeat, no-repeat, repeat-x;

  mask-size:
    calc(var(--perforation-size) * 2) 100%,
    calc(var(--perforation-size) * 2) 100%,
    16px 16px,
    16px 16px,
    10px 2px;

  mask-position:
    calc(0.5 * var(--perforation-size)) top,
    calc(0.5 * var(--perforation-size)) bottom,
    left var(--cutouts-adjust),
    right var(--cutouts-adjust),
    0 calc(var(--cutouts-adjust) + 7px);

  mask-composite: intersect, exclude, add, add;
}

.holographic {
  background-image: linear-gradient(to bottom, #fe58, 90%, #0002),
    conic-gradient(
      at 60% 50%,
      #ccc,
      #ff6bfe,
      #00f9f8,
      #ddd,
      #0081fd,
      #eef0bc,
      #0081fd,
      #ff6bfe,
      #0002,
      #0081fd,
      #ddd,
      #01fefb,
      #ccc
    );
}
.holographic::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 70% 20%, #f0f, #0000),
    repeating-radial-gradient(circle at 30% 80%, #fff, #f4a 48px, #eeeeee 150px);
  mix-blend-mode: color-burn;
}
.holographic::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, #f205, #f00, #0f0, #f205);
  mix-blend-mode: difference;

  animation: bg-pos 3s ease-in-out infinite alternate;
  background-position: 0 0;
  background-size: 100% 300%;
  background-repeat: repeat;
}

@keyframes bg-pos {
  to {
    background-position: 0 500px;
  }
}

.header {
  position: relative;
  grid-area: header;
  margin: 0 8px;
  text-align: center;
  z-index: 1;
  font-family: "Impact", sans-serif;
  font-size: 2.75rem;
  letter-spacing: 2px;
  color: #ffffff9f;
  text-shadow: 0 0 0 #000;
  -webkit-text-stroke: #fff 0.5px;
  mix-blend-mode: difference;
}

.body {
  grid-area: body;
  margin: 0 1em;
  padding: 0.5em;
  font-weight: 200;
  z-index: 1;
}

.footer {
  grid-area: footer;
  z-index: 1;

  margin: 0 1em 1em 1em;
}

.number {
  margin-bottom: 0.75rem;
  text-align: center;
  border-radius: 999px 0;
  color: #000;
  font-weight: 200;
  .bold {
    font-weight: 600;
  }
}

.barcode {
  justify-self: center;
  width: 0;
  height: 32px;
  box-shadow:
    0px 0 0 1px #000,
    5px 0 0 1px #000,
    7px 0 0 1px #000,
    11px 0 0 1px #000,
    15px 0 0 1px #000,
    16px 0 0 1px #000,
    22px 0 0 1px #000,
    27px 0 0 1px #000,
    30px 0 0 1px #000,
    35px 0 0 1px #000,
    36px 0 0 1px #000,
    39px 0 0 1px #000,
    43px 0 0 1px #000,
    47px 0 0 1px #000,
    50px 0 0 1px #000,
    55px 0 0 1px #000,
    59px 0 0 1px #000,
    60px 0 0 1px #000,
    64px 0 0 1px #000,
    69px 0 0 1px #000,
    70px 0 0 1px #000,
    74px 0 0 1px #000;
  transform: translateX(37px);
}

.symbol {
  position: absolute;
  top: 1.3em;
  right: 0px;
  rotate: 185deg;
  font-size: 1.1em;
  color: #fff;
  line-height: 0.5;
  opacity: 0.2;
}
.notes {
  position: absolute;
  inset: 108px 10px auto;
  height: 95px;
  overflow: hidden;
  font: 22px/1.5 'Courier New', monospace;
  overflow-wrap: anywhere;
  color: #263448;
  opacity: 0.11;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
  animation: signal-drift 4.7s steps(2, end) infinite;
}
.notes:nth-child(2) { top: 208px; }
.notes:nth-child(3) { top: 308px; }
@keyframes signal-drift {
  0%, 80%, 100% { opacity: 0.09; transform: translateX(0); }
  84%, 94% { opacity: 0.16; transform: translateX(1px); }
  90% { opacity: 0.12; transform: translateX(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .card, .holographic::after, .notes { animation: none; }
}

/* Shared ticket layout: the original foil, perforation and motion stay intact. */
.card {
  --width: 260px;
  --height: 440px;
  --cutouts-adjust: 78px;
  width: min(var(--width), 100%);
  color: #191b22;
  gap: 22px;
}
.header {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 20px 8px 0;
  color: #171923;
  mix-blend-mode: normal;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.body { margin: 0 24px; padding: 0; display: grid; align-items: center; }
.countdown { width: 100%; }
.countdown-row { display: flex; align-items: baseline; justify-content: center; text-align: center; padding: 9px 0; }
.countdown-row strong { font: 600 32px/1.2 'Courier New', monospace; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.footer { margin: 0 18px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.number { font-size: 16px; font-weight: 700; letter-spacing: -0.6px; margin-bottom: 0; white-space: nowrap; }
.barcode { display: block; width: 204px; max-width: 100%; height: 32px; flex: none; margin: 0; transform: none; box-shadow: none; }
.has-error .countdown-row:last-child strong { text-shadow: 1px 0 #d3426e, -1px 0 #268b99; }
.terminal .body { color: #12352c; }
.big { --height: 470px; }
.big .header { font-family: Arial, sans-serif; font-size: 30px; font-weight: 900; letter-spacing: -1.3px; }
.lilac .bg { background-color: #e4c9ef; }
.lilac .holographic::after { opacity: 0.48; }
.technical .header { font-family: 'Courier New', monospace; font-size: 30px; font-weight: 900; }
.wide { --width: 294px; --height: 400px; }
.wide .body { margin: 0 22px; }
.quiet .holographic::before { opacity: 0.3; }
.quiet .holographic::after { opacity: 0.35; }
.paper { --width: 242px; --height: 470px; }
.paper .header { font-family: 'Courier New', monospace; font-size: 28px; font-weight: 900; }
.paper .number { font-family: 'Courier New', monospace; font-size: 14px; }
.night .body { color: #25233d; }
.stamp .number { font-size: 16px; }
.card .header, .card .number { font-family: 'Courier New', monospace; font-weight: 600; }
.card .header { font-size: 30px; letter-spacing: -1.3px; }
.clean .body { margin: 0 18px; padding-top: 0; }
/* Two-tone foil palettes replace the rainbow; motion stays shared. */
.card { --foil-a: #b78a48; --foil-b: #f5db9a; --foil-c: #c79650; --ink: #30271c; color: var(--ink); }
.terminal { --foil-a: #7eabbc; --foil-b: #dfedf1; --foil-c: #abc6d6; --ink: #20333f; }
.big { --foil-a: #b87659; --foil-b: #f3d3ac; --foil-c: #d59b76; --ink: #1f1612; }
.lilac { --foil-a: #451e34; --foil-b: #79354b; --foil-c: #522437; --ink: #ffe9d3; }
.technical { --foil-a: #142b24; --foil-b: #234d39; --foil-c: #173328; --ink: #bcf5a7; }
.wide { --foil-a: #d0c5b4; --foil-b: #fff9e8; --foil-c: #ded6c6; --ink: #3c3830; }
.quiet { --foil-a: #143f46; --foil-b: #28616a; --foil-c: #1c444f; --ink: #f4dfac; }
.paper { --foil-a: #bc8069; --foil-b: #f1cbb0; --foil-c: #d6a48c; --ink: #2b1914; }
.night { --foil-a: #202e45; --foil-b: #415b78; --foil-c: #2a354b; --ink: #e3edf5; }
.lost { --foil-a: #b4ad84; --foil-b: #ece2b9; --foil-c: #c7c09e; --ink: #353c2a; }
.stamp { --foil-a: #593954; --foil-b: #875b75; --foil-c: #654158; --ink: #ffe4d9; }
.clean { --foil-a: #999b9a; --foil-b: #e3e3df; --foil-c: #b8bcb9; --ink: #262b2b; }
.card .holographic { background-color: var(--foil-b); background-image: linear-gradient(125deg, var(--foil-a), var(--foil-b) 48%, var(--foil-c)); }
.card .holographic::before { background: repeating-linear-gradient(125deg, #ffffff06 0 2px, transparent 2px 5px); mix-blend-mode: soft-light; opacity: 1; }
.card .holographic::after { background-image: linear-gradient(160deg, transparent 20%, #ffffff29 42%, #ffffff05 55%, transparent 75%); mix-blend-mode: soft-light; opacity: 1; }
.card .header, .card .number, .card .body, .card .notes { color: var(--ink); }
.card.finish-glow .holographic { background-image: radial-gradient(ellipse at 50% 48%, var(--foil-b), var(--foil-a) 85%); }
.card.finish-brushed .holographic { background-image: linear-gradient(105deg, var(--foil-a), var(--foil-b) 36%, var(--foil-c) 63%, var(--foil-b) 78%, var(--foil-a)); }
.card.finish-brushed .holographic::before { background: repeating-linear-gradient(0deg, #ffffff12 0 1px, #00000008 1px 2px, transparent 2px 4px); }
.card.finish-matte .holographic { background-image: linear-gradient(160deg, var(--foil-b), var(--foil-c)); }
.card.finish-matte .holographic::after { opacity: 0.18; }
.card.finish-split .holographic { background-image: linear-gradient(145deg, var(--foil-a) 0 32%, var(--foil-b) 32% 70%, var(--foil-c) 70%); }
@media (max-width: 600px) {
  .page-heading { padding: 28px 20px 8px; }
  .gallery { padding: 20px; grid-template-columns: minmax(0, 1fr); }
  .ticket-stage { min-height: 530px; }
  .chooser { gap: 8px; padding-inline: 16px; }
  .chooser button { padding-inline: 12px; }
  .variant-label { min-width: 0; }
  select { padding-inline: 8px; }
}
