:root {
  --night: #0e0612;
  --night-2: #1b0c22;
  --cream: #fff6e6;
  --cream-70: rgba(255, 246, 230, 0.72);
  --cream-50: rgba(255, 246, 230, 0.5);
  --gold: #f7c548;
  --gold-text: linear-gradient(180deg, #fff4c9 8%, #f7c548 50%, #d08a17 95%);
  --gold-foil: linear-gradient(115deg, #fff1c2 0%, #f7c548 32%, #e3a12a 58%, #ffe39a 80%, #f0b33a 100%);
  --coral: #ff4f5e;
  --coral-glow: 0 0 0.3em rgba(255, 79, 94, 0.6), 0 0 1em rgba(255, 79, 94, 0.35);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", Roboto, system-ui, sans-serif;
  --script: "Shrikhand", "Bricolage Grotesque", Georgia, serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--night);
  color: var(--cream);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Slow disco light drifting behind everything */
.glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow span {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  animation: drift 26s ease-in-out infinite alternate;
}
.glow span:nth-child(1) { top: 5%; left: -30%; background: radial-gradient(circle, rgba(247, 197, 72, 0.13), transparent 62%); }
.glow span:nth-child(2) { top: 35%; right: -35%; background: radial-gradient(circle, rgba(255, 79, 94, 0.12), transparent 62%); animation-duration: 32s; }
.glow span:nth-child(3) { bottom: -35%; left: 10%; background: radial-gradient(circle, rgba(214, 60, 255, 0.15), transparent 62%); animation-duration: 38s; }

@keyframes drift { to { transform: translate(10vw, -8vh) scale(1.15); } }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* Eyebrows, titles and other shared type */
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.26em; padding-left: 0.26em; text-transform: uppercase;
  color: var(--gold);
}

.title {
  margin-top: 0.75rem; padding-bottom: 0.08em;
  font-size: clamp(2.75rem, 9vw, 5.75rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.045em;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 26px rgba(247, 197, 72, 0.28));
}

.section-head { max-width: 40rem; margin: 0 auto clamp(2.5rem, 6vw, 4rem); padding: 0 var(--gutter); text-align: center; }
.sub { margin-top: 1rem; font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--cream-70); }

/* Buttons */
.pill {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 1.1rem 2.1rem;
  border-radius: 999px;
  background: var(--gold-foil); color: var(--night);
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 14px 40px -12px rgba(247, 197, 72, 0.75);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.pill::after { content: "→"; transition: transform 0.25s var(--ease-out); }
.pill::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: shine 5s ease-in-out 1.5s infinite;
}
.pill:hover { transform: translateY(-2px) scale(1.03); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 20px 60px -12px rgba(247, 197, 72, 0.95); }
.pill:hover::after { transform: translateX(4px); }
.pill:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }
.pill[href=""] { display: none; }
.pill-small { padding: 0.55rem 1.15rem; font-size: 0.9rem; }

@keyframes shine { 0%, 70% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

/* A bar that slides in once the picture has scrolled away */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(0.6rem + env(safe-area-inset-top)) var(--gutter) 0.6rem;
  background: rgba(14, 6, 18, 0.72);
  border-bottom: 1px solid rgba(247, 197, 72, 0.14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transform: translateY(-110%);
  transition: transform 0.4s var(--ease-out);
}
.topbar.is-shown { transform: none; }

.wordmark {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; color: var(--cream);
}
.wordmark span {
  margin-left: 0.12em;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* A personal hello when the address carries a name, like ?namn=Anna */
.greeting {
  position: relative; z-index: 3;
  padding: calc(0.8rem + env(safe-area-inset-top)) var(--gutter) 0.85rem;
  background: var(--gold-foil); color: var(--night);
  box-shadow: 0 12px 40px -12px rgba(247, 197, 72, 0.6);
  text-align: center;
  font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em;
}
.greeting[hidden] { display: none; }
.greeting::before, .greeting::after { content: "✦"; margin: 0 0.6em; font-size: 0.7em; vertical-align: 0.15em; color: rgba(14, 6, 18, 0.5); }
/* The name sits on its own little name tag */
.greeting b {
  display: inline-block; margin: 0 0.12em; padding: 0.12em 0.45em 0.16em;
  border-radius: 0.35em;
  background: var(--night); color: var(--gold);
  box-shadow: 0 6px 16px -6px rgba(14, 6, 18, 0.7);
  font-size: 1.15em; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  transform: rotate(-2deg);
}

/* The picture, kept within the window's height so the countdown is in view */
.hero { position: relative; }

.hero-pan {
  width: min(100%, 1920px, 172vh);
  width: min(100%, 1920px, 172svh);
  margin-inline: auto;
}
.hero-pan picture, .hero-pan img { width: 100%; }

.hero-pan img {
  -webkit-mask-image: linear-gradient(180deg, #000 78%, rgba(0, 0, 0, 0.7) 87%, rgba(0, 0, 0, 0.25) 95%, transparent);
  mask-image: linear-gradient(180deg, #000 78%, rgba(0, 0, 0, 0.7) 87%, rgba(0, 0, 0, 0.25) 95%, transparent);
}

/* When the picture is narrower than the window, its sides fade out too */
@media (min-width: 1921px), (min-aspect-ratio: 43/25) {
  .hero-pan img {
    -webkit-mask-image:
      linear-gradient(180deg, #000 78%, rgba(0, 0, 0, 0.7) 87%, rgba(0, 0, 0, 0.25) 95%, transparent),
      linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(180deg, #000 78%, rgba(0, 0, 0, 0.7) 87%, rgba(0, 0, 0, 0.25) 95%, transparent),
      linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-composite: intersect;
  }
}

/* A full stop slammed onto the picture between the 4 and the 0 of its title, so it reads 4.0, cut out with a
   white edge like the faces. It's placed in the picture's own measures, so it moves with it; the picture file
   itself stays as Jens made it. */
.hero-art { position: relative; container-type: inline-size; }
.version-dot {
  position: absolute; left: 65.6%; top: 20.6%;
  width: 3.4cqw; aspect-ratio: 1;
  translate: -50% -50%;
  border: 0.4cqw solid var(--cream); border-radius: 50%;
  background: var(--coral);
  box-shadow: 0.15cqw 0.35cqw 0.6cqw rgba(14, 6, 18, 0.6);
  animation: slam 0.3s cubic-bezier(0.55, 0, 1, 0.45) 0.8s backwards, settle 0.3s var(--ease-out) 1.1s;
}
@keyframes slam {
  from { opacity: 0; scale: 6; }
  to { scale: 0.8; }
}
@keyframes settle {
  from { scale: 0.8; }
  50% { scale: 1.12; }
}
/* The picture takes the hit when the dot lands (main.js adds the class) */
.hero-art.is-hit { animation: hit 0.4s ease-out; }
@keyframes hit {
  20% { translate: -0.5% 0.6%; }
  45% { translate: 0.4% -0.4%; }
  70% { translate: -0.2% 0.2%; }
}

.swipe-hint { display: none; }

/* The countdown sits on the bottom of the picture */
.countdown {
  position: relative; z-index: 2;
  width: min(100% - 2 * var(--gutter), 46rem);
  margin: clamp(-7rem, -7vw, -2rem) auto 0;
  --pad-x: clamp(0.9rem, 3vw, 2rem);
  --pad-bottom: clamp(1.1rem, 2.5vw, 1.5rem);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) var(--pad-x) var(--pad-bottom);
  overflow: hidden;
  border: 1px solid rgba(247, 197, 72, 0.3);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(46, 21, 56, 0.82), rgba(17, 7, 22, 0.9));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 70px -20px rgba(247, 197, 72, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-align: center;
}

.countdown-label {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream-70);
}
.live-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 12px var(--coral);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

.countdown-units {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.45rem, 1.8vw, 1rem);
  margin-top: 0.9rem;
}
.countdown-units[hidden] { display: none; }

/* Split-flap tiles */
.tile {
  position: relative;
  padding: clamp(0.65rem, 2vw, 1.1rem) 0 clamp(0.55rem, 1.6vw, 0.85rem);
  border-radius: 16px;
  background: linear-gradient(180deg, #33193f 0%, #241030 50%, #180a20 50.5%, #12071a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 12px 26px -14px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.tile span {
  display: block;
  font-size: clamp(2.3rem, 9vw, 4.75rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tile span.tick { animation: tick 0.45s var(--ease-out); }
.tile small {
  display: block; margin-top: 0.45rem;
  font-size: clamp(0.58rem, 1.6vw, 0.72rem); font-weight: 700; letter-spacing: 0.18em; padding-left: 0.18em;
  text-transform: uppercase; color: var(--cream-50);
}

@keyframes tick { from { transform: translateY(-0.18em); opacity: 0.25; } }

.countdown-done {
  margin-top: 0.75rem;
  font-family: var(--script); font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.2;
  color: var(--coral); text-shadow: var(--coral-glow);
}

.countdown-when {
  margin-top: 1rem;
  font-size: clamp(0.85rem, 2.2vw, 1rem); font-weight: 600; color: var(--cream);
}
.countdown-when span { margin: 0 0.6em; color: var(--gold); }

/* The way into Rädda framtanden: a strip along the bottom of the countdown, edge to edge */
.countdown-game {
  display: none; align-items: center; gap: 0.9rem;
  width: calc(100% + 2 * var(--pad-x));
  margin: 1.2rem calc(var(--pad-x) * -1) calc(var(--pad-bottom) * -1);
  padding: 0.9rem var(--pad-x);
  border: 0; border-top: 1px dashed rgba(247, 197, 72, 0.35);
  background: linear-gradient(90deg, rgba(247, 197, 72, 0.12), rgba(247, 197, 72, 0.04) 60%, rgba(255, 79, 94, 0.1));
  color: var(--cream);
  font: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.2s ease;
}
.js .countdown-game { display: flex; }
.countdown-game:hover { background-color: rgba(247, 197, 72, 0.1); }
.countdown-game:focus-visible { outline: 2px solid var(--cream); outline-offset: -4px; }
.countdown-game-icon {
  flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  border: 1px solid rgba(247, 197, 72, 0.45); border-radius: 50%;
  background: rgba(14, 6, 18, 0.5);
  font-size: 1.25rem;
}
.countdown-game-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.countdown-game-text small { font-size: 0.82rem; font-weight: 600; color: var(--cream-70); }
.countdown-game-text b { font-size: clamp(1.05rem, 2.6vw, 1.2rem); font-weight: 800; letter-spacing: -0.02em; color: var(--gold); }
.countdown-game-go {
  flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-left: auto;
  border-radius: 50%;
  background: var(--gold-foil); color: var(--night);
  font-weight: 800;
  transition: transform 0.25s var(--ease-out);
}
.countdown-game:hover .countdown-game-go { transform: translateX(3px); }

/* Rädda framtanden: a card on a big screen, the whole screen on a phone */
.game {
  width: min(100vw - 2rem, 30rem);
  height: min(100vh - 2rem, 46rem);
  height: min(100dvh - 2rem, 46rem);
  max-width: none; max-height: none;
  margin: auto; padding: 0;
  overflow: hidden;
  border: 1px solid rgba(247, 197, 72, 0.35); border-radius: 28px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(214, 60, 255, 0.22), transparent 60%),
    linear-gradient(180deg, #24112c, #0e0612);
  color: var(--cream);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 80px -20px rgba(247, 197, 72, 0.35);
}
.game[open] { display: flex; flex-direction: column; }
.game::backdrop { background: rgba(8, 3, 12, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.is-playing { overflow: hidden; }

.game-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 0.8rem 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(247, 197, 72, 0.15);
}
.game-title { font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.game-score {
  margin-left: auto;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  color: var(--cream-70);
}
.game-score b { margin-left: 0.35em; font-size: 1.05rem; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--gold); }
.game-score span { margin: 0 0.5em; color: var(--gold); }
.game-close {
  flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid rgba(255, 246, 230, 0.2); background: transparent; color: var(--cream);
  font: 700 1rem/1 var(--display); cursor: pointer;
}
.game-close:hover { border-color: var(--gold); color: var(--gold); }

.game-stage { position: relative; flex: 1; min-height: 0; background: radial-gradient(70% 28% at 50% 100%, rgba(247, 197, 72, 0.16), transparent 70%); }
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: ew-resize; }

/* The screens between rounds scroll when they hold more than fits, centred when they don't */
.game-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1.75rem 1.5rem;
  background: rgba(14, 6, 18, 0.8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-align: center;
}
.game-screen[hidden] { display: none; }
.game-screen-face { width: 6rem; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6)); }
.game-screen-title {
  font-family: var(--script); font-size: clamp(2rem, 8vw, 2.75rem); line-height: 1.1;
  color: var(--coral); text-shadow: var(--coral-glow);
}
.game-screen-text { max-width: 22rem; font-size: 1.02rem; line-height: 1.5; color: var(--cream-70); }
.game-screen > :first-child { margin-top: auto; }
.game-screen > :last-child { margin-bottom: auto; }
.pill-play { margin-top: 0.4rem; border: 0; cursor: pointer; font-family: var(--display); }

/* The six hazards, so everyone knows what's coming */
.game-legend {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem;
  width: 100%; max-width: 22rem;
}
.game-legend[hidden] { display: none; }
.game-legend li {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.55rem 0.3rem;
  border: 1px solid rgba(255, 246, 230, 0.1); border-radius: 12px;
  background: rgba(255, 246, 230, 0.04);
  font-size: 0.78rem; font-weight: 700;
}
.game-legend span, .game-legend svg { width: 1.9rem; height: 1.9rem; font-size: 1.6rem; line-height: 1.9rem; }

/* Name for the top list */
.game-save { display: grid; gap: 0.6rem; width: 100%; max-width: 22rem; }
.game-save[hidden] { display: none; }
.game-save label { font-weight: 700; color: var(--gold); }
.game-save-row { display: flex; gap: 0.5rem; }
.game-save input {
  flex: 1; min-width: 0;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(247, 197, 72, 0.5); border-radius: 999px;
  background: rgba(14, 6, 18, 0.6); color: var(--cream);
  font: 700 1.05rem var(--display);
}
.game-save input:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.pill-save { padding: 0.8rem 1.4rem; border: 0; cursor: pointer; font-family: var(--display); }
.pill-save::after { content: none; }
.pill-save:disabled { opacity: 0.6; cursor: wait; }
.game-save-error { font-size: 0.9rem; font-weight: 600; color: var(--coral); }

/* Topplistan */
.game-board { width: 100%; max-width: 22rem; margin-top: 0.6rem; text-align: left; }
.game-board[hidden] { display: none; }
.game-board-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; text-align: center; color: var(--gold); }
.game-board ol { list-style: none; margin-top: 0.6rem; }
.game-board li {
  display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px dashed rgba(255, 246, 230, 0.12);
}
.game-board li::before { content: attr(data-place); font-weight: 800; color: var(--cream-50); }
.game-board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.game-board li b { font-variant-numeric: tabular-nums; color: var(--gold); }
.game-board li.is-first::before { content: "👑"; }
/* The gap before your own line when you're further down than the top */
.game-board li.is-gap { display: block; padding: 0 0.7rem; border-bottom: 0; text-align: center; color: var(--cream-50); }
.game-board li.is-gap::before { content: none; }
.game-board li.is-mine { border-radius: 10px; border-bottom-color: transparent; background: rgba(247, 197, 72, 0.16); }
.game-board-note { margin-top: 0.6rem; font-size: 0.85rem; text-align: center; color: var(--cream-50); }

@media (max-width: 640px) {
  .game { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  .game-bar { padding-top: calc(0.8rem + env(safe-area-inset-top)); }
  .game-title { display: none; }
  .game-score { margin-left: 0; }
  .game-close { margin-left: auto; }
}

/* Two taped-on bands that run across the page */
.marquee {
  position: relative;
  height: clamp(7.5rem, 14vw, 10.5rem);
  margin-top: clamp(3rem, 8vw, 6rem);
  overflow: hidden; overflow: clip;
}
.marquee-band {
  position: absolute; top: 50%; left: -6%; right: -6%;
  padding: 0.8rem 0;
  font-size: clamp(1.05rem, 2.6vw, 1.75rem); font-weight: 800; line-height: 1; letter-spacing: -0.01em;
  text-transform: uppercase; white-space: nowrap;
}
.marquee-coral { transform: translateY(-50%) rotate(2.6deg); background: var(--coral); color: var(--cream); }
.marquee-gold {
  transform: translateY(-50%) rotate(-3deg);
  background: var(--gold-foil); color: var(--night);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.7);
}
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee-coral .marquee-track { animation-direction: reverse; animation-duration: 56s; }
.marquee-track span { display: inline-flex; align-items: center; }
.marquee-track span::after { content: "✦"; margin: 0 0.9em; font-size: 0.8em; }
.marquee-gold .marquee-track span::after { color: var(--coral); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* Kom inte som du är */
.intro {
  max-width: 68rem; margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter) clamp(3rem, 8vw, 6rem);
  text-align: center;
}
.headline {
  margin-top: 1.4rem;
  font-size: clamp(3.4rem, 14vw, 9.5rem); font-weight: 800; line-height: 0.86; letter-spacing: -0.05em;
}
.headline em {
  display: inline-block; padding: 0 0.06em; transform: rotate(-5deg) translateY(-0.04em);
  font-family: var(--script); font-style: normal; font-weight: 400; letter-spacing: 0;
  color: var(--coral); text-shadow: var(--coral-glow);
}
.lead {
  max-width: 34rem; margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem); line-height: 1.5; color: var(--cream-70);
}
.lead strong { font-weight: 700; color: var(--cream); }

/* Jens-o-maten: the head of one Jens on the body of another */
.machine { padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(3rem, 8vw, 6rem); }

.builder {
  display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  max-width: 60rem; margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid rgba(247, 197, 72, 0.28); border-radius: 36px;
  background:
    radial-gradient(90% 90% at 0% 0%, rgba(214, 60, 255, 0.16), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, rgba(255, 79, 94, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(46, 21, 56, 0.7), rgba(17, 7, 22, 0.85));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* A polaroid with the two halves put together along a zigzag cut */
.builder-photo {
  position: relative;
  padding: 0.75rem 0.75rem 1.1rem;
  border-radius: 6px;
  background: var(--cream); color: var(--night);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0 60px -10px rgba(247, 197, 72, 0.35);
  transform: rotate(-3deg);
}
/* A strip of tape on top */
.builder-photo::before {
  content: ""; position: absolute; top: -0.8rem; left: 50%; z-index: 1;
  width: 5.5rem; height: 1.6rem;
  background: rgba(247, 197, 72, 0.6);
  transform: translateX(-50%) rotate(5deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mix { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: var(--night); }
.mix img, .mix-head { position: absolute; inset: 0; width: 100%; height: 100%; }
.mix img { object-fit: cover; }
.mix-head { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.55)); }
.mix-head img {
  clip-path: polygon(0 0, 100% 0, 100% 57%, 95% 60%, 90% 57%, 85% 60%, 80% 57%, 75% 60%, 70% 57%, 65% 60%, 60% 57%,
    55% 60%, 50% 57%, 45% 60%, 40% 57%, 35% 60%, 30% 57%, 25% 60%, 20% 57%, 15% 60%, 10% 57%, 5% 60%, 0 57%);
}
.mix img.swap { animation: swap 0.3s var(--ease-out); }

@keyframes swap { from { opacity: 0.35; transform: scale(1.05); } }

.builder-photo figcaption { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 0.25rem 0; }
.mix-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--coral); }
.mix-name { min-height: 2.3em; font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }

.builder-title {
  margin-top: 0.75rem;
  font-size: clamp(2.4rem, 6vw, 4.25rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.045em;
}
.builder-title em {
  display: inline-block; padding: 0 0.05em; transform: rotate(-4deg);
  font-family: var(--script); font-style: normal; font-weight: 400; letter-spacing: 0;
  color: var(--coral); text-shadow: var(--coral-glow);
}
.builder-text { max-width: 28rem; margin-top: 1.1rem; font-size: clamp(1.05rem, 2.2vw, 1.2rem); line-height: 1.5; color: var(--cream-70); }

/* The controls need the script, so they only show with it */
.builder-controls { display: none; }
.js .builder-controls { display: grid; gap: 0.7rem; justify-items: start; margin-top: 1.75rem; }

.stepper {
  display: grid; grid-template-columns: 3.75rem 2.5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: 0.5rem;
  width: 100%; max-width: 25rem;
  padding: 0.35rem 0.4rem 0.35rem 1.1rem;
  border: 1px solid rgba(255, 246, 230, 0.12); border-radius: 999px;
  background: rgba(255, 246, 230, 0.05);
}
.stepper-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.stepper output { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 700; }
.stepper button {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid rgba(247, 197, 72, 0.5); background: transparent; color: var(--gold);
  font: 800 1rem/1 var(--display); cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.stepper button:hover { background: var(--gold); color: var(--night); }
.stepper button:active { transform: scale(0.92); }
.stepper button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

.pill-spin { margin-top: 0.6rem; border: 0; cursor: pointer; font-family: var(--display); }
.pill-spin::after { content: none; }

/* Below this the two columns get too narrow for the names, so the picture goes on top */
@media (max-width: 900px) {
  .builder { grid-template-columns: minmax(0, 1fr); max-width: 34rem; text-align: center; }
  .builder-photo { width: min(80%, 18rem); margin: 0.5rem auto 0; }
  .builder-text { margin-inline: auto; }
  .js .builder-controls { justify-items: center; }
}

/* Din biljett */
.details { padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 10vw, 7rem); }

.ticket-wrap {
  max-width: 52rem; margin: 0 auto;
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 50px rgba(247, 197, 72, 0.22));
}
.ticket {
  --stub: 11.5rem;
  --notch: 1rem;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--stub);
  border-radius: 22px;
  background: var(--gold-foil); color: var(--night);
  transform: rotate(-1.5deg);
  -webkit-mask:
    radial-gradient(circle at calc(100% - var(--stub)) 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at calc(100% - var(--stub)) 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle at calc(100% - var(--stub)) 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at calc(100% - var(--stub)) 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / 100% 51% no-repeat;
}

.ticket-main { padding: clamp(1.5rem, 4vw, 2.5rem); }
.ticket-brand { font-size: clamp(2.75rem, 7vw, 4.25rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; }
.ticket-brand span { margin-left: 0.1em; color: var(--coral); }
.ticket-theme { margin-top: 0.35rem; font-family: var(--script); font-size: clamp(1.15rem, 2.6vw, 1.5rem); color: rgba(14, 6, 18, 0.75); }

.ticket-rows {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem; margin-top: clamp(1.5rem, 4vw, 2.25rem);
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid rgba(14, 6, 18, 0.2);
}
.ticket-rows dt { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(14, 6, 18, 0.55); }
.ticket-rows dd { margin-top: 0.25rem; font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.ticket-rows small { display: block; margin-top: 0.15rem; font-size: 0.9rem; font-weight: 500; letter-spacing: 0; color: rgba(14, 6, 18, 0.65); }

/* Partners get a row of their own across the ticket */
.ticket-plus {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1.5px dashed rgba(14, 6, 18, 0.35); border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
}
.ticket-rows .ticket-plus dt {
  flex: none; display: grid; place-items: center; width: 3rem; height: 3rem;
  border-radius: 50%;
  background: var(--coral); color: var(--cream);
  box-shadow: 0 6px 16px -6px rgba(200, 30, 50, 0.6);
  font-size: 1.7rem; line-height: 1; letter-spacing: 0; text-transform: none;
}
.ticket-plus dd { margin-top: 0; }

.ticket-stub {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem) 1.25rem;
  border-left: 2px dashed rgba(14, 6, 18, 0.35);
  text-align: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.ticket-stub b { display: block; margin-top: 0.3rem; font-size: 1.05rem; letter-spacing: 0.02em; }
.ticket-no { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: var(--coral); }
.barcode {
  display: block; width: 100%; height: 3.5rem;
  background: repeating-linear-gradient(90deg,
    var(--night) 0 2px, transparent 2px 4px, var(--night) 4px 7px, transparent 7px 9px,
    var(--night) 9px 10px, transparent 10px 13px, var(--night) 13px 16px, transparent 16px 17px);
  opacity: 0.85;
}

/* Det finstilta, in big print: rubber stamps that answer the asterisks on the ticket */
.fine-print { max-width: 48rem; margin: clamp(3.5rem, 8vw, 5rem) auto 0; text-align: center; }
.fine-print-title {
  font-size: clamp(1.9rem, 5.5vw, 2.9rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
}
.fine-print-title em {
  display: inline-block; padding: 0 0.05em; transform: rotate(-3deg);
  font-family: var(--script); font-style: normal; font-weight: 400; letter-spacing: 0;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fine-print-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 5vw, 3.5rem);
  margin-top: clamp(2.25rem, 5vw, 3rem);
}
.fine-print-list li p:last-child { max-width: 19rem; margin: 1.4rem auto 0; font-size: 1.08rem; line-height: 1.55; color: var(--cream-70); }

/* Worn ink: a noise pattern knocks small holes in the stamp */
.stamp {
  display: inline-block;
  padding: 0.45em 0.8em 0.4em;
  border: 0.2em double currentColor; border-radius: 0.3em;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.94;
  transform: rotate(var(--turn, 0deg));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp-coral { color: var(--coral); text-shadow: 0 0 18px rgba(255, 79, 94, 0.35); }
.stamp-gold { color: var(--gold); text-shadow: 0 0 18px rgba(247, 197, 72, 0.3); }
.stamp .star { margin-right: 0.08em; color: inherit; }

/* The stamps come down with a thump as they scroll into view */
.js .fine-print-list .stamp { opacity: 0; }
.js .fine-print-list .is-in .stamp { animation: stamp 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) 0.2s both; }
.js .fine-print-list .is-in:nth-child(2) .stamp { animation-delay: 0.45s; }

@keyframes stamp {
  from { opacity: 0; transform: rotate(var(--turn)) scale(1.9); }
  to { opacity: 0.94; transform: rotate(var(--turn)) scale(1); }
}

@media (max-width: 640px) {
  .fine-print-list { grid-template-columns: minmax(0, 1fr); }
  .stamp { font-size: clamp(1.7rem, 8.5vw, 2.2rem); }
}

.star { font-weight: 800; color: var(--coral); }
sup.star { margin-left: 0.08em; font-size: 0.75em; line-height: 0; }
.ticket .star { color: #c9283f; }

/* Kommer du? The RSVP gets room of its own and a soft glow, so nobody misses it */
.cta {
  margin: clamp(4.5rem, 11vw, 7rem) auto 0; padding: clamp(2rem, 5vw, 3rem) 0;
  background: radial-gradient(closest-side, rgba(247, 197, 72, 0.14), transparent);
  text-align: center;
}
.cta-ask { font-size: clamp(2.4rem, 8vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.cta-ask em {
  display: inline-block; padding: 0 0.05em; transform: rotate(-4deg);
  font-family: var(--script); font-style: normal; font-weight: 400; letter-spacing: 0;
  color: var(--coral); text-shadow: var(--coral-glow);
}
.pill-big {
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
  padding: 1.35rem 2.6rem;
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  animation: beckon 2.4s ease-in-out infinite;
}
.cta-note { margin-top: 1.1rem; font-size: 1rem; font-weight: 600; color: var(--cream-70); }

/* For guests without Facebook: a word on it, and a form of the page's own behind a fold */
.no-facebook {
  max-width: 30rem; margin: clamp(2.5rem, 6vw, 3.25rem) auto 0;
  padding-top: clamp(1.75rem, 4vw, 2.25rem);
  border-top: 1px dashed rgba(247, 197, 72, 0.3);
}
.no-facebook > p { font-size: 1.05rem; line-height: 1.55; color: var(--cream-70); }
.no-facebook > p b { color: var(--cream); }

.rsvp { display: none; margin-top: 1.25rem; text-align: left; }
.js .rsvp { display: block; }
.rsvp summary {
  display: block; width: fit-content; margin: 0 auto;
  padding: 0.85rem 1.5rem;
  border: 1px solid rgba(247, 197, 72, 0.55); border-radius: 999px;
  list-style: none; cursor: pointer;
  font-weight: 800; color: var(--gold);
  transition: background-color 0.2s ease;
}
.rsvp summary::-webkit-details-marker { display: none; }
.rsvp summary::after { content: " ↓"; }
.rsvp[open] summary::after { content: " ↑"; }
.rsvp summary:hover { background: rgba(247, 197, 72, 0.12); }
.rsvp summary:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

.rsvp-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.rsvp-form[hidden] { display: none; }
.rsvp-field { display: grid; gap: 0.4rem; font-weight: 700; }
.rsvp-field span { font-size: 0.85rem; font-weight: 500; color: var(--cream-50); }
.rsvp-form input[type="text"], .rsvp-form textarea {
  width: 100%; padding: 0.8rem 1rem;
  border: 1px solid rgba(247, 197, 72, 0.4); border-radius: 12px;
  background: rgba(14, 6, 18, 0.6); color: var(--cream);
  font: 600 1rem/1.4 var(--display);
}
.rsvp-form textarea { min-height: 5.5rem; resize: vertical; }
.rsvp-form input[type="text"]:focus, .rsvp-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsvp-choice { display: grid; gap: 0.5rem; border: 0; }
.rsvp-choice legend { margin-bottom: 0.5rem; font-weight: 700; }
.rsvp-choice label {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 246, 230, 0.15); border-radius: 12px;
  cursor: pointer; font-weight: 600;
}
.rsvp-choice label:has(input:checked) { border-color: var(--gold); background: rgba(247, 197, 72, 0.12); }
.rsvp-choice input { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
.rsvp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rsvp-error { font-weight: 700; color: var(--coral); }
.rsvp-send { justify-self: center; border: 0; cursor: pointer; font-family: var(--display); }
.rsvp-send:disabled { opacity: 0.6; cursor: wait; }
.rsvp-thanks { margin-top: 1.5rem; text-align: center; font-size: 1.15rem; font-weight: 700; line-height: 1.5; }

@keyframes beckon {
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 10px rgba(247, 197, 72, 0.14), 0 20px 60px -10px rgba(247, 197, 72, 0.95); }
}

@media (max-width: 640px) {
  .pill-big { justify-content: center; width: 100%; max-width: 22rem; }
}

/* Kom som Jens. Fast i tid. */
.footer { padding: clamp(4rem, 10vw, 8rem) var(--gutter) clamp(2.5rem, 6vw, 4rem); text-align: center; overflow: hidden; overflow: clip; }

.sign-off {
  display: flex; align-items: center; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem);
}
.sign-off p {
  font-size: clamp(3rem, 10vw, 7.5rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em;
  text-align: left;
}
.sign-off em {
  display: inline-block; padding: 0.06em 0.1em 0.18em; transform: rotate(-4deg);
  font-family: var(--script); font-style: normal; font-weight: 400; letter-spacing: 0;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.late {
  width: clamp(7rem, 16vw, 11rem);
  padding: 0.45rem 0.45rem 1.4rem;
  border-radius: 5px; background: var(--cream);
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.85);
  transform: rotate(8deg);
}

.fine {
  margin-top: clamp(3.5rem, 8vw, 5rem);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; padding-left: 0.22em; text-transform: uppercase;
  color: var(--cream-50);
}
.fine span { margin: 0 0.7em; color: var(--gold); }

/* Things slide up as they come into view */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  /* The picture gets bigger and swipes sideways; it starts on the title */
  .hero-pan {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .hero-pan::-webkit-scrollbar { display: none; }
  .hero-art, .hero-pan picture, .hero-pan img { width: 190vw; max-width: none; }

  .swipe-hint {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.24em; padding-left: 0.24em;
    text-transform: uppercase; text-align: center;
    color: var(--cream-50);
    transition: opacity 0.6s ease;
  }
  .swipe-hint::before { content: "← "; }
  .swipe-hint::after { content: " →"; }
  .swipe-hint.is-done { opacity: 0; }

  .countdown { margin-top: 0.9rem; border-radius: 22px; }
  .tile { border-radius: 12px; }

  /* Jens-o-maten puts the label above each stepper */
  .builder { padding: 1.75rem 1.1rem 2rem; border-radius: 28px; }
  .stepper {
    grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
    grid-template-areas: "label label label" "prev name next";
    row-gap: 0.2rem; padding: 0.55rem 0.45rem 0.45rem; border-radius: 24px;
  }
  .stepper-label { grid-area: label; }
  .stepper [data-step="-1"] { grid-area: prev; }
  .stepper output { grid-area: name; }
  .stepper [data-step="1"] { grid-area: next; }

  /* The ticket's stub goes underneath, torn off along a line across */
  .ticket {
    --stub: 6.5rem;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto var(--stub);
    transform: rotate(-1deg);
    -webkit-mask:
      radial-gradient(circle at 0 calc(100% - var(--stub)), transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% calc(100% - var(--stub)), transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
    mask:
      radial-gradient(circle at 0 calc(100% - var(--stub)), transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% calc(100% - var(--stub)), transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
  }
  .ticket-rows { gap: 1.1rem 1.25rem; }
  .ticket-stub {
    flex-direction: row; gap: 0.75rem; padding: 1rem 1.4rem;
    border-left: 0; border-top: 2px dashed rgba(14, 6, 18, 0.35);
    text-align: left; letter-spacing: 0.12em; white-space: nowrap;
  }
  /* A long guest name wraps to two lines at most, so the stub keeps its height */
  .ticket-stub p:first-child { flex: 1; min-width: 0; white-space: normal; }
  .ticket-stub b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .ticket-plus { align-items: flex-start; }
  .ticket-no { font-size: 1.4rem; }
  .barcode { width: 3.25rem; height: 2.75rem; flex: none; }

  /* Steeper bands, so both show on a narrow screen */
  .marquee { height: 9rem; }
  .marquee-coral { transform: translateY(-50%) rotate(7deg); }
  .marquee-gold { transform: translateY(-50%) rotate(-6deg); }

  .sign-off { flex-direction: column; gap: 2rem; }
  .sign-off p { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow span, .marquee-track, .pill::before, .pill-big, .live-dot { animation: none; }
  .tile span.tick, .mix img.swap, .version-dot { animation: none; }
  .js .fine-print-list .stamp, .js .fine-print-list .is-in .stamp { opacity: 0.94; animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
