/* Farben hier anpassen, um das Design an Sonnentaler anzugleichen */
:root {
  --navy: #14213d;
  --navy-2: #22315a;
  --sun: #ffc93c;
  --sun-2: #ffb703;
  --accent: #c2410c;
  --bg: #faf8f3;
  --card: #ffffff;
  --line: #e7e2d6;
  --muted: #5b6475;
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--navy); line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.embed { background: transparent; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }

/* Kopf */
.hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 22px 20px; position: relative; overflow: hidden; margin-bottom: 18px; }
.hero > * { position: relative; z-index: 1; }
.hero::after { content: ""; position: absolute; right: -58px; top: -58px; width: 150px; height: 150px; z-index: 0; border-radius: 50%; background: radial-gradient(circle, var(--sun) 0 38%, transparent 39%), repeating-conic-gradient(var(--sun) 0 6deg, transparent 6deg 18deg); opacity: .9; mask: radial-gradient(circle, #000 0 70%, transparent 71%); }
.hero .kicker { max-width: 72%; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--sun); font-weight: 700; }
.hero h1 { margin: 6px 0 4px; font-size: clamp(24px, 5vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -.01em; max-width: 80%; }
.hero p { margin: 0; color: #cfd6e6; font-size: 15px; max-width: 88%; }

/* Ticketliste */
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 22px 0 10px; }
.tickets { display: grid; gap: 10px; }
.tk { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; transition: border-color .15s, box-shadow .15s; }
.tk.has-qty { border-color: var(--sun-2); box-shadow: 0 0 0 2px rgba(255,183,3,.25); }
.tk.soldout { opacity: .55; }
.tk h3 { margin: 0; font-size: 17px; font-weight: 750; }
.tk .sub { color: var(--muted); font-size: 14px; }
.tk .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #eef1f7; color: var(--navy-2); }
.badge.eb { background: var(--sun); color: var(--navy); }
.badge.low { background: #fde8e1; color: var(--accent); }
.tk .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.price { font-size: 19px; font-weight: 800; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 20px; font-weight: 700; color: var(--navy); }
.stepper button:disabled { color: #c8ccd6; cursor: default; }
.stepper span { min-width: 28px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Formular */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 650; }
.field input, .field select, .field textarea { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--sun-2); outline-offset: 1px; border-color: var(--sun-2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 16px; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--navy); flex: none; }
.summary { display: grid; gap: 4px; font-size: 15px; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin-bottom: 16px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; }
.summary .total { font-weight: 800; font-size: 18px; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 18px; border-radius: 12px; border: 0; font-weight: 750; font-size: 16px; text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-sun { background: var(--sun); color: var(--navy); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--navy); }
.btn:disabled { opacity: .5; cursor: default; }
.pay-grid { display: grid; gap: 10px; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.error { background: #fdecec; color: #991b1b; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.note { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }

/* Leiste unten */
.bar { position: sticky; bottom: 0; margin-top: 16px; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 12px 12px 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 28px rgba(20,33,61,.25); }
.bar .sum { font-size: 14px; color: #cfd6e6; }
.bar .sum b { display: block; color: #fff; font-size: 20px; }
.bar .btn { width: auto; }

/* Bankdaten */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; background: var(--bg); padding: 14px; border-radius: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; word-break: break-word; }

/* Ticketansicht */
.ticket { background: var(--card); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); max-width: 420px; margin: 0 auto 18px; box-shadow: 0 10px 30px rgba(20,33,61,.08); }
.ticket .top { background: var(--navy); color: #fff; padding: 16px 20px; }
.ticket .top .kicker { color: var(--sun); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.ticket .top h2 { margin: 4px 0 0; font-size: 20px; }
.ticket .body { padding: 18px 20px 20px; text-align: center; position: relative; }
.ticket .body::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; border-top: 2px dashed var(--line); }
.ticket .qr { width: min(260px, 70vw); height: auto; image-rendering: pixelated; margin: 10px auto 6px; display: block; }
.ticket .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px; letter-spacing: .06em; }
.ticket h3 { margin: 6px 0 0; font-size: 22px; }
.ticket .days { font-weight: 700; margin-top: 4px; }
.status { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 99px; }
.status.ok { background: #e6f6ec; color: #166534; }
.status.used { background: #eef1f7; color: var(--navy-2); }
.status.bad { background: #fdecec; color: #991b1b; }
.foot { text-align: center; font-size: 12.5px; color: var(--muted); margin: 26px 0 10px; line-height: 1.6; }
.foot a { color: var(--muted); }

@media (max-width: 520px) {
  .wrap { padding: 12px; }
  .tk { grid-template-columns: 1fr; }
  .tk .right { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  .ticket { box-shadow: none; page-break-inside: avoid; }
}
