@import url('https://fonts.googleapis.com/css2?family=Rye&family=Alfa+Slab+One&family=Nunito:wght@400;600;700;800;900&display=swap');

/* Schriften: Rye nur fürs Logo, Alfa Slab One für Überschriften, Nunito für alles Lesbare */
:root {
  --red: #b3171d;
  --red-dark: #7a0e12;
  --gold: #f2b632;
  --gold-dark: #b9801a;
  --cream: #fbf1dc;
  --paper: #fffaf0;
  --ink: #2b1608;
  --muted: #6b4e33;
  --navy: #1d1b3a;
  --logo: 'Rye', serif;
  --head: 'Alfa Slab One', serif;
  --body: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--navy);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(242,182,50,.12) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(242,182,50,.10) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 80%, rgba(242,182,50,.10) 0 2px, transparent 3px);
  background-size: 140px 140px, 190px 190px, 230px 230px;
  min-height: 100vh;
}

/* ---------- Zirkusvorhang oben (Samt mit Goldborte), bleibt beim Scrollen stehen ---------- */
.tent { position: sticky; top: 0; z-index: 50; height: calc(44px + env(safe-area-inset-top));
  background:
    linear-gradient(180deg, #f7d27a 0, #b9801a 7px, transparent 8px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 3px, transparent 3px 13px, rgba(255,255,255,.08) 13px 16px, transparent 16px 26px),
    linear-gradient(180deg, #4d080b 0%, #8d1016 55%, #b3171d 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,.35); }
/* Girlanden-Bögen mit Goldborte und Quasten */
.tent::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 26px; pointer-events: none;
  background:
    radial-gradient(ellipse 4px 7px at 0 12px, #f7d27a 0 60%, #b9801a 70%, transparent 75%) 0 0 / 84px 26px repeat-x,
    radial-gradient(ellipse 58% 100% at 50% 0, #b3171d 0 40%, #8d1016 56%, #6d0b10 60%, #f2b632 61% 69%, transparent 70%) 0 0 / 84px 26px repeat-x,
    linear-gradient(#8d1016, #8d1016) 0 0 / 100% 5px no-repeat;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
/* Beim Scrollen hebt sich der Vorhang ein kleines Stück, oben kommt er wieder herunter */
@supports (animation-timeline: scroll()) {
  .tent { animation: valance linear both; animation-timeline: scroll(root); animation-range: 0 180px; }
  @keyframes valance { to { transform: translateY(-40px); } }
}

.wrap { max-width: 480px; margin: 0 auto; padding: 38px 22px 40px; }

/* ---------- Plakat-Karte mit Glühbirnen ---------- */
.poster {
  background: var(--cream); border-radius: 18px; padding: 26px 20px 22px; position: relative;
  border: 6px solid var(--red); box-shadow: 0 0 0 4px var(--gold), 0 18px 40px rgba(0,0,0,.45);
}
.poster::before {
  content: ''; position: absolute; inset: -16px; border-radius: 26px; padding: 6px; pointer-events: none;
  background: radial-gradient(circle, #fff6c8 0 3px, var(--gold) 4px, transparent 5px) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .poster::before { animation: none; } }

.kicker { text-align: center; font-family: var(--head); color: var(--red); letter-spacing: .14em; font-size: 13px; margin: 0; }
.logo {
  font-family: var(--logo); text-align: center; margin: 6px 0 0;
  font-size: clamp(38px, 11vw, 50px); line-height: 1; color: var(--red);
  text-shadow: 2px 2px 0 var(--gold);
}
.logo small { display: block; font-family: var(--head); font-size: .5em; letter-spacing: .3em; margin-top: 8px; color: var(--navy); text-shadow: none; }
.heading { font-family: var(--head); text-align: center; color: var(--red); font-size: 26px; line-height: 1.2; margin: 8px 0 0; font-weight: 400; }
.slogan {
  display: block; width: fit-content; margin: 16px auto 0; background: var(--red); color: #fff;
  font-family: var(--head); font-size: 18px; padding: 8px 20px; transform: rotate(-2deg);
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}
.lead { text-align: center; margin: 16px 4px 4px; font-size: 17px; line-height: 1.5; font-weight: 600; }
.lead b { color: var(--red); font-weight: 800; }
.stars { text-align: center; color: var(--gold-dark); letter-spacing: .5em; margin: 12px 0 6px; font-size: 14px; }

/* ---------- Formular ---------- */
form { margin-top: 8px; }
.f { display: block; font-weight: 800; font-size: 15px; margin: 16px 0 6px; color: var(--navy); }
.f span { font-weight: 600; color: var(--muted); }
input[type=text], textarea {
  width: 100%; font: 600 16px var(--body); color: var(--ink);
  background: var(--paper); border: 2px solid var(--gold-dark); border-radius: 10px; padding: 12px; outline: none;
}
input[type=text]:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,23,29,.18); }
input::placeholder, textarea::placeholder { color: #a08a72; font-weight: 400; }
textarea { resize: none; height: 80px; }
.count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 3px; }
.check { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; font-size: 15px; font-weight: 700; }
.check input { width: 22px; height: 22px; accent-color: var(--red); }
.error { color: var(--red); font-weight: 800; min-height: 22px; margin: 8px 0 0; font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }

/* Song-Suche */
.ac { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--paper);
  border: 2px solid var(--red); border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.ac-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid rgba(185,128,26,.25); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: #fbe6b0; }
.ac-item img, .cover-ph { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; background: var(--gold); display: grid; place-items: center; font-size: 20px; }
.ac-t { font-weight: 800; font-size: 15px; line-height: 1.2; }
.ac-a { font-size: 13px; color: var(--muted); font-weight: 600; }
.ac-free { font-size: 14px; color: var(--muted); font-weight: 700; }
.picked { display: flex; gap: 10px; align-items: center; background: var(--paper); border: 2px solid var(--red); border-radius: 10px; padding: 8px 10px; }
.picked img, .picked .cover-ph { width: 48px; height: 48px; }
.picked .grow { flex: 1; min-width: 0; }
.picked button { font: 800 13px var(--body); background: none; border: 0; color: var(--red); cursor: pointer; padding: 6px; }

/* Varianten */
.tiers { display: grid; gap: 10px; margin-top: 4px; }
.tier { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 2px solid rgba(185,128,26,.5); border-radius: 12px; padding: 12px 14px; cursor: pointer; position: relative; }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier .ico { font-size: 26px; width: 34px; text-align: center; }
.tier .tt { font-weight: 900; font-size: 16px; }
.tier .td { font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.35; }
.tier .price { margin-left: auto; font-family: var(--head); font-size: 22px; color: var(--red); white-space: nowrap; }
.tier:has(input:checked) { border-color: var(--red); background: #fdeccb; box-shadow: 0 0 0 3px rgba(179,23,29,.15); }
.tier .badge { position: absolute; top: -10px; right: 12px; background: var(--red); color: #fff; font: 800 11px var(--body); letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }

.amount { background: #fdeccb; border: 2px solid var(--red); border-radius: 12px; padding: 12px; margin-top: 8px; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chips button { font: 900 16px var(--body); padding: 10px 0; border-radius: 10px; border: 2px solid var(--gold-dark); background: var(--paper); color: var(--ink); cursor: pointer; }
.chips button.on { background: var(--red); border-color: var(--red); color: #fff; }
.amount-in { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.amount-in input { text-align: right; font-size: 20px !important; font-weight: 900 !important; }
.amount-in span { font-family: var(--head); font-size: 24px; color: var(--red); }

.btn {
  display: block; width: 100%; margin-top: 10px; cursor: pointer;
  font-family: var(--head); font-size: 21px; color: var(--ink); background: var(--gold);
  border: 3px solid var(--red-dark); border-radius: 12px; padding: 14px; box-shadow: 0 5px 0 var(--red-dark);
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--red-dark); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; font-size: 16px; box-shadow: none; border-width: 2px; }

.fine { text-align: center; font-size: 14px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; font-weight: 600; }
.fine b { color: var(--red); }

/* ---------- Ticket ---------- */
.ticket {
  margin: 18px auto 6px; width: 240px; background: var(--gold); color: var(--red-dark);
  text-align: center; padding: 14px 10px; border-radius: 6px; border: 2px dashed var(--red-dark);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 14px, #000 15px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 14px, #000 15px) right / 51% 100% no-repeat;
}
.ticket .t1 { font-family: var(--head); font-size: 13px; letter-spacing: .14em; }
.ticket .num { font-family: var(--head); font-size: 60px; line-height: 1.1; }
.ticket .t2 { font-size: 14px; font-weight: 900; }
.summary { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-top: 14px; border: 2px solid rgba(185,128,26,.4); }
.summary img, .summary .cover-ph { width: 56px; height: 56px; border-radius: 6px; flex: none; }
.summary p { margin: 2px 0; }

.footer { text-align: center; color: rgba(251,241,220,.6); font-size: 13px; margin-top: 26px; }

/* ---------- Navigation & Unterseiten ---------- */
.back { display: inline-block; color: var(--gold); font-weight: 900; text-decoration: none; margin: -14px 0 14px; font-size: 15px; }
.okbox { background: #e3f4e7; border: 2px solid #1f7a3a; color: #1f5a2c; border-radius: 12px; padding: 14px; font-weight: 700; margin-top: 14px; }
.field-err { border-color: var(--red) !important; background: #fdeaea !important; }
select { width: 100%; font: 600 16px var(--body); color: var(--ink); background: var(--paper); border: 2px solid var(--gold-dark); border-radius: 10px; padding: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.legal-text { color: var(--ink); line-height: 1.6; font-size: 15px; }
.legal-text h2 { font-family: var(--head); font-weight: 400; color: var(--red); font-size: 19px; margin: 18px 0 6px; }
.todo { background: #fff3c4; border: 2px dashed var(--gold-dark); padding: 2px 6px; border-radius: 6px; font-weight: 800; }
