@font-face {
  font-family: "Shrikhand";
  src: url("fonts/shrikhand-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ground: #06281c;
  --red: #cb1220;
  --red-deep: #8f0915;
  --red-ink: #a80d19;
  --green: #0b5b3d;
  --green-deep: #073f2a;
  --gold: #ffc531;
  --gold-light: #ffe68f;
  --gold-deep: #a86a00;
  --paper: #fff5dc;
  --paper-line: #e6d3a6;
  --ink: #2b0a0d;
  --silver: #c5c9cf;

  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;

  --pad: clamp(1.15rem, 5.5vw, 1.75rem);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --slam: cubic-bezier(0.5, 0, 0.9, 0.4);
}

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

html {
  background: var(--ground);
  color-scheme: dark;
  scrollbar-color: var(--red) var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  font: 500 1.125rem/1.45 var(--body);
  color: var(--paper);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 197, 49, 0.1) 0 1.5px, transparent 2px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgba(255, 245, 220, 0.08) 0 1px, transparent 1.5px) 0 0 / 46px 46px,
    radial-gradient(120% 80% at 50% 0%, #0b3a28, var(--ground) 70%);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 6px;
}
.ticket--wish :focus-visible,
.ticket--count :focus-visible,
.scratch :focus-visible,
.notice :focus-visible {
  outline-color: var(--red-deep);
}

h1,
h2,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}

.defs {
  position: absolute;
}
symbol path,
symbol circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#i-star path {
  fill: currentColor;
  stroke: none;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* ---------- the strip of tickets ---------- */

.strip {
  display: grid;
  gap: 0;
  width: min(100%, 31rem);
  margin-inline: auto;
  padding: max(0.75rem, env(safe-area-inset-top)) 0.6rem max(2.5rem, env(safe-area-inset-bottom));
}

.ticket {
  position: relative;
  padding: calc(var(--pad) * 1.15) var(--pad) calc(var(--pad) * 1.35);
  overflow: hidden;
  isolation: isolate;
}
.col > .ticket:first-child {
  border-radius: 1.1rem 1.1rem 0 0;
}
.col:last-child > .ticket:last-child {
  border-radius: 0 0 1.1rem 1.1rem;
}

.perf {
  display: block;
  position: relative;
  height: 0;
  z-index: 3;
}
.perf::before {
  content: "";
  position: absolute;
  inset: -12px -1px auto;
  height: 24px;
  background:
    radial-gradient(circle at 0 50%, var(--ground) 11px, transparent 11.6px),
    radial-gradient(circle at 100% 50%, var(--ground) 11px, transparent 11.6px);
}
.perf::after {
  content: "";
  position: absolute;
  inset: -2.5px 20px auto;
  height: 5px;
  background: radial-gradient(circle, var(--ground) 2px, transparent 2.6px) 0 0 / 13px 5px repeat-x;
}

h2 {
  font: 400 clamp(1.9rem, 8.6vw, 2.5rem) / 1 var(--display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.fine,
.lede,
.count-note {
  font-size: 1rem;
}

/* ---------- main ticket ---------- */

.ticket--main {
  background: var(--red);
  padding-top: var(--pad);
  min-height: min(46rem, calc(100svh - 1.5rem));
  display: flex;
  flex-direction: column;
}

.rays {
  position: absolute;
  left: 50%;
  top: 11.5rem;
  width: 120rem;
  height: 120rem;
  translate: -50% -50%;
  z-index: -1;
  background: repeating-conic-gradient(rgba(143, 9, 21, 0) 0 6deg, rgba(143, 9, 21, 0.5) 6deg 12deg);
  animation: spin 240s linear infinite;
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.orn {
  position: absolute;
  z-index: -1;
  overflow: visible;
}
.orn path,
.twig path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.orn--a {
  width: 9.5rem;
  left: -3.2rem;
  top: 17rem;
  color: rgba(255, 230, 143, 0.5);
  animation: sway 14s ease-in-out infinite alternate;
}
.orn--b {
  width: 6rem;
  right: -1.6rem;
  bottom: 5rem;
  color: rgba(255, 245, 220, 0.42);
  animation: sway 18s ease-in-out infinite alternate-reverse;
}
.orn--c {
  width: 8rem;
  right: -2.4rem;
  top: -2.2rem;
  color: rgba(143, 9, 21, 0.3);
  animation: sway 16s ease-in-out infinite alternate;
}
@keyframes sway {
  from {
    rotate: -14deg;
  }
  to {
    rotate: 16deg;
  }
}

.will-draw path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.will-draw.is-drawn path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.2s var(--out);
}

.ticket-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font: 700 0.95rem/1 var(--label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.holder {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.holder strong {
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--paper);
}
.serial {
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: rgba(143, 9, 21, 0.55);
  color: var(--gold-light);
  cursor: pointer;
  transition:
    transform 0.25s var(--out),
    background-color 0.2s;
}
.icon-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}
.icon-btn:hover {
  background: var(--red-deep);
}
.icon-btn:active {
  transform: scale(0.92);
}

.logo {
  position: relative;
  margin: 1.5rem 0 0;
  font: 400 1rem/0.8 var(--display);
  rotate: -5deg;
  transform-origin: 20% 50%;
}
.logo-word {
  position: relative;
  display: block;
  width: max-content;
  color: var(--gold);
  text-shadow:
    1px 1px 0 var(--red-deep),
    2px 2px 0 var(--red-deep),
    3px 3px 0 var(--red-deep),
    4px 4px 0 var(--red-deep),
    5px 5px 0 #5e040c,
    6px 6px 0 #5e040c,
    9px 12px 14px rgba(40, 0, 4, 0.45);
}
.logo-word--small {
  font-size: clamp(2.3rem, 12vw, 3.6rem);
  margin-left: 0.15em;
}
.logo-word--big {
  font-size: clamp(4rem, 21.5vw, 6.5rem);
  letter-spacing: -0.02em;
  margin-top: 0.06em;
}
.logo-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #fffbe6;
  text-shadow: none;
  -webkit-mask: linear-gradient(105deg, transparent 42%, #000 50%, transparent 58%) 0 0 / 300% 100% no-repeat;
  mask: linear-gradient(105deg, transparent 42%, #000 50%, transparent 58%) 0 0 / 300% 100% no-repeat;
  animation: sheen 6s ease-in-out infinite;
}
.logo-word--big::after {
  animation-delay: 0.35s;
}
@keyframes sheen {
  0%,
  55% {
    -webkit-mask-position: 120% 0;
    mask-position: 120% 0;
  }
  85%,
  100% {
    -webkit-mask-position: -20% 0;
    mask-position: -20% 0;
  }
}

.burst {
  position: absolute;
  top: clamp(9.4rem, 43vw, 10.8rem);
  right: -0.7rem;
  width: clamp(6.6rem, 31vw, 8.2rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  rotate: 12deg;
  animation: wobble 3.2s ease-in-out infinite alternate;
  filter: drop-shadow(3px 5px 6px rgba(40, 0, 4, 0.4));
}
.burst svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #ffe21a;
  animation: spin 40s linear infinite;
}
.burst span {
  position: relative;
  font: 700 clamp(1.05rem, 5vw, 1.35rem) / 0.95 var(--label);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--red-ink);
}
@keyframes wobble {
  from {
    transform: scale(0.96) rotate(-3deg);
  }
  to {
    transform: scale(1.05) rotate(3deg);
  }
}

.play {
  margin-top: auto;
  padding-top: 1.75rem;
}

.scratch {
  position: relative;
  aspect-ratio: 5 / 4.2;
  border-radius: 1.1rem;
  background: var(--paper);
  box-shadow:
    0 0 0 3px var(--gold),
    0 0 0 7px var(--red-deep),
    0 14px 26px rgba(40, 0, 4, 0.45);
}
.prize {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: inherit;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 14% 22%, var(--gold) 0 3px, transparent 3.5px),
    radial-gradient(circle at 86% 30%, var(--red) 0 2.5px, transparent 3px),
    radial-gradient(circle at 78% 82%, var(--gold) 0 3.5px, transparent 4px),
    radial-gradient(circle at 20% 78%, var(--green) 0 2.5px, transparent 3px),
    radial-gradient(circle at 50% 10%, var(--green) 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, #fffdf3, var(--paper) 75%);
}
.prize-label {
  font: 700 clamp(0.95rem, 4.4vw, 1.15rem) / 1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-ink);
}
.prize-name {
  min-height: 1em;
  font: 400 clamp(3rem, 17vw, 5.2rem) / 1 var(--display);
  color: var(--red);
  text-shadow:
    2px 2px 0 var(--gold),
    4px 4px 0 var(--gold-deep);
}
.prize-name:empty::before {
  content: "";
  display: block;
  width: 3.2em;
  height: 0.7em;
  margin-top: 0.15em;
  border-radius: 0.35em;
  background: var(--paper-line);
  animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.4;
  }
}
.prize-name.pop {
  animation: pop 0.7s var(--out);
}
@keyframes pop {
  from {
    scale: 0.4;
    rotate: -8deg;
    filter: blur(6px);
  }
}

.latex {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: none;
  cursor:
    url("coin.svg") 20 20,
    crosshair;
}
.latex.is-spent {
  pointer-events: none;
}

.seal {
  position: absolute;
  inset: 22% 7% 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 0.8rem;
  cursor: pointer;
  font: 700 clamp(1.1rem, 5.2vw, 1.4rem) / 1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.34) 0 7px, rgba(255, 255, 255, 0) 7px 22px),
    linear-gradient(160deg, var(--gold-light), var(--gold) 45%, #e39a12);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.55),
    inset 0 0 0 4px var(--gold-deep),
    0 6px 14px rgba(43, 10, 13, 0.35);
  transform-origin: 50% 0;
  animation: seal-on 0.5s var(--out);
}
.seal svg {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
}
.seal:hover {
  filter: brightness(1.06);
}
.seal:active {
  transform: translateY(2px);
}
@keyframes seal-on {
  from {
    transform: perspective(600px) rotateX(-80deg);
    opacity: 0;
  }
}

.stamp {
  display: inline-block;
  padding: 0.18em 0.5em 0.14em;
  border: 0.14em double currentColor;
  border-radius: 0.3em;
  font: 700 1.2rem/1 var(--label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-ink);
  rotate: -9deg;
  filter: url("#ink");
}
.stamp--win {
  position: absolute;
  right: -0.4rem;
  top: -1.1rem;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  rotate: 11deg;
  background: var(--paper);
  z-index: 2;
}
.stamp.slam {
  animation: slam 0.32s var(--slam) both;
}
@keyframes slam {
  from {
    scale: 3.4;
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
}
.jolt {
  animation: jolt 0.42s 0.3s var(--out);
}
@keyframes jolt {
  0% {
    transform: translate(0, 5px) rotate(-0.5deg);
  }
  35% {
    transform: translate(-2px, -3px) rotate(0.4deg);
  }
  70% {
    transform: translate(1px, 1px);
  }
}

.hint {
  margin-top: 1.15rem;
  max-width: 26ch;
  font-weight: 600;
  text-wrap: balance;
}
.play-actions {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.35rem;
  min-height: 2.75rem;
}
.text-btn {
  padding: 0.6rem 0;
  min-height: 2.75rem;
  border: 0;
  background: none;
  cursor: pointer;
  font: 700 1.05rem/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.text-btn:hover {
  color: #fff;
}

.notice {
  margin-top: auto;
  padding: 1.5rem 1.25rem 1.6rem;
  border-radius: 1.1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    0 0 0 3px var(--gold),
    0 0 0 7px var(--red-deep);
}
.notice p {
  margin-top: 0.9rem;
  font-weight: 600;
  max-width: 30ch;
}
.notice .btn {
  margin-top: 1.1rem;
}
.stamp--void {
  font-size: 2.1rem;
}

/* ---------- win ticket ---------- */

.ticket--win {
  background: var(--green-deep);
  padding-top: 3.6rem;
  animation: unroll 0.9s var(--out);
}
@keyframes unroll {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0);
  }
}
.twig {
  position: absolute;
  inset: 0.5rem 0 auto;
  width: 100%;
  height: 2.6rem;
  color: var(--gold);
  opacity: 0.85;
}
.ticket--win h2 {
  color: var(--gold);
}
.veiled {
  display: none;
  font-weight: 600;
  max-width: 28ch;
}
[data-peek="off"] .secret {
  display: none;
}
[data-peek="off"] .veiled {
  display: block;
}

.wishes {
  margin-top: 1.1rem;
}
.wishes li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.55rem 0;
  border-bottom: 2px dotted rgba(255, 230, 143, 0.4);
}
.wishes li > svg {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--gold);
}
.wish-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.wish-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0 0.35rem;
  font: 700 1rem/1 var(--label);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-underline-offset: 0.25em;
}
.wish-link svg {
  width: 1.15rem;
  height: 1.15rem;
}
.wishes li.is-new {
  animation: write-in 0.6s var(--out);
}
@keyframes write-in {
  from {
    clip-path: inset(0 100% 0 0);
    translate: -0.5rem 0;
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
.empty {
  margin-top: 1rem;
  font-weight: 500;
  max-width: 30ch;
}

.punch {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.9rem;
  min-height: 3.25rem;
  cursor: pointer;
  font: 700 1.3rem/1.1 var(--label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.punch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.punch-box {
  flex: none;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px dashed var(--gold-light);
  border-radius: 50%;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}
.punch-box::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--ground);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.7);
  scale: 0;
  transition: scale 0.28s var(--slam);
}
.punch input:checked + .punch-box {
  border-style: solid;
  border-color: var(--gold);
}
.punch input:checked + .punch-box::after {
  scale: 1;
}
.punch input:focus-visible + .punch-box {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}
.ticket--win .fine {
  margin-top: 0.5rem;
  max-width: 34ch;
  color: #cfe3d6;
}

/* ---------- countdown ticket ---------- */

.ticket--count {
  background: var(--gold);
  color: var(--ink);
}
.ticket--count h2 {
  color: var(--red-ink);
}
.balls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.4rem, 2.4vw, 0.9rem);
  margin-top: 1.25rem;
}
.balls li {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}
.ball {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 5.6rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #ff6a5e, var(--red) 46%, var(--red-deep));
  box-shadow:
    inset -4px -6px 10px rgba(40, 0, 4, 0.3),
    0 7px 9px -3px rgba(92, 50, 0, 0.55);
}
.ball--green {
  background: radial-gradient(circle at 32% 26%, #35b07c, var(--green) 46%, var(--green-deep));
}
.ball b {
  display: grid;
  place-items: center;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  font: 700 clamp(1.45rem, 7.4vw, 2.1rem) / 1 var(--label);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ball.roll {
  animation: roll 0.7s var(--out);
}
@keyframes roll {
  from {
    rotate: -200deg;
    translate: 0 -0.5rem;
  }
}
.ball.tick b {
  animation: tick 0.3s var(--out);
}
@keyframes tick {
  from {
    scale: 1.14;
  }
}
.balls small {
  font: 700 0.95rem/1 var(--label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.count-note {
  margin-top: 1.2rem;
  font-weight: 600;
}

/* ---------- my wish list ---------- */

.ticket--wish {
  background: var(--paper);
  color: var(--ink);
  caret-color: var(--red);
}
.ticket--wish h2 {
  color: var(--red);
}
.lede {
  margin-top: 0.5rem;
  font-weight: 600;
  color: #5b2a1c;
}
.ticket--wish .wishes li {
  border-bottom-color: #d9bf85;
}
.ticket--wish .wishes li > svg {
  color: var(--red);
}
.ticket--wish .wish-link {
  color: var(--red-ink);
}
.ticket--wish .empty {
  color: #5b2a1c;
}
.remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #7a4a3a;
  cursor: pointer;
  transition:
    color 0.15s,
    background-color 0.15s;
}
.remove svg {
  width: 1.2rem;
  height: 1.2rem;
}
.remove:hover {
  color: var(--paper);
  background: var(--red);
}

.wish-form {
  display: grid;
  margin-top: 1.9rem;
}
.wish-form label {
  font: 700 1rem/1 var(--label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red-ink);
}
.wish-form label span {
  color: #6b4a3c;
  letter-spacing: 0.05em;
}
.wish-form input {
  width: 100%;
  margin: 0.4rem 0 1.15rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 0.6rem;
  background: #fffdf5;
  font-weight: 500;
}
.wish-form input::placeholder {
  color: #7d6a55;
  opacity: 1;
}
.wish-form input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 1px;
  border-radius: 0.6rem;
}
.form-msg {
  font-weight: 600;
  color: var(--red-ink);
}
.form-msg:not(:empty) {
  margin-bottom: 0.9rem;
}
.shake {
  animation: shake 0.4s var(--out);
}
@keyframes shake {
  20% {
    translate: -7px 0;
  }
  45% {
    translate: 6px 0;
  }
  70% {
    translate: -3px 0;
  }
}

.btn {
  justify-self: start;
  min-height: 3.1rem;
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: 0.6rem;
  cursor: pointer;
  font: 700 1.25rem/1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--red);
  box-shadow:
    inset 0 0 0 2px var(--red),
    inset 0 0 0 4px var(--gold),
    0 5px 0 var(--red-deep),
    0 9px 12px rgba(43, 10, 13, 0.3);
  transition:
    transform 0.12s var(--out),
    box-shadow 0.12s var(--out),
    background-color 0.15s;
}
.btn:hover {
  background: #dd1a29;
}
.btn:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 0 0 2px var(--red),
    inset 0 0 0 4px var(--gold),
    0 1px 0 var(--red-deep),
    0 2px 4px rgba(43, 10, 13, 0.3);
}

/* ---------- stubs ---------- */

.ticket--stubs {
  background: var(--red);
}
.ticket--stubs h2 {
  color: var(--gold);
}
.stubs {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.2rem;
}
.stub {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  min-height: 3.9rem;
  padding: 0.55rem 0.9rem 0.55rem 1.6rem;
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 8px rgba(40, 0, 4, 0.3);
}
.stub::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0.72rem;
  border-left: 2px dashed #cfb783;
}
.stub-name {
  margin-right: auto;
  padding-left: 0.2rem;
  font: 700 1.45rem/1 var(--label);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stub-name small {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #6b4a3c;
}
.stub-marks {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 0.7rem;
}
.stub .stamp {
  font-size: 1.2rem;
}
.stub .stamp--gift {
  color: var(--green);
  rotate: 5deg;
}
.stub-wait {
  font: 600 1rem/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b4a3c;
}

/* ---------- rules ---------- */

.ticket--rules {
  background: var(--green-deep);
  padding-top: 3.6rem;
  color: #dcebe1;
}
.ticket--rules h2 {
  color: var(--gold);
  font-size: clamp(1.5rem, 7vw, 1.9rem);
}
.ticket--rules ol {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-left: 1.5rem;
  list-style: decimal;
  font-size: 1rem;
  line-height: 1.4;
}
.ticket--rules li::marker {
  font: 700 1rem var(--label);
  color: var(--gold);
}
.barcode {
  display: flex;
  align-items: stretch;
  height: 3.4rem;
  width: min(100%, 15rem);
  margin-top: 1.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.3rem;
  background: var(--paper);
}
.barcode i {
  background: var(--ink);
}

/* ---------- states ---------- */

[data-state="loading"] [data-needs],
[data-state="invalid"] [data-needs],
[data-state="error"] [data-needs],
[data-state="invalid"] .play,
[data-state="error"] .play,
[data-state="loading"] .play-actions,
[data-drawn="no"] [data-needs="drawn"] {
  display: none;
}
[data-state="loading"] .latex {
  animation: pulse 0.9s ease-in-out infinite alternate;
}
[data-state="invalid"] .col > .ticket--main,
[data-state="error"] .col > .ticket--main {
  border-radius: 1.1rem;
}
[data-state="invalid"] .burst,
[data-state="error"] .burst {
  display: none;
}

.noscript {
  margin: 1rem;
  padding: 1rem;
  border-radius: 0.6rem;
  background: var(--paper);
  color: var(--ink);
}

/* ---------- wide screens: tickets tossed on the table ---------- */

@media (min-width: 62rem) {
  .strip {
    grid-template-columns: 29rem 27rem;
    justify-content: center;
    align-items: start;
    gap: 3.5rem;
    width: auto;
    padding-block: 3rem 5rem;
  }
  .col:first-child {
    rotate: -1.2deg;
    position: sticky;
    top: 2rem;
  }
  .col:last-child {
    rotate: 0.9deg;
    margin-top: 2.5rem;
  }
  .col > .ticket:last-child {
    border-radius: 0 0 1.1rem 1.1rem;
  }
  .col > .ticket:only-child,
  [data-drawn="no"] .ticket--main {
    border-radius: 1.1rem;
  }
  .perf--stack {
    display: none;
  }
  .perf--stack + .ticket {
    border-radius: 1.1rem 1.1rem 0 0;
  }
  .ticket--main {
    min-height: 44rem;
  }
  .scratch {
    aspect-ratio: 5 / 3.5;
  }
  .burst {
    top: 8.4rem;
  }
  .col {
    filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.45));
  }
}

@media (max-height: 44rem) and (min-width: 62rem) {
  .col:first-child {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .logo-word::after {
    display: none;
  }
}

[data-state="invalid"] .holder,
[data-state="error"] .holder {
  visibility: hidden;
}
