/* Sealed state: darker striped paper, nothing else — just the cover */
.polaroid.sealed {
  background: #d9cdab;
  cursor: default;
}
.polaroid-photo-sealed {
  background:
    repeating-linear-gradient(45deg,
      #3a2e22 0, #3a2e22 10px,
      #332820 10px, #332820 20px);
  position: relative;
}
.polaroid-photo-sealed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

.stack-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
  border-radius: 3px;
  background: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 10px,
    rgba(0, 0, 0, 0.025) 10px,
    rgba(0, 0, 0, 0.025) 11px
  );
  opacity: 0;
  animation: stackFadeIn 0.5s ease forwards;
}
@keyframes stackFadeIn {
  to { opacity: 0.72; }
}

.evidence-notes {
  font-family: var(--font-type);
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.65;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.evidence-notes-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Seite 2 rechts: Ermittlungsergebnis — page heading only */
.result-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--ink);
  margin: 0 0 0.25rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* Finder section: handwritten note + polaroid photo */
.finder-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}
.finder-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
/* Finder section: note followed by polaroid pinned with washi tape */
.finder-note-wrap {
  max-width: 100%;
  margin-bottom: 1rem;
}
.finder-note {
  font-family: 'Kalam', 'Patrick Hand', cursive;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  padding: 0.25rem 0.25rem 0.25rem 0.5rem;
}
.finder-note.empty {
  font-style: italic;
  opacity: 0.5;
  color: var(--ink-faint);
}

/* Finder polaroid: centered below the note, held by a strip of washi tape */
.finder-photo-wrap {
  display: flex;
  justify-content: center;
  padding: 1.75rem 0 0.5rem;
  position: relative;
}
.finder-polaroid {
  position: relative;
  background: #f7efd8;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 7px 7px 22px;
  width: 130px;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.06),
    0 4px 10px rgba(0, 0, 0, 0.22),
    0 10px 18px rgba(0, 0, 0, 0.1);
  transform: rotate(-2.5deg);
}
/* Washi tape strip — same style as clue-photo and Abschnitt IV */
.finder-polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 72px;
  height: 24px;
  transform: translateX(-50%) rotate(4deg);
  background:
    repeating-linear-gradient(45deg,
      rgba(245, 225, 160, 0.55) 0 6px,
      rgba(235, 210, 140, 0.55) 6px 12px),
    rgba(240, 220, 150, 0.55);
  border-left: 1px solid rgba(180, 160, 100, 0.35);
  border-right: 1px solid rgba(180, 160, 100, 0.35);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.1),
    inset 0 0 8px rgba(255, 245, 200, 0.3);
  z-index: 5;
  pointer-events: none;
}

.finder-photo-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #ede5d0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.finder-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Placeholder: silhouette outline when no finder photo yet */
.finder-photo-frame.placeholder {
  background:
    repeating-linear-gradient(45deg,
      rgba(0, 0, 0, 0.02) 0 4px,
      transparent 4px 8px),
    #e8dfc8;
}
.finder-photo-frame.placeholder svg {
  width: 62%;
  height: auto;
  display: block;
  color: var(--ink);
  opacity: 0.55;
}
.finder-caption {
  font-family: 'Kalam', 'Patrick Hand', cursive;
  font-size: 0.76rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 6px 0 0;
  line-height: 1.2;
}

/* Reward strip on left page */
.reward-strip {
  display: flex;
  gap: 8px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.reward-badge {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
}
.reward-badge.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.reward-badge .num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0;
  margin-bottom: 2px;
}

/* --- Tickets section --- */
.tickets-section {
  max-width: 1280px;
  margin: 7rem auto 0;
  padding: 0 2rem;
}
.ticket-sleeve {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.ticket-sleeve-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* --- Ticket: based on Schatzjagd original, compacted --- */

/* Tier-specific variables, scoped per ticket card */
.ticket-card.tier-bronze {
  --accent-1:   #6b3a10;
  --accent-2:   #b06828;
  --accent-3:   #d89050;
  --accent-4:   #e8b880;
  --accent-5:   #f5dfc0;
  --face-a:     #a05020;
  --face-b:     #d88040;
  --face-c:     #b06020;
  --face-d:     #c07030;
  --face-e:     #885018;
  --border-a:   #784010;
  --border-b:   #cc8040;
  --inner-a:    #aa6020;
  --inner-b:    #d09040;
  --inner-c:    #a05820;
  --inner-d:    #c07830;
  --text-dark:  #200a00;
  --text-dark2: #2e1000;
  --shadow-hl:  rgba(255,200,140,0.75);
  --shadow-lo:  rgba(0,0,0,0.5);
  --glow-color: rgba(176,104,40,0.22);
}
.ticket-card.tier-silber {
  --accent-1:   #5a7080;
  --accent-2:   #8aaabb;
  --accent-3:   #c8dce8;
  --accent-4:   #dce8f0;
  --accent-5:   #f0f6fa;
  --face-a:     #7090a0;
  --face-b:     #c0d8e4;
  --face-c:     #90aab8;
  --face-d:     #a8c0cc;
  --face-e:     #607888;
  --border-a:   #607888;
  --border-b:   #d0e4ef;
  --inner-a:    #90aab8;
  --inner-b:    #cce0ea;
  --inner-c:    #88a0ae;
  --inner-d:    #b0ccd6;
  --text-dark:  #102028;
  --text-dark2: #1a3040;
  --shadow-hl:  rgba(200,230,255,0.75);
  --shadow-lo:  rgba(0,0,0,0.5);
  --glow-color: rgba(140,180,200,0.22);
}
.ticket-card.tier-gold {
  --accent-1:   #8b6914;
  --accent-2:   #c9a227;
  --accent-3:   #f0d060;
  --accent-4:   #f5e6a3;
  --accent-5:   #fdf8e8;
  --face-a:     #d4a520;
  --face-b:     #f0d060;
  --face-c:     #c9a227;
  --face-d:     #e8c84a;
  --face-e:     #b8941e;
  --border-a:   #a07818;
  --border-b:   #e0c040;
  --inner-a:    #dbb832;
  --inner-b:    #f0d860;
  --inner-c:    #c9a227;
  --inner-d:    #e0c848;
  --text-dark:  #2e1f05;
  --text-dark2: #3a2808;
  --shadow-hl:  rgba(255,230,140,0.75);
  --shadow-lo:  rgba(0,0,0,0.5);
  --glow-color: rgba(201,162,39,0.22);
}
.ticket-card.tier-diamant {
  /* Diamant-Palette — Holographic-Variante. Pink-Cyan-Lavendel-Mint
     wandert diagonal über das Ticket. Alle Stops bleiben hell genug,
     dass die Schrift dunkel lesbar bleibt. */
  --accent-1:   #8a6aaa;
  --accent-2:   #b08cc8;
  --accent-3:   #d4b8e0;
  --accent-4:   #ecdcf4;
  --accent-5:   #f8f0fc;
  /* Verlauf: face-a (Stop 0%) → face-b (15%) → face-c (30%) →
     face-d (45%) → face-e (55%) → face-c (70%) → face-a (85%) → face-b (100%).
     Damit alle Holo-Farben im Verlauf vorkommen, mappen wir:
     face-a = Pink, face-b = Hellblau, face-c = Lavendel,
     face-d = Mint, face-e = Pink-Lavendel-Mix. */
  --face-a:     #f8e8f4;   /* zartes Pink */
  --face-b:     #e8f0fc;   /* Hellblau */
  --face-c:     #f0e8fc;   /* Lavendel */
  --face-d:     #e8f8f4;   /* Mint */
  --face-e:     #fce8f0;   /* Pink-Lavendel */
  --border-a:   #a888c8;
  --border-b:   #ecdcf4;
  --inner-a:    #f8f0fc;
  --inner-b:    #ecf0fc;
  --inner-c:    #f4ecfc;
  --inner-d:    #f0fcf8;
  --text-dark:  #2a1a3a;
  --text-dark2: #3a2858;
  --shadow-hl:  rgba(248,232,250,0.85);
  --shadow-lo:  rgba(60,40,90,0.4);
  --glow-color: rgba(200,160,220,0.45);
}

/* SVG-Inner-Path bei Diamant fast unsichtbar machen — die hardgecodete
   opacity 0.25/0.55 in script.js würde sonst einen blau-grauen
   Innen-Rahmen plus -Tönung erzeugen, was den "shiny"-Look verdunkelt.
   :is(...) > path[opacity] matcht die zwei inneren Pfade ohne den
   äußeren Border-Path zu treffen. */
.ticket-card.tier-diamant .ticket-svg path[opacity="0.25"] {
  opacity: 0.05;
}
.ticket-card.tier-diamant .ticket-svg path[opacity="0.55"] {
  opacity: 0.18;
}

.ticket-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}

.ticket-outer {
  position: relative;
  width: 100%;
  aspect-ratio: 550 / 300;
  margin: 0 auto;
  max-width: 520px;
  perspective: 1200px;
  cursor: default;
}
/* This intermediate wrapper carries the responsive fit-scale so the
   tilt transform on .ticket-body stays clean. preserve-3d is essential —
   without it the 3D perspective collapses and tilt flattens into a skew. */
.ticket-scale {
  position: absolute;
  top: 0;
  left: 0;
  width: 550px;
  height: 300px;
  transform-origin: top left;
  transform-style: preserve-3d;
  /* JS sets transform: scale(Nfit) */
}

.ticket-body {
  position: absolute;
  inset: 0;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  --ticket-clip: path("M 0 30 A 30 30 0 0 0 30 0 L 520 0 A 30 30 0 0 0 550 30 L 550 39 C 542 39 542 49 550 49 L 550 58 C 542 58 542 68 550 68 L 550 77 C 542 77 542 87 550 87 L 550 97 C 542 97 542 107 550 107 L 550 116 C 542 116 542 126 550 126 L 550 135 C 542 135 542 145 550 145 L 550 155 C 542 155 542 165 550 165 L 550 174 C 542 174 542 184 550 184 L 550 193 C 542 193 542 203 550 203 L 550 212 C 542 212 542 222 550 222 L 550 232 C 542 232 542 242 550 242 L 550 251 C 542 251 542 261 550 261 L 550 270 A 30 30 0 0 0 520 300 L 30 300 A 30 30 0 0 0 0 270 L 0 261 C 8 261 8 251 0 251 L 0 242 C 8 242 8 232 0 232 L 0 222 C 8 222 8 212 0 212 L 0 203 C 8 203 8 193 0 193 L 0 184 C 8 184 8 174 0 174 L 0 165 C 8 165 8 155 0 155 L 0 145 C 8 145 8 135 0 135 L 0 126 C 8 126 8 116 0 116 L 0 107 C 8 107 8 97 0 97 L 0 87 C 8 87 8 77 0 77 L 0 68 C 8 68 8 58 0 58 L 0 49 C 8 49 8 39 0 39 L 0 30 Z");
}

.ticket-outer:hover .ticket-shine { opacity: 1; }
.ticket-outer:hover .ticket-glare { opacity: 1; }

/* Touch-Geräte: Hover-Effekte komplett aus. Doppelter Boden zum
   JS-Gate in js/08-tickets.js (wireTicketTilt läuft dort gar nicht
   erst) — falls ein Gerät Hover simuliert (langes Tippen), greift
   trotzdem keine Shine/Glare/Tilt-Optik. */
@media (hover: none), (pointer: coarse) {
  .ticket-shine,
  .ticket-glare { display: none; }
  .ticket-body {
    transform: none;
    transition: none;
  }
}

/* Shadow element matching original */
.ticket-shadow {
  position: absolute; inset: 0;
  transform: translateZ(-10px) translateY(6px);
  filter: blur(4px);
  opacity: 0.6;
  pointer-events: none;
}
.ticket-shadow-inner {
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  clip-path: var(--ticket-clip);
}

.ticket-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse 55% 55% at 50% 50%, var(--glow-color) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.ticket-face {
  position: absolute; inset: 0;
  clip-path: var(--ticket-clip);
  background: linear-gradient(145deg,
    var(--face-a) 0%, var(--face-b) 15%, var(--face-c) 30%,
    var(--face-d) 45%, var(--face-e) 55%, var(--face-c) 70%,
    var(--face-a) 85%, var(--face-b) 100%);
}
.ticket-shine {
  position: absolute;
  inset: 0;
  clip-path: var(--ticket-clip);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(ellipse 70% 55% at var(--mx,50%) var(--my,50%),
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,240,0.2) 25%,
    rgba(255,255,255,0.05) 50%,
    transparent 70%);
  mix-blend-mode: overlay;
}
.ticket-glare {
  position: absolute;
  inset: 0;
  clip-path: var(--ticket-clip);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: linear-gradient(var(--glare-angle,120deg),
    transparent 0%,
    transparent calc(var(--glare-pos,50%) - 18%),
    rgba(255,255,255,0.18) calc(var(--glare-pos,50%) - 6%),
    rgba(255,255,255,0.35) var(--glare-pos,50%),
    rgba(255,255,255,0.18) calc(var(--glare-pos,50%) + 6%),
    transparent calc(var(--glare-pos,50%) + 18%),
    transparent 100%);
  mix-blend-mode: overlay;
}

.ticket-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ticket-texture {
  position: absolute; inset: 0;
  clip-path: var(--ticket-clip);
  pointer-events: none;
  opacity: 0.08;
  background: repeating-linear-gradient(90deg, transparent 0px, rgba(255,255,255,0.3) 1px, transparent 2px, transparent 4px);
}

.t-side-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.t-side-label-left { left: 24px; }
.t-side-label-right { right: 24px; }
.t-side-label .t-label-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-dark);
  opacity: 0.8;
  text-shadow: 0 1px 0 var(--shadow-hl), 0 -0.5px 0 rgba(0,0,0,0.3);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
}
.t-side-label-left .t-label-text { writing-mode: vertical-lr; transform: rotate(180deg); }
.t-side-label-right .t-label-text { writing-mode: vertical-rl; }
.t-side-label .t-label-dot { font-size: 7px; color: var(--text-dark); opacity: 0.4; }
.t-side-label .t-label-num {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dark);
  opacity: 0.8;
  text-shadow: 0 1px 0 var(--shadow-hl), 0 -0.5px 0 rgba(0,0,0,0.3);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
}
.t-side-label-left .t-label-num { writing-mode: vertical-lr; transform: rotate(180deg); }
.t-side-label-right .t-label-num { writing-mode: vertical-rl; }

.t-banner {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dark);
  opacity: 0.9;
  text-shadow: 0 1px 0 var(--shadow-hl), 0 -0.5px 0 rgba(0,0,0,0.3);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
}
.t-banner-top { top: 4px; }
.t-banner-bottom { bottom: 4px; transform: rotate(180deg); }

.t-ticket-content {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4rem;
  text-align: center;
}
.t-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.t-logo .t-sun {
  width: 32px;
  height: 32px;
  color: var(--text-dark);
  filter: drop-shadow(0 2px 0 var(--shadow-hl)) drop-shadow(0 -1.5px 0 rgba(0,0,0,0.45));
}
.t-logo-text {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  text-shadow: 0 1px 0 var(--shadow-hl), 0 -1px 0 var(--shadow-lo);
}
.t-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark2);
  text-shadow: 0 1px 0 var(--shadow-hl);
}

/* Diamant-Ticket: "Finder's Edition" badge above the logo */
.t-special-badge {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dark);
  opacity: 1;
  text-transform: uppercase;
  /* 1px statt 0.5px — Sub-pixel-Linien rendern auf vielen Bildschirmen
     unscharf weil sie auf 0px oder 1px gerundet werden, je nach DPR. */
  border-top: 1px solid var(--text-dark);
  border-bottom: 1px solid var(--text-dark);
  padding: 3px 16px;
  white-space: nowrap;
  /* Text-Shadow entfernt — bei dunkler Schrift auf hellem Diamant-
     Verlauf macht der Highlight-Schatten den Text schwammig statt
     schärfer. Antialiasing-Hint für saubere Glyph-Ränder. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Midnight-Ticket: Five stars row — Referenz auf die 5 Codewörter */
.t-stars-row {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dark);
  opacity: 0.6;
  font-size: 14px;
  letter-spacing: 0.4em;
}

/* Stats line under each ticket */
.ticket-stats {
  text-align: center;
  padding: 0 0.5rem;
}
.ticket-stats-count {
  display: block;
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.ticket-card:not(.has-count) .ticket-stats-count { color: var(--ink-faint); }
/* Midnight-Ticket: fünf Sterne als Marker statt einer Stückzahl */
.ticket-card.is-special .ticket-stats-count.special-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  letter-spacing: 0.35em;
  color: #1a1410;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}
.ticket-stats-text {
  font-family: var(--font-type);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 280px;
  margin: 0 auto;
}

/* Summary bar at the end of the sleeve */
.ticket-summary {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.ticket-summary strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.05em;
  margin: 0 0.3rem;
}

/* --- "Tickets einlösen oder Codewörter prüfen" CTA box ---
   Sits at the very bottom of the tickets section, after both memo
   notes. Visually distinct so users with a ticket find their way to
   the redemption page, but minimalistic — no big subtitle, no hover
   spielerei on the box itself, just a clean dark button that turns
   red on hover. */
.einlosen-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 1.5rem auto 0;
  padding: 1.6rem 2rem;
  background:
    repeating-linear-gradient(45deg,
      transparent 0, transparent 8px,
      rgba(184, 39, 39, 0.025) 8px, rgba(184, 39, 39, 0.025) 16px),
    var(--paper-deep);
  border: 2px solid var(--ink);
  position: relative;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
}
.einlosen-cta-box::before {
  content: "Aktion";
  position: absolute;
  top: -10px;
  left: 1.5rem;
  background: var(--paper);
  padding: 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--stamp-red);
  font-weight: 700;
}
.einlosen-cta-box .cta-text {
  flex: 1;
}
.einlosen-cta-box .cta-text strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* The button — dark by default, red on hover */
.einlosen-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.einlosen-cta-box:hover .einlosen-btn,
.einlosen-cta-box:focus-visible .einlosen-btn {
  background: var(--stamp-red);
  border-color: var(--stamp-red);
}

@media (max-width: 720px) {
  .einlosen-cta-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1.2rem;
    padding: 1.8rem 1.5rem 1.4rem;
  }
  .einlosen-cta-box .einlosen-btn {
    justify-content: center;
    /* Auf Mobile lassen wir den Text umbrechen, damit der Button
       innerhalb des Containers bleibt. Engere Letter-Spacing
       und kleinere Schrift verhindern, dass eine zweite Zeile
       überhaupt nötig wird auf den meisten Phones. */
    white-space: normal;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    padding: 0.85rem 1rem;
    line-height: 1.35;
  }
}

/* --- Ticket memo: "Was bringen mir diese Tickets?" expandable note --- */
.ticket-memo {
  max-width: 1080px;
  margin: 2.25rem auto 0;
  position: relative;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(58, 90, 138, 0.055) 31px, rgba(58, 90, 138, 0.055) 32px),
    var(--paper-deep);
  border: 1px solid var(--line-strong);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.06);
}
.ticket-memo::before {
  /* Red marginal rule like a legal pad, left edge */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 54px;
  width: 1px;
  background: rgba(184, 39, 39, 0.25);
  pointer-events: none;
}
.ticket-memo-trigger {
  width: 100%;
  padding: 1.5rem 2rem 1.5rem 4.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background 0.2s ease;
  position: relative;
}
.ticket-memo-trigger:hover { background: rgba(26, 22, 19, 0.02); }
.ticket-memo-trigger:focus-visible {
  outline: 2px solid var(--stamp-red);
  outline-offset: -4px;
}

.memo-stamp {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stamp-red);
  border: 2px double var(--stamp-red);
  padding: 0.3rem 0.65rem;
  transform: rotate(-6deg);
  background: rgba(239, 231, 212, 0.35);
  white-space: nowrap;
  opacity: 0.88;
  text-shadow: 1px 1px 0 rgba(184, 39, 39, 0.12);
  justify-self: start;
}

.memo-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.memo-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.memo-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--ink);
}

.memo-chevron {
  color: var(--ink-soft);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  flex-shrink: 0;
}
.ticket-memo.open .memo-chevron { transform: rotate(180deg); }

.ticket-memo-body {
  /* Aufklappen ueber grid-template-rows 0fr → 1fr statt max-height:
     kein scrollHeight-Messen, kein transitionend-Handling, und vor
     allem auf Mobile identisch smooth (das alte max-height-Verfahren
     sprang dort ohne Animation auf). Das Body-Element darf dafuer nur
     EIN direktes Kind haben (.memo-content) — jedes weitere Kind
     wuerde eine eigene, nicht kollabierende Grid-Row bilden. */
  display: grid;
  grid-template-rows: 0fr;
  /* overflow:hidden am CONTAINER ist Pflichtteil des Rezepts: die
     0fr-Zeile kollabiert zwar, aber das Padding des Kindes (border-box)
     haelt dessen Box hoeher als die Zeile — ohne Clipping ragt sonst
     die erste Textzeile sichtbar heraus. */
  overflow: hidden;
  transition: grid-template-rows 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.ticket-memo.open .ticket-memo-body { grid-template-rows: 1fr; }
/* WebKit-Eigenheit (= alle iOS-Browser): beim 0fr-Track zaehlt dort
   das PADDING des Grid-Kindes als Mindestbeitrag — die Zeile
   kollabierte auf dem iPhone nur bis auf Padding-Hoehe und die erste
   Textzeile blieb sichtbar. Deshalb werden die vertikalen Paddings im
   zugeklappten Zustand mit auf 0 transitioniert; dann ist der
   Mindestbeitrag ueberall wirklich 0. */
.ticket-memo:not(.open) .memo-content {
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0; /* auch der 1px-Border zaehlt zum Mindestbeitrag */
}
.memo-content {
  min-height: 0;
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.2, 0.8, 0.3, 1), border-top-width 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
  padding: 0.5rem 2rem 2rem 4.5rem;
  font-family: var(--font-type);
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.7;
  border-top: 1px dashed var(--line);
  padding-top: 1.75rem;
}
.memo-content p {
  margin-bottom: 1rem;
}
.memo-content p:last-child { margin-bottom: 0; }
.memo-content strong {
  color: var(--ink);
  font-weight: 600;
}
.memo-content .memo-punchline {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}

/* --- Spurensuche · Variante C "Stempel-Stationen" ---
   Sitzt innerhalb der dritten ticket-memo. Vertikal gestapelte
   Stationen mit großer Nummer links, Aufgabe in der Mitte und
   Eingabefeld rechts. Eck-Markierungen oben-links / unten-rechts
   echo'en die Hero-Countdown-Box.
   Mobile: das Input wandert in eine eigene Zeile unter die Frage. */
.spurensuche-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.25rem;
}
.station {
  display: grid;
  grid-template-columns: 80px 1fr 180px;
  gap: 1.4rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 1.3rem 1.5rem;
  position: relative;
}
.station::before {
  content: "";
  position: absolute;
  left: -1px; top: -1px;
  width: 18px; height: 18px;
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
}
.station::after {
  content: "";
  position: absolute;
  right: -1px; bottom: -1px;
  width: 18px; height: 18px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.station-num {
  font-family: var(--font-display, 'Cinzel Decorative', serif);
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
  color: var(--paper-darker, #d9cdb0);
  text-align: center;
  letter-spacing: -0.04em;
}
.station-body {
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}
.station-place {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid var(--gold-deep);
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.5rem;
}
.station-prompt {
  font-family: var(--font-typewriter, 'Special Elite', serif);
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
}
.station-input {
  background: rgba(255, 248, 225, 0.4);
  border: 1px solid var(--line-strong);
  padding: 0.75rem 0.6rem;
  font-family: var(--font-typewriter, 'Special Elite', serif);
  font-size: 1.4rem;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.1em;
  width: 100%;
  /* Spinner-Pfeile bei type=number / numeric inputs unterdrücken.
     Die Inputs nutzen zwar type="text" + inputmode="numeric"
     (mobile zeigt damit numerische Tastatur, Browser zeigt aber
     keine Spinner) — der Vollständigkeit halber decken wir auch
     den number-Fall ab, falls mal jemand das umstellt. */
  -moz-appearance: textfield;
  appearance: textfield;
}
.station-input::-webkit-outer-spin-button,
.station-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.station-input:focus {
  outline: none;
  border-color: var(--gold-deep);
}
@media (max-width: 700px) {
  .station {
    grid-template-columns: 50px 1fr;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
  }
  .station-num { font-size: 2.2rem; }
  .station-body { padding-left: 1rem; }
  /* Der Input steckt jetzt in .station-input-wrap — die Wrapper-Box ist
     das Grid-Kind und muss die volle Breite unter Nummer+Body spannen. */
  .station-input-wrap {
    grid-column: 1 / -1;
  }
  .station-input {
    font-size: 1.2rem;
    padding: 0.6rem;
  }
}

.spurensuche-action-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.spurensuche-hint {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.95rem;
}
.spurensuche-hint.is-error { color: var(--stamp-red); font-style: normal; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.spurensuche-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.spurensuche-btn:hover { background: var(--ink-soft); }
.spurensuche-btn:disabled { opacity: 0.5; cursor: wait; }
/* Während aktiver Lockout-Phase: gedimmter Look, kein Hover-Highlight,
   und cursor:not-allowed signalisiert dem User dass jetzt nichts geht. */
.spurensuche-btn.is-locked {
  background: #4a3a2a;
  cursor: not-allowed;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.spurensuche-btn.is-locked:hover { background: #4a3a2a; }

/* "Falsche Antwort"-Feedback: kurzes Wackeln + roter Glow.
   Wird per Klasse `.is-wrong` getriggert (im JS für ~600ms gesetzt).
   Statt eines Texts gibt's nur visuelles + akustisches Feedback. */
.spurensuche-btn.is-wrong {
  animation: spurensuche-wrong-shake 480ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
  background: #b82727;
  box-shadow: 0 0 0 0 rgba(184, 39, 39, 0.85), 0 0 24px 4px rgba(184, 39, 39, 0.55);
}
@keyframes spurensuche-wrong-shake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(-7px); }
  30%  { transform: translateX(6px); }
  45%  { transform: translateX(-5px); }
  60%  { transform: translateX(4px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}


/* ============================================================
   SPURENSUCHE — Erfolgs-"Lock-in"-Sequenz
   ============================================================
   Wenn alle fünf Zahlen stimmen, rasten die Stationen nacheinander
   ein: Ecken-Winkel fahren zu Grün, Nummer + Feld leuchten grün auf
   mit kurzem Scale-Punch, ein Häkchen stempelt sich ins Zahlenfeld.
   Der Versatz kommt aus --lock-delay (pro Station im JS gesetzt).
   Danach öffnet erst das Overlay. Alle Animationen sind rein
   dekorativ und werden bei prefers-reduced-motion abgeschaltet. */

:root {
  --verify-green: #3f7d3a;
  --verify-green-soft: #5a9a54;
  --verify-green-glow: rgba(63, 125, 58, 0.55);
}

/* Grundzustand für weiche Übergänge der Deko-Elemente */
.station {
  transition: border-color 0.45s ease, background 0.45s ease, box-shadow 0.45s ease;
}
.station::before,
.station::after {
  transition: border-color 0.4s ease, width 0.4s ease, height 0.4s ease;
}
.station-num { transition: color 0.45s ease, text-shadow 0.45s ease; }
.station-input { transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease; }

/* Wrapper bleibt (trägt das Grid-Layout, s.o.); Häkchen entfernt —
   das Einrasten zeigt sich allein über Grün + Ton. */
.station-input-wrap {
  position: relative;
  width: 100%;
}

/* --- Der eigentliche Trigger: .is-verified auf der Station --- */
.station.is-verified {
  animation: station-lock-punch 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--lock-delay, 0s);
  border-color: var(--verify-green);
  background: linear-gradient(0deg, rgba(63, 125, 58, 0.08), rgba(63, 125, 58, 0.08)), var(--paper);
  box-shadow: 0 0 0 1px var(--verify-green), 0 6px 22px -6px var(--verify-green-glow);
}
.station.is-verified::before,
.station.is-verified::after {
  border-color: var(--verify-green);
  width: 26px;
  height: 26px;
  animation: station-corner-flare 0.55s ease both;
  animation-delay: var(--lock-delay, 0s);
}
.station.is-verified .station-num {
  color: var(--verify-green-soft);
  text-shadow: 0 0 18px var(--verify-green-glow);
}
.station.is-verified .station-input {
  border-color: var(--verify-green);
  background: rgba(63, 125, 58, 0.12);
  color: var(--verify-green);
  box-shadow: inset 0 0 0 1px var(--verify-green), 0 0 16px -2px var(--verify-green-glow);
}

@keyframes station-lock-punch {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}
@keyframes station-corner-flare {
  0%   { filter: drop-shadow(0 0 0 var(--verify-green-glow)); }
  45%  { filter: drop-shadow(0 0 8px var(--verify-green-glow)); }
  100% { filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
}

/* Button quittiert am Ende der Kette grün (statt des Wartetexts) */
.spurensuche-btn.is-verified {
  background: var(--verify-green);
  box-shadow: 0 0 0 0 var(--verify-green-glow), 0 0 26px 4px var(--verify-green-glow);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .station.is-verified,
  .station.is-verified::before,
  .station.is-verified::after {
    animation: none !important;
  }
}
