/* ============================================================
   Geburtstagsfeier – Gemeinsames Stylesheet
   Design-Sprache nach teenage.engineering/products: fast weißer
   Grund (#f5f5f5), große, leichte Grotesk-Schrift in Schwarz mit
   enger Laufweite, Orange als einzige Akzentfarbe (Etiketten wie
   "UPDATE", Zahlen), Gerätefront-Beschriftungen in Großbuchstaben,
   dunkles LCD-Feld für den Countdown, Tasten wie am Gerät,
   gelbes Warndreieck für Hinweise, schwarze Fußleiste.
   Einfach anpassbar über die CSS-Variablen unten
   (Akzentfarbe zusätzlich im Admin unter Einstellungen).
   ============================================================ */

/* Schriften liegen lokal im Ordner assets/fonts (keine Verbindung zu Google & Co., DSGVO-freundlich).
   Inter Tight und DSEG7: SIL Open Font License, Lizenztexte liegen im selben Ordner. */
@font-face { font-family: "Inter Tight"; src: url("fonts/InterTight-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "DSEG7"; src: url("fonts/DSEG7Classic-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --color-primary: #ec5b2b;          /* Orange – Akzent, wird in den Einstellungen überschrieben */
  --color-primary-dark: #cf4416;
  --color-bg: #f5f5f5;               /* Seitengrund */
  --color-bg-alt: #e9e9e7;
  --color-card: #ffffff;             /* Gerätefront / Modul */
  --color-text: #0f0f0f;
  --color-muted: #6f6f6c;
  --color-border: #d9d9d5;           /* feine Linie */
  --color-line: #0f0f0f;             /* kräftige Linie */
  --color-ok: #14803c;
  --color-ok-bg: #dff1e5;
  --color-warn: #b45309;
  --color-warn-bg: #fbeacc;
  --color-error: #c62828;
  --color-error-bg: #f9dcdc;
  --radius: 6px;
  --radius-sm: 4px;
  --yellow: #f2b84b;                 /* Warndreieck-Gelb */
  --lcd-bg: #121212;
  --lcd-fg: #f4f4f0;

  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --lcd: "DSEG7", var(--mono);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--color-bg); }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a { color: var(--color-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-primary-dark); }

::selection { background: var(--color-primary); color: #fff; }

/* Mono-Beschriftung (Seriennummer-Optik) */
.tag, .eyebrow, .info-grid .label, .countdown .label, .stat-tile .lbl, .badge, table.data-table th, .nav-badge {
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 60px;
  counter-reset: unit;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 26px;
  text-align: left;
  position: relative;
}
.hero.has-image {
  max-width: none;
  background: #000;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 56px max(20px, calc((100% - 640px) / 2)) 36px;
}
.hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.7) 100%);
}
.hero > * { position: relative; z-index: 1; }
/* Etikett wie "UPDATE" auf der Referenzseite: orange Fläche, weiße Versalien */
.hero .eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 3px 14px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .02em;
  background: var(--color-primary);
  color: #fff;
}
.hero h1 {
  font-size: clamp(46px, 14vw, 104px);
  line-height: .88;
  margin: 0 0 18px;
  font-weight: 400;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: inherit;
  overflow-wrap: anywhere;
}
.hero-kicker { margin: 0; font-size: clamp(22px, 6vw, 34px); letter-spacing: -0.04em; line-height: 1; text-transform: uppercase; }
.hero-big { font-size: clamp(120px, 42vw, 280px) !important; line-height: .8 !important; margin: 0 0 14px -0.04em !important; letter-spacing: -0.07em !important; text-transform: none !important; }
.hero-sub { margin: 0 0 22px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.hero-claim { margin: 0 0 4px; font-size: clamp(22px, 6.4vw, 34px); letter-spacing: -0.03em; line-height: 1.1; }
.hero-range { margin: 0 0 14px; font-size: clamp(22px, 6.4vw, 34px); letter-spacing: -0.03em; line-height: 1.1; color: var(--color-primary); }
.hero .sub {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--color-text);
}
.hero.has-image .sub { color: rgba(255,255,255,.9); }

/* ---------- Countdown (dunkles Display wie beim K.O. II) ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 28px;
  background: #2b2b2b;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 28px -12px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.04);
}
.countdown .unit {
  background: linear-gradient(180deg, #1c1c1c 0%, var(--lcd-bg) 100%);
  padding: 16px 6px 10px;
  text-align: center;
}
.countdown .num {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 9vw, 50px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--lcd-fg);
  text-shadow: 0 0 16px rgba(255,255,255,.18);
}
.countdown .label { font-size: 10px; color: var(--color-primary); margin-top: 6px; display: block; }

/* ---------- Karten = Module ---------- */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 #fff inset, 0 18px 30px -22px rgba(0,0,0,.35);
  padding: 22px 22px 26px;
  margin: 16px auto;
  position: relative;
  counter-increment: unit;
}
.card h2 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-line);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--color-text);
}
/* laufende Nummer in Orange – wie die Versionsnummern in der Referenz */
.card h2::before {
  order: 2;
  margin-left: auto;
  content: counter(unit, decimal-leading-zero);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-primary);
  flex: none;
}
.card + .card { margin-top: 16px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--color-border);
}
.info-grid .icon { display: none; }
.info-grid > div:not(.icon) { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.info-grid .label { font-size: 11px; color: var(--color-muted); margin-bottom: 3px; }
.info-grid .value { font-size: 20px; font-weight: 400; letter-spacing: -0.025em; }
.info-grid .value.small { font-size: 15px; font-weight: 400; }

.program-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-border); }
.program-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 14px;
}
.program-time { font-weight: 400; color: var(--color-primary); min-width: 56px; }

/* ---------- Buttons = Pillen wie "accept all" / "settings" ---------- */
.btn {
  display: inline-block;
  background: #232323;
  color: #fff !important;
  padding: 13px 28px;
  border-radius: 980px;
  text-decoration: none !important;
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.01em;
  border: 1px solid #232323;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease, transform .08s ease;
}
.btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff !important; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.btn.btn-secondary { background: transparent; color: var(--color-text) !important; border: 1px solid var(--color-line); }
.btn.btn-secondary:hover { background: var(--color-text); border-color: var(--color-text); color: #fff !important; }
.btn.btn-danger { background: var(--color-error); border-color: var(--color-error); color: #fff !important; }
.btn.btn-danger:hover { background: #9d1c1c; border-color: #9d1c1c; }
.btn.btn-block { display: block; width: 100%; }
.btn.btn-sm { padding: 8px 16px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Formulare ---------- */
form label {
  display: block;
  margin-bottom: 18px;
  font-weight: 400;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text);
}
form input[type="text"],
form input[type="tel"],
form input[type="email"],
form input[type="number"],
form input[type="password"],
form input[type="date"],
form input[type="time"],
form input[type="search"],
form textarea,
form select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font);
  margin-top: 6px;
  background: #fff;
  color: var(--color-text);
  transition: box-shadow .12s ease, border-color .12s ease;
}
form input, form select, form textarea { text-transform: none; letter-spacing: -0.005em; }
form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, .28);
}
form textarea { min-height: 90px; resize: vertical; }
form .hint { font-weight: 400; color: var(--color-muted); font-size: 13px; margin-top: 4px; }

.radio-group { display: flex; gap: 10px; margin-top: 8px; }
.radio-card {
  flex: 1;
  border: 1px solid #000;
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  font-weight: 400;
  font-size: 17px;
  background: linear-gradient(180deg, #fff 0%, #ececea 100%);
  color: var(--color-text);
  box-shadow: 0 4px 0 #000, 0 10px 14px -8px rgba(0,0,0,.4);
  transition: transform .08s ease, box-shadow .08s ease, background-color .12s ease;
}
/* Radio-Eingabe nur optisch verstecken (NICHT display:none): sonst kann der
   Browser bei "required" keine Fehlermeldung anzeigen und das Formular
   scheitert ohne jede Rückmeldung; außerdem bleibt es per Tastatur bedienbar. */
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; width: 100%; height: 100%; top: 0; left: 0; margin: 0; cursor: pointer; }
.radio-card:focus-within { box-shadow: 0 0 0 3px rgba(255, 90, 31, .45); }
.radio-card.yes.checked { background: #232323; color: #fff; transform: translateY(4px); box-shadow: 0 0 0 #000, inset 0 2px 6px rgba(0,0,0,.5); }
.radio-card.no.checked { background: var(--color-primary); border-color: #000; color: #fff; transform: translateY(4px); box-shadow: 0 0 0 #000, inset 0 2px 6px rgba(0,0,0,.35); }

/* ---------- Badges / Status ---------- */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid currentColor;
}
.badge-offen { background: var(--color-warn-bg); color: var(--color-warn); }
.badge-zugesagt { background: var(--color-ok-bg); color: var(--color-ok); }
.badge-abgesagt { background: var(--color-error-bg); color: var(--color-error); }
.badge-angemeldet { background: #fff; color: var(--color-primary-dark); }

/* ---------- Hinweise (Warndreieck-Gelb wie der Cookie-Hinweis der Referenz) ---------- */
.notice { padding: 12px 14px 12px 48px; border-radius: var(--radius); font-size: 15px; margin-bottom: 16px; position: relative; background: #fff; border: 1px solid var(--color-line); }
.notice::before { content: ""; position: absolute; left: 14px; top: 14px; width: 22px; height: 20px; background: #0f0f0f; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.notice-ok { background: #e3f2e8; color: #0b4d24; border-color: var(--color-ok); }
.notice-ok::before { background: var(--color-ok); clip-path: circle(50%); width: 18px; height: 18px; }
.notice-warn { background: var(--yellow); color: #1a1200; border-color: #8a6410; }
.notice-error { background: #fbe0de; color: #6e1313; border-color: var(--color-error); }
.notice-error::before { background: var(--color-error); }
.notice a { color: inherit; }

/* ---------- Fußleiste (schwarz wie bei der Referenz) ---------- */
.site-footer {
  background: #000;
  color: #bdbdb8;
  text-align: left;
  font-size: 14px;
  padding: 36px max(20px, calc((100% - 640px) / 2)) 44px;
  margin-top: 40px;
}
.site-footer a { color: #fff; }

/* ---------- Ticket ---------- */
.ticket {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: 0 18px 30px -22px rgba(0,0,0,.4);
  padding: 0 0 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ticket::before { content: "EINLASS"; display: block; padding: 5px 0; background: var(--color-primary); color: #fff; font-size: 14px; letter-spacing: .08em; margin-bottom: 20px; }
.ticket h2 { justify-content: center; border-bottom: none; margin-bottom: 4px; padding: 0 20px; color: var(--color-text); }
.ticket h2::before { display: none; }
/* QR-Code-Box bleibt IMMER hell, damit der Code zuverlässig scannbar bleibt */
.ticket .qr-box { margin: 20px auto; display: inline-block; padding: 14px; background: #fff; border: 2px solid var(--color-line); border-radius: var(--radius); }
.ticket .ticket-meta { text-align: left; margin: 20px 22px 0; padding-top: 16px; border-top: 2px dashed var(--color-line); position: relative; }
.ticket .ticket-meta::before, .ticket .ticket-meta::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-bg); border: 1px solid var(--color-line);
}
.ticket .ticket-meta::before { left: -33px; }
.ticket .ticket-meta::after { right: -33px; }
.ticket .ticket-meta .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.ticket .ticket-meta .row:last-child { border-bottom: none; }
.ticket .ticket-meta .row span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); padding-top: 2px; }
.ticket .ticket-meta .row span:last-child { color: var(--color-text); font-weight: 400; font-size: 16px; text-align: right; }

@media print {
  body * { visibility: hidden; }
  .ticket, .ticket * { visibility: visible; }
  .ticket { position: absolute; top: 0; left: 0; right: 0; background: #fff !important; color: #000 !important; border: 1px solid #000; }
  .ticket .ticket-meta::before, .ticket .ticket-meta::after { display: none; }
  .no-print { display: none !important; }
}

/* ============================================================
   ADMIN-BEREICH
   ============================================================ */
.admin-body { background: var(--color-bg); }
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-login-wrap .card { max-width: 420px; width: 100%; }

.admin-header {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-header a { color: var(--color-text); text-decoration: none; }
.admin-header .brand { font-weight: 400; font-size: 24px; line-height: .95; letter-spacing: -0.05em; }
.admin-header .brand:hover { color: var(--color-primary); }
.admin-nav { display: flex; gap: 0 4px; flex-wrap: wrap; }
.admin-nav a {
  padding: 5px 10px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.admin-nav a:hover { color: var(--color-primary); }
.admin-nav a.active { background: var(--color-primary); color: #fff; }
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; counter-reset: unit; }
.admin-wrap h1 { font-size: 44px; font-weight: 400; letter-spacing: -0.055em; line-height: .95; text-transform: uppercase; margin: 0 0 12px; }

.nav-badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 980px; background: var(--color-primary); color: #fff; font-size: 12px; font-weight: 400; text-align: center; letter-spacing: 0; }
.admin-nav a.active .nav-badge { background: #fff; color: var(--color-primary); }

/* Burger-Menü (Handy/Tablet) */
.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--color-line); border-radius: 980px; background: transparent; color: var(--color-text);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.nav-toggle-bars { position: relative; display: block; width: 20px; height: 14px; }
.nav-toggle-bars i { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.nav-toggle-bars i:nth-child(1) { top: 0; }
.nav-toggle-bars i:nth-child(2) { top: 6px; }
.nav-toggle-bars i:nth-child(3) { top: 12px; }
.nav-toggle.open .nav-toggle-bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle.open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.nav-toggle-badge { position: absolute; top: -7px; right: -7px; margin: 0; }
.nav-toggle.open .nav-toggle-badge { display: none; }
@media (max-width: 1400px) {
  .admin-header:not(.few) .nav-toggle { display: inline-flex; }
  .admin-header:not(.few) .admin-nav {
    display: none; flex: 0 0 100%; flex-direction: column; flex-wrap: nowrap; gap: 0;
    max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    margin-top: 4px; border-top: 1px solid var(--color-line);
  }
  .admin-header:not(.few) .admin-nav.open { display: flex; }
  .admin-header:not(.few) .admin-nav a { padding: 10px 6px; border-radius: 0; font-size: 20px; border-bottom: 1px solid var(--color-border); }
  .admin-header:not(.few) .admin-nav a.active { background: none; color: var(--color-primary); }
}
@media (max-width: 720px) {
  .admin-header.few .nav-toggle { display: inline-flex; }
  .admin-header.few .admin-nav { display: none; flex: 0 0 100%; flex-direction: column; margin-top: 4px; border-top: 1px solid var(--color-line); }
  .admin-header.few .admin-nav.open { display: flex; }
  .admin-header.few .admin-nav a { padding: 12px 6px; border-radius: 0; font-size: 20px; border-bottom: 1px solid var(--color-border); }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1px; margin-bottom: 24px; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-border); overflow: hidden; }
.stat-tile { padding: 16px 18px; background: var(--color-card); }
.stat-tile .num { font-size: 40px; font-weight: 400; letter-spacing: -0.05em; line-height: 1.05; }
.stat-tile .lbl { font-size: 11px; color: var(--color-muted); margin-top: 4px; }
.stat-tile.accent-warn .num { color: var(--color-warn); }
.stat-tile.accent-ok .num { color: var(--color-ok); }
.stat-tile.accent-error .num { color: var(--color-error); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
}
table.data-table th, table.data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 14px; color: var(--color-text); }
table.data-table th { background: transparent; font-size: 11px; font-weight: 400; color: var(--color-muted); border-bottom: 1px solid var(--color-line); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table td.num, table.data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table a { color: var(--color-text); font-weight: 400; }
table.data-table td.num { color: var(--color-primary); }
table.data-table tr:hover > td { background: #fafaf8; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; justify-content: space-between; }
.filter-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-pills a {
  padding: 6px 12px;
  border-radius: 980px;
  background: transparent;
  border: 1px solid var(--color-line);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--color-text);
}
.filter-pills a:hover { color: var(--color-primary); }
.filter-pills a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.search-box input {
  padding: 10px 16px;
  border-radius: 980px;
  border: 1px solid var(--color-line);
  font-size: 15px;
  min-width: 220px;
  background: #fff;
  color: var(--color-text);
}

.table-scroll { overflow-x: auto; }

.pill-copy { cursor: pointer; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; gap: 0; } }

.muted { color: var(--color-muted); }
.mt-0 { margin-top: 0; }
.small { font-size: 13px; }

video#qr-video { width: 100%; max-width: 420px; border-radius: var(--radius-sm); background: #000; border: 2px solid var(--color-line); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 6px; }
.gallery-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-line); }
.gallery-grid .ph-card { position: relative; }
.gallery-grid .ph-card form { position: absolute; top: 6px; right: 6px; }

/* ============================================================
   CHECK-IN (Einlass) – eine Bildschirmhöhe, große Rückmeldung
   ============================================================ */
body.checkin-fit { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.checkin-fit .admin-header { position: relative; flex: none; }
.admin-wrap.checkin-wrap { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1180px; padding: 12px 16px 12px; display: flex; flex-direction: column; }
.checkin-top { flex: none; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.checkin-top h1 { font-size: 34px; margin: 0; }
.checkin-counters { display: flex; gap: 0; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-card); }
.checkin-counters > div { padding: 6px 12px; border-right: 1px solid var(--color-border); text-align: left; }
.checkin-counters > div:last-child { border-right: none; }
.checkin-counters .num { font-size: 26px; font-weight: 400; letter-spacing: -0.04em; line-height: 1.05; }
.checkin-counters .lbl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.checkin-counters .num .muted { font-size: 13px; font-weight: 400; }
.checkin-tabs { display: none; flex: none; gap: 0; margin-bottom: 10px; border: 1px solid var(--color-line); border-radius: 980px; overflow: hidden; }
.checkin-tabs button { flex: 1; padding: 12px 8px; border: none; background: var(--color-card); color: var(--color-text); font-size: 16px; font-weight: 400; letter-spacing: -0.01em; cursor: pointer; }
.checkin-tabs button + button { border-left: 1px solid var(--color-line); }
.checkin-tabs button[aria-selected="true"] { background: var(--color-primary); color: #fff; }
.checkin-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkin-panel { min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 14px 16px; overflow: hidden; }
.checkin-panel h2 { flex: none; font-size: 22px; margin-bottom: 10px; padding-bottom: 8px; }
.checkin-panel h2::before { display: none; }
.checkin-panel .small { flex: none; margin: 0 0 8px; }
.scan-stage { position: relative; flex: 1 1 auto; min-height: 120px; background: #000; border: 2px solid var(--color-line); border-radius: var(--radius-sm); overflow: hidden; }
.scan-stage video#qr-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border: none; border-radius: 0; object-fit: cover; }
.scan-frame { position: absolute; inset: 14% 14%; pointer-events: none;
  background:
    linear-gradient(var(--color-primary), var(--color-primary)) top left / 26px 3px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) top left / 3px 26px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) top right / 26px 3px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) top right / 3px 26px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) bottom left / 26px 3px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) bottom left / 3px 26px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) bottom right / 26px 3px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) bottom right / 3px 26px no-repeat; }
.scan-stage.paused video { filter: grayscale(1) brightness(.5); }
.scan-stage.paused .scan-frame { display: none; }
.scan-stage .scan-overlay { position: absolute; inset: 0; display: none; overflow-y: auto; }
.scan-stage.paused .scan-overlay { display: flex; flex-direction: column; justify-content: center; padding: 10px; }
.checkin-search-panel .checkin-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.checkin-recent { flex: none; max-height: 28%; overflow-y: auto; margin-top: 10px; border-top: 1px solid var(--color-line); padding-top: 8px; }
.checkin-recent h3 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 4px; color: var(--color-muted); }
@media (max-width: 720px) {
  .checkin-tabs { display: flex; }
  .checkin-grid { grid-template-columns: 1fr; }
  .checkin-grid .checkin-panel { display: none; }
  .checkin-grid .checkin-panel.active { display: flex; }
  .checkin-top h1 { font-size: 18px; }
  .checkin-top .btn-row { display: none; }
  .checkin-counters > div { padding: 5px 10px; }
}

.checkin-result { margin-top: 10px; }
.checkin-big { border-radius: var(--radius); padding: 16px 14px; text-align: center; border: 2px solid var(--color-line); background: #fff; }
.checkin-big.ok { background: var(--color-ok); color: #fff; border-color: #0d5a29; }
.checkin-big.warn { background: var(--yellow); color: #1a1000; border-color: #8a6410; }
.checkin-big.error { background: var(--color-error); color: #fff; border-color: #7f1414; }
.checkin-icon { font-size: 44px; line-height: 1; font-weight: 400; margin-bottom: 6px; }
.checkin-msg { font-size: 24px; font-weight: 400; letter-spacing: -0.03em; }
.checkin-meta { margin-top: 4px; font-size: 14px; opacity: .95; }
.checkin-big .btn { background: #fff; color: #0f0f0f !important; border-color: #0f0f0f; }
.checkin-big .btn:hover { background: #0f0f0f; color: #fff !important; }
.checkin-search { width: 100%; padding: 13px 18px; font-size: 18px; border-radius: 980px; border: 1px solid var(--color-line); background: #fff; color: var(--color-text); font-family: var(--font); }
.checkin-search:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(255,90,31,.28); }
.checkin-list { margin-top: 10px; }
.checkin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.checkin-row:last-child { border-bottom: none; }
.checkin-row-name { font-weight: 400; font-size: 18px; letter-spacing: -0.02em; }

/* ---------- Ausfall-Liste (Druck) ---------- */
.print-sheet { background: #fff; color: #000; padding: 16px; border-radius: 0; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-sheet th, .print-sheet td { border-bottom: 1px solid #999; padding: 6px 6px; text-align: left; }
.print-sheet th { border-bottom: 2px solid #000; font-size: 12px; }
.print-sheet .box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #000; border-radius: 0; }

/* Datei-Auswahl */
input[type="file"] { color: var(--color-text); font-family: var(--font); font-size: 15px; margin: 8px 0 14px; max-width: 100%; }
input[type="file"]::file-selector-button {
  background: transparent; color: var(--color-text); border: 1px solid var(--color-line);
  border-radius: 980px; padding: 8px 16px; margin-right: 12px; font-family: var(--font); font-size: 15px; cursor: pointer;
}

/* Trennlinie in Karten */
.card hr { border: none; border-top: 1px solid var(--color-border); margin: 18px 0; }
.card h3 { font-size: 12px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; margin: 22px 0 8px; color: var(--color-muted); }
code, pre, kbd { font-family: var(--mono); font-size: .92em; background: var(--color-bg-alt); padding: 1px 5px; border-radius: 2px; }
pre { padding: 10px 12px; overflow-x: auto; }

/* ---------- Warndreieck (Erkennungszeichen, Wartestatus) ---------- */
.triangle { position: relative; width: 100%; max-width: 440px; margin: 28px auto 12px; aspect-ratio: 1 / .92; color: #1a1200; }
.triangle-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 18px rgba(0,0,0,.18)); }
.triangle-body { position: absolute; left: 0; right: 0; bottom: 6%; padding: 0 12%; text-align: center; display: flex; flex-direction: column; align-items: center; }
.triangle-hand { width: 30%; min-width: 70px; margin-bottom: 10px; }
.triangle-body p { margin: 0 0 14px; font-size: clamp(14px, 3.6vw, 18px); line-height: 1.25; letter-spacing: -0.015em; }
.triangle-body p a { color: inherit; }
.triangle-body .btn-row { justify-content: center; flex-wrap: nowrap; gap: 8px; width: 100%; }
.triangle-body .btn { padding: 10px 14px; font-size: clamp(14px, 3.8vw, 17px); flex: 1 1 0; white-space: nowrap; }
.triangle-body .btn:not(.btn-secondary) { background: #232323; border-color: #232323; color: var(--yellow) !important; }
.triangle-body .btn.btn-secondary { border-color: #232323; color: #232323 !important; }
.triangle-body .btn.btn-secondary:hover { background: #232323; color: var(--yellow) !important; }
.triangle-body .btn:not(.btn-secondary):hover { background: #000; }

/* Karten in Rastern nicht schrumpfen lassen; Tabellen in Karten ohne doppelten Rahmen */
.two-col > .card { margin-left: 0; margin-right: 0; width: auto; }
.card table.data-table { border: none; border-top: 1px solid var(--color-line); border-radius: 0; background: transparent; }
.card table.data-table th { padding-left: 0; }
.card table.data-table td:first-child { padding-left: 0; }
.stat-grid > a { display: flex; text-decoration: none; }
.stat-grid > a > .stat-tile { flex: 1; }
.checkin-grid > .checkin-panel, .checkin-grid > .checkin-panel + .checkin-panel { margin: 0; }

/* Admin-Listen mit Aktionen: auf dem Handy als Karten statt als breite Tabelle */
@media (max-width: 700px) {
  table.data-table.stack, table.data-table.stack tbody { display: block; width: 100%; }
  table.data-table.stack tr:has(th) { display: none; }
  table.data-table.stack tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
  table.data-table.stack tr:last-child { border-bottom: none; }
  table.data-table.stack td { display: block; padding: 2px 0; border: none; text-align: left; width: auto !important; }
  table.data-table.stack td:empty { display: none; }
  table.data-table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); margin: 6px 0 4px; }
  table.data-table.stack td.num { text-align: left; }
  table.data-table.stack td.num::before { content: "Personen: "; color: var(--color-muted); }
  table.data-table.stack td:last-child { padding-top: 10px; }
  table.data-table.stack tr:hover > td { background: transparent; }
  table.data-table.stack .btn-row { gap: 8px; }
}

/* Handy: Eingabefelder mindestens 16px, sonst zoomt iOS beim Antippen die Seite heran */
@media (max-width: 700px) {
  input, select, textarea { font-size: 16px; }
}

/* Sehr schmale Handys (320 px): lange Überschriften dürfen nicht über den Rand laufen */
.admin-wrap h1 { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 400px) {
  .admin-wrap h1 { font-size: clamp(26px, 9vw, 44px); }
}

/* Admin-Kopfzeile auf schmalen Handys: Titel kürzt sich, der Burger bleibt in derselben Zeile */
@media (max-width: 1400px) {
  .admin-header:not(.few) .brand { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


/* ============================================================
   DESIGN 2 – hochwertiger: leichte Schrift, Gerätefront mit
   LCD-Display, flache Abschnitte, Piktogramme
   ============================================================ */

/* ---------- Typografie ---------- */
body { font-feature-settings: "cv11", "ss03"; }
.hero-big { font-weight: 200 !important; letter-spacing: -0.075em !important; }
.hero-kicker, .hero-claim, .hero-range { font-weight: 300; }
.hero .sub { font-weight: 300; color: var(--color-muted); }
.hero-sub { font-weight: 400; color: var(--color-muted); }
.card h2 { font-weight: 300; }

/* ---------- Gerätefront (Countdown + Taste) ---------- */
.device {
  position: relative;
  margin-top: 38px;
  padding: 26px 0 20px;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #e9e8e3 0%, #d9d8d2 100%);
  border: 1px solid #c8c7c1;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -2px 0 rgba(0,0,0,.05) inset,
    0 34px 44px -26px rgba(0,0,0,.5),
    0 8px 14px -8px rgba(0,0,0,.25);
}
/* Schrauben unten links/rechts */
.device::before, .device::after {
  content: ""; position: absolute; bottom: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #c9c8c2 55%, #a9a8a2 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.device::before { left: 10px; }
.device::after { right: 10px; }

/* Anschluss-Etiketten am oberen Rand (wie OUTPUT / INPUT / SYNC) */
.device-ports { position: absolute; top: -1px; left: 18px; display: flex; gap: 6px; }
.device-ports .port {
  padding: 5px 12px 6px; border-radius: 0 0 7px 7px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  background: #f6f5f0; color: #3a3a37; box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.device-ports .port-o { background: var(--color-primary); color: #fff; }

/* LCD-Glas */
.lcd {
  position: relative; margin: 0 16px; padding: 12px 6px 10px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(180deg, #1b1b1b 0%, #0c0c0c 100%);
  box-shadow: 0 0 0 1px #000, 0 0 0 4px #bdbcb6, 0 0 0 5px rgba(0,0,0,.25), inset 0 2px 10px rgba(0,0,0,.9);
}
.lcd::after {   /* Glanz auf dem Glas */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%);
}
.lcd-top { display: flex; justify-content: space-between; align-items: center; padding: 0 10px 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8a8a84; }
.lcd-top .rec { width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 8px var(--color-primary); animation: rec 2s steps(1) infinite; }
@keyframes rec { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }

.lcd .countdown { margin: 0; background: transparent; box-shadow: none; border-radius: 0; gap: 0; overflow: visible; }
.lcd .countdown .unit { background: transparent; padding: 6px 4px 4px; }
.lcd .countdown .unit + .unit { border-left: 1px solid rgba(255,255,255,.07); }
.lcd .countdown .num {
  display: inline-grid; font-family: var(--lcd); font-weight: 400; font-style: normal;
  font-size: clamp(28px, 9.5vw, 54px); line-height: 1.1; letter-spacing: 0;
  color: #f3f1e7; text-shadow: 0 0 14px rgba(255,244,214,.28);
}
.lcd .countdown .num::before { content: attr(data-ghost); grid-area: 1 / 1; justify-self: end; color: #fff; opacity: .075; text-shadow: none; }
.lcd .countdown .num > span { grid-area: 1 / 1; justify-self: end; }
.lcd .countdown .label { font-size: 9px; letter-spacing: .14em; margin-top: 6px; color: var(--color-primary); }

/* Taste (Hauptbutton im Kopf) */
.device-keys { margin: 20px 16px 0; }
.key {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 17px 22px; border-radius: 9px; text-decoration: none !important;
  font-size: 22px; font-weight: 400; letter-spacing: -0.01em; color: #fff !important;
  background: linear-gradient(180deg, #3b3b39 0%, #1d1d1c 100%);
  box-shadow: 0 5px 0 #000, 0 14px 16px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .09s ease, box-shadow .09s ease;
}
.key .led { width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 10px var(--color-primary); flex: none; }
.key .arr { margin-left: auto; font-weight: 300; font-size: 22px; opacity: .85; }
.key:hover { color: #fff !important; }
.key:active { transform: translateY(4px); box-shadow: 0 1px 0 #000, 0 4px 8px -4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.key:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 4px; }

/* ---------- Abschnitte statt Kartenboxen (nur Gästeseiten) ---------- */
body:not(.admin-body) .card:not(.ticket) {
  background: transparent; border: 0; border-top: 1px solid var(--color-line); border-radius: 0; box-shadow: none;
  padding: 18px 0 8px; margin: 44px auto 0;
}
body:not(.admin-body) .card:not(.ticket) h2 { font-size: clamp(34px, 9vw, 46px); border-bottom: 0; padding-bottom: 0; margin-bottom: 20px; }
body:not(.admin-body) .card:not(.ticket) h2::before { font-size: 13px; letter-spacing: .06em; }

/* ---------- Infozeilen mit Piktogramm ---------- */
.info-grid { grid-template-columns: 40px 1fr; border-top: 0; column-gap: 8px; }
.info-grid .icon {
  display: block; width: 26px; height: 26px; margin: 15px 0 0; background: var(--color-text);
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.info-grid .icon:not([class*="i-"]) { visibility: hidden; }
.info-grid > div:not(.icon) { padding: 14px 0; }
.info-grid .label { font-size: 10px; letter-spacing: .12em; }
.info-grid .value { font-size: 22px; font-weight: 300; letter-spacing: -0.03em; }
.info-grid .value.small { font-size: 16px; font-weight: 400; letter-spacing: -0.01em; }
.info-grid .icon.i-date { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M4%204h16v17H4zM6.5%2010h11v8.5h-11zM9%2012.5h3v3H9zM7%202h2v4H7zM15%202h2v4h-2z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-time { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M12%202a10%2010%200%201%200%200%2020%2010%2010%200%200%200%200-20zM11%206h2v5.6l3.8%202.2-1%201.7L11%2013z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-pin { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M12%202a7%207%200%200%200-7%207c0%205%207%2013%207%2013s7-8%207-13a7%207%200%200%200-7-7zm0%204.5a2.5%202.5%200%201%201%200%205%202.5%202.5%200%200%201%200-5z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-dress { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M8.5%203L2%206.2l2%205%203-1.2V21h10V10l3%201.2%202-5L15.5%203a3.6%203.6%200%200%201-7%200z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-motto { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M2%204h20v13H10l-5%205v-5H2zM6%208h12v2H6zM6%2012h8v2H6z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-gift { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M3%207h18v5H3zM4.5%2013h15v8h-15zM11%207h2v14h-2z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-moon { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M20.5%2014.2A8.8%208.8%200%201%201%209.8%203.5a7%207%200%200%200%2010.7%2010.7z%27/%3E%3C/svg%3E"); }
.info-grid .icon.i-person { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M12%203a4.5%204.5%200%201%201%200%209%204.5%204.5%200%200%201%200-9zM3.5%2021c0-4.6%203.8-7.5%208.5-7.5s8.5%202.9%208.5%207.5z%27/%3E%3C/svg%3E"); }

.program-list li { padding: 14px 0; font-size: 18px; font-weight: 300; }
.program-time { font-family: var(--lcd); font-size: 17px; min-width: 76px; letter-spacing: 0; }

/* ---------- Formulare ---------- */
form label { font-size: 10.5px; letter-spacing: .12em; color: var(--color-muted); font-weight: 500; }
form input[type="text"], form input[type="tel"], form input[type="email"], form input[type="number"],
form input[type="password"], form input[type="date"], form input[type="time"], form input[type="search"],
form textarea, form select { border-radius: 9px; padding: 15px 16px; font-weight: 400; }
.admin-body form label { color: var(--color-text); font-size: 12px; }

/* ---------- Pillen ---------- */
.btn { font-weight: 400; padding: 14px 30px; }

/* ---------- Fußleiste mit großer 4.0 ---------- */
.site-footer { position: relative; overflow: hidden; padding-bottom: 28px; margin-top: 70px; }
.site-footer::after {
  content: "4.0"; display: block; margin: 34px 0 -.14em -.04em; font-size: clamp(130px, 42vw, 300px);
  font-weight: 200; letter-spacing: -0.075em; line-height: .78; color: #181818; user-select: none; pointer-events: none;
}
.checkin-fit .site-footer::after, .admin-body .site-footer::after { display: none; }

/* ---------- Ticket: Kopfbalken wie eine Gerätenase ---------- */
.ticket::before { letter-spacing: .14em; font-size: 12px; padding: 7px 0; }

/* ---------- Einblenden beim Laden ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero > *:nth-child(2) { animation-delay: .06s; } .hero > *:nth-child(3) { animation-delay: .12s; }
  .hero > *:nth-child(4) { animation-delay: .18s; } .hero > *:nth-child(5) { animation-delay: .24s; }
  .hero > *:nth-child(6) { animation-delay: .30s; } .hero > *:nth-child(7) { animation-delay: .36s; }
  .hero > .device { animation-delay: .44s; }
  body:not(.admin-body) .wrap > .card { animation: rise .8s cubic-bezier(.2,.7,.2,1) .5s both; }
}
@media (min-width: 900px) {
  .hero, .wrap { max-width: 720px; }
  .device { margin-top: 46px; }
}

form .hint { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; }
@media (max-width: 480px) { .info-grid .value { font-size: 20px; } }
.admin-login-wrap h1, .admin-login-wrap h2 { font-weight: 300; font-size: 38px; letter-spacing: -0.045em; line-height: 1; }

/* ============================================================
   Dreieck-Bausteine: Dialog, Hinweis, Stopp beim Check-in
   ============================================================ */
html.tri-open { overflow: hidden; }
.tri-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(245,245,245,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tri-overlay[hidden], .tri-hint[hidden] { display: none !important; }
.tri-overlay .triangle { margin: 0; max-width: 440px; }
.tri-overlay .triangle-body p { font-size: clamp(16px, 4.4vw, 21px); }
.tri-overlay .triangle-body .btn { font-size: clamp(15px, 4vw, 18px); }
@keyframes pop { from { opacity: 0; transform: scale(.88) translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .tri-overlay:not([hidden]) .triangle { animation: pop .28s cubic-bezier(.2,.8,.2,1) both; }
  .tri-hint.show .triangle { animation: pop .45s cubic-bezier(.2,.8,.2,1) both; }
}

/* Hinweis-Dreieck unten links (wie die Cookie-Meldung der Referenz) */
.tri-hint { position: fixed; left: 6px; bottom: 6px; width: min(290px, 78vw); z-index: 60; transform-origin: left bottom; }
.tri-hint .triangle { margin: 0; }
.tri-hint .triangle-hand { width: 24%; min-width: 60px; margin-bottom: 6px; }
.tri-hint .triangle-body { bottom: 5%; padding: 0 9%; }
.tri-hint .triangle-body p { font-size: 13px; line-height: 1.25; margin-bottom: 8px; }
.tri-hint .triangle-body .btn { padding: 8px 6px; font-size: 13px; }

/* Check-in: Stopp-Dreieck bei schon eingecheckt / ungültig / nicht freigeschaltet */
.checkin-stop { text-align: center; }
.checkin-stop .triangle { max-width: 280px; margin: 0 auto 10px; }
.checkin-stop .triangle-hand { width: 26%; min-width: 56px; margin-bottom: 6px; }
.checkin-stop .triangle-body { bottom: 5%; padding: 0 10%; }
.checkin-stop .triangle-body p { font-size: 15px; margin-bottom: 0; }
.tri-head { display: block; font-size: 24px; font-weight: 500; letter-spacing: .04em; line-height: 1; margin-bottom: 4px; }

/* ============================================================
   Anmelde-Taste: klar als Button erkennbar
   ============================================================ */
.key { padding: 14px 18px 14px 22px; }
.key-text { display: flex; flex-direction: column; line-height: 1.05; }
.key-text b { font-weight: 400; font-size: 26px; letter-spacing: -0.015em; }
.key-text small { margin-top: 5px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #c9c9c2; }
.key .arr {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1;
  background: var(--color-primary); color: #fff; opacity: 1; font-weight: 400; margin-left: auto; flex: none;
}
@keyframes ledpulse { 0%, 100% { box-shadow: 0 0 6px var(--color-primary); } 50% { box-shadow: 0 0 16px 3px var(--color-primary); } }
@media (prefers-reduced-motion: no-preference) {
  .key .led { animation: ledpulse 1.8s ease-in-out infinite; }
}
.key:hover .arr { background: #fff; color: var(--color-primary); }

.btn-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 14px 28px; }
.btn-cta span { font-size: 24px; letter-spacing: -0.01em; }
.btn-cta small { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #bdbdb6; }
.btn-cta:hover small { color: #fff; }

@media print { .tri-hint, .tri-overlay { display: none !important; } }

/* Check-in: Dreieck-Variante für Warnung/Fehler (weißer Grund, farbiger Rahmen) */
.checkin-big.stop { background: #fff; color: #1a1a1a; border-width: 4px; padding: 10px 10px 14px; }
.checkin-big.stop.warn { border-color: #e08a00; }
.checkin-big.stop.error { border-color: var(--color-error); }
.checkin-big.stop .tri-msg { display: block; }

/* Desktop mit niedrigem Fenster: Kopfbereich schrumpft mit der Fensterhöhe, damit die Taste ohne Scrollen sichtbar bleibt */
@media (min-width: 900px) {
  .hero { padding-top: clamp(20px, 4vh, 48px); }
  .hero-big { font-size: clamp(120px, 24vh, 280px) !important; margin-bottom: 8px !important; }
  .hero .sub { margin-bottom: 0; }
  .device { margin-top: clamp(20px, 4vh, 46px); }
}

/* ============================================================
   Freischalt-Moment (Ticket, einmal pro Gerät)
   ============================================================ */
.reveal {
  position: fixed; inset: 0; z-index: 300; background: #0b0b0b; color: #fff;
  display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
}
.reveal[hidden] { display: none !important; }
#rv-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reveal-inner { position: relative; width: 100%; max-width: 420px; text-align: center; }
.reveal-stamp .triangle { margin: 0 auto 18px; max-width: 310px; }
.reveal-stamp .triangle-hand { width: 26%; min-width: 56px; margin-bottom: 6px; }
.reveal-stamp .triangle-body { bottom: 6%; padding: 0 10%; }
.reveal-stamp .triangle-body p { font-size: 17px; margin-bottom: 0; }
.reveal-stamp .tri-head { font-size: 28px; letter-spacing: .02em; }
.reveal-lcd {
  background: #050505; border: 2px solid #2b2b2b; border-radius: 14px; padding: 16px 16px 18px; text-align: left;
  box-shadow: inset 0 0 22px rgba(0,0,0,.9), 0 0 0 4px #1a1a1a;
}
.reveal-lcd .lbl { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #8d8d89; margin-bottom: 8px; }
.reveal-lcd .txt { font-size: clamp(30px, 9.5vw, 44px); font-weight: 400; letter-spacing: .02em; line-height: 1.05; color: var(--color-primary);
  text-shadow: 0 0 14px color-mix(in srgb, var(--color-primary) 60%, transparent); min-height: 1.05em; overflow-wrap: anywhere; }
.reveal-lcd .txt2 { margin-top: 8px; font-size: 16px; letter-spacing: .04em; color: #e9e9e4; min-height: 1.2em; }
.rv-go { margin-top: 20px; min-width: 200px; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-stamp .triangle { animation: slam .7s cubic-bezier(.2,.9,.3,1.2) both; }
  .reveal-lcd { animation: rvfade .5s ease .9s both; }
  .rv-go { animation: rvfade .5s ease 2.5s both; }
}
@keyframes slam { 0% { opacity: 0; transform: scale(3.2) rotate(-16deg); } 55% { opacity: 1; transform: scale(.93) rotate(3deg); } 78% { transform: scale(1.04) rotate(-1deg); } 100% { transform: none; } }
@keyframes rvfade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media print { .reveal { display: none !important; } }

.rv-go { background: var(--color-primary); border-color: var(--color-primary); color: #fff !important; }
.rv-go:hover { background: #fff; color: #0b0b0b !important; border-color: #fff; }

/* ============================================================
   Schwarzes Ticket (ALL BLACK). QR-Feld bleibt weiß = sicher scannbar.
   ============================================================ */
.ticket { background: #0f0f0f; border-color: #2a2a2a; color: #f2f2ee; box-shadow: 0 24px 40px -24px rgba(0,0,0,.65); }
.ticket h2 { color: #fff; font-weight: 300; letter-spacing: -0.03em; }
.ticket .muted, .ticket .small.muted { color: #a5a5a0; }
.ticket .qr-box { border: 0; border-radius: 14px; padding: 16px; box-shadow: 0 0 0 5px #1c1c1c, 0 0 30px color-mix(in srgb, var(--color-primary) 35%, transparent); }
.ticket .ticket-meta { border-top-color: #3a3a38; }
.ticket .ticket-meta .row { border-bottom-color: #262625; }
.ticket .ticket-meta .row span:first-child { color: #8d8d89; }
.ticket .ticket-meta .row span:last-child { color: #fff; }
.ticket .ticket-meta::before, .ticket .ticket-meta::after { border-color: #2a2a2a; }
.ticket::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.07) 48%, transparent 60%);
  transform: translateX(-120%);
}
@media (prefers-reduced-motion: no-preference) {
  .ticket::after { animation: ticketshine 2.8s ease 1.2s 1 both; }
}
@keyframes ticketshine { to { transform: translateX(120%); } }
@media print {
  .ticket::after { display: none; }
  .ticket h2, .ticket p, .ticket .muted, .ticket .ticket-meta .row span { color: #000 !important; }
  .ticket .qr-box { box-shadow: none; border: 1px solid #000; }
  .ticket .ticket-meta .row { border-bottom-color: #999; }
}

/* ============================================================
   Großer Wunsch (Geldgeschenk): Spendenstand, Balken, Uhr
   ============================================================ */
.wish {
  margin: 28px 0 0; padding: 22px 16px 22px; border-radius: 18px; background: #0f0f0f; color: #f2f2ee;
  box-shadow: 0 24px 40px -26px rgba(0,0,0,.7);
}
.wish .eyebrow { margin: 0 0 12px; }
.wish-title { margin: 0 0 10px; font-size: clamp(36px, 10vw, 52px); font-weight: 300; letter-spacing: -0.04em; line-height: 1; color: #fff; border: 0 !important; padding: 0 !important; }
.wish-title::before { display: none !important; }
.wish-text { margin: 0 0 18px; color: #cfcfc9; font-size: 16px; line-height: 1.45; }
.wish .lcd { margin: 0 0 14px; }
.wish-amount {
  font-family: var(--lcd); font-size: clamp(38px, 12.5vw, 64px); line-height: 1.1; letter-spacing: .01em; text-align: right; padding: 4px 10px 6px;
  color: #f3f1e7; text-shadow: 0 0 14px rgba(255,244,214,.28); overflow-wrap: anywhere;
}
.wish-amount small { font-family: "Inter Tight", Helvetica, Arial, sans-serif; font-size: 12px; letter-spacing: .16em; color: var(--color-primary); margin-left: 8px; text-shadow: none; }
.wish-bar { display: grid; grid-template-columns: repeat(40, 1fr); gap: 2px; margin: 8px 10px 6px; height: 14px; }
.wish-bar i { background: rgba(255,255,255,.09); border-radius: 1px; }
.wish-bar i.on { background: var(--color-primary); box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 70%, transparent); }
.wish-meta { display: flex; justify-content: space-between; padding: 2px 10px 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #a8a8a2; }
.wish-meta span:first-child { color: var(--color-primary); }
.wish .countdown { padding: 0; }
.wish-time .unit .num { font-size: clamp(26px, 8.5vw, 46px); }
.wish-cta { margin: 6px 0 0; width: 100%; }
.wish-cta small { color: #ffe9dd; }
.wish-pay { margin: 12px 0 0; color: #bdbdb6; }
.wish-list { margin-top: 20px; }
.wish-list-head { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8d8d89; padding-bottom: 8px; border-bottom: 1px solid #3a3a38; }
.wish-list ul { list-style: none; margin: 0; padding: 0; }
.wish-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #262625; font-size: 16px; }
.wish-list li span:last-child { color: var(--color-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wish-more { margin: 10px 0 0; color: #8d8d89; }
@media print { .wish { display: none !important; } }
.wish .wish-cta { background: var(--color-primary); border-color: var(--color-primary); color: #fff !important; }
.wish .wish-cta:hover { background: #fff; color: #0f0f0f !important; border-color: #fff; }
.wish .wish-cta:hover small { color: #555; }
.btn-cta.btn-block, .btn-block.btn-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wish .eyebrow { display: inline-block; background: var(--color-primary); color: #fff; padding: 5px 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.reveal { overflow-x: hidden; }
.wish-calc { margin: 0 0 14px; color: #f2b84b; font-size: 17px; letter-spacing: -0.01em; }
.wish-small { margin: 12px 0 0; color: #8d8d89; font-size: 12px; line-height: 1.4; }

.info-grid .icon.i-drink { --i: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20fill-rule=%27evenodd%27%20d=%27M4%203h16l-7%209v7h4v2H7v-2h4v-7z%27/%3E%3C/svg%3E"); }

/* ---- Wunsch-Karte: Dreieck mit Geldschein, Betragsknöpfe, Etappenziele ---- */
.wish .triangle { max-width: 310px; margin: 4px auto 18px; }
.wish .triangle-bg { filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
.wish .triangle-body p { font-size: clamp(12px, 3.3vw, 14px); margin-bottom: 8px; }
.wish .tri-head { font-size: clamp(15px, 4.4vw, 19px); }
.wish .triangle-hand { width: 34%; min-width: 60px; margin-bottom: 6px; }
.wish-next { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; margin: 10px 10px 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.wish-next-lbl { grid-column: 1 / -1; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8d8d89; }
.wish-next-name { color: #fff; font-size: 18px; letter-spacing: -0.01em; }
.wish-next-left { color: var(--color-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wish-parts { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: #cfcfc9; }
.wish-parts span { display: inline-block; margin-right: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #f2b84b; }
.wish-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; margin: 6px 0 8px; }
.wish-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px; background: #f2b84b; color: #1a1200 !important; text-decoration: none; border: 2px solid #f2b84b; border-radius: 40px; min-height: 64px; }
.wish-chip b { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.wish-chip small { font-size: 10px; letter-spacing: .16em; color: #5a4200; }
.wish-chip:hover, .wish-chip:focus-visible { background: #fff; border-color: #fff; }
.wish .wish-cta.wish-cta-alt { background: transparent; border-color: var(--color-primary); }
.wish .wish-cta.wish-cta-alt:hover { background: #fff; border-color: #fff; }
.wish .wish-cta.wish-cta-alt span { font-size: 20px; }

/* ============================================================
   Qualitäts-Runde: Kontrast, Lesbarkeit, Touch-Ziele, Fokus, Druck
   ============================================================ */
:root { --color-primary-ink: color-mix(in srgb, var(--color-primary) 80%, #000); }  /* Orange für weiße Schrift bzw. Text auf Hellgrau (WCAG AA) */
.hero .eyebrow, .ticket::before, .nav-badge, .device-ports .port-o, .wish .eyebrow, .filter-pills a.active,
.admin-nav a.active, .checkin-tabs button[aria-selected="true"], .radio-card.no.checked, .rv-go,
.wish .wish-cta, .btn:hover { background: var(--color-primary-ink); }
.btn:hover, .filter-pills a.active, .rv-go, .wish .wish-cta { border-color: var(--color-primary-ink); }
.hero-range, .program-time, table.data-table td.num, a:hover { color: var(--color-primary-ink); }
.badge-angemeldet { color: var(--color-primary-ink); }
.wish .wish-cta:hover { background: #fff; border-color: #fff; }
.admin-nav a.active .nav-badge { background: #fff; color: var(--color-primary-ink); }
.wish .wish-cta.wish-cta-alt { background: transparent; border-color: var(--color-primary); }

/* Countdown: Ziffern passen auch auf 320–360 px breite Handys */
.lcd .countdown .num { font-size: clamp(24px, 8.2vw, 54px); }
.lcd .countdown .unit { padding: 6px 2px 4px; }
.wish-time .unit .num { font-size: clamp(24px, 8vw, 46px); }

/* Lesbarkeit: nichts unter 11–12 px */
form label { font-size: 12px; }
.lcd .countdown .label, .countdown .label { font-size: 11px; }
.lcd-top, .info-grid .label, .wish-chip small { font-size: 11px; }
.key-text small, .btn-cta small, .wish-meta, .wish-list-head, .wish-next-lbl, .wish-parts span { font-size: 12px; }

/* Dreiecke: Text 15 px+, Knöpfe 44 px hoch */
.triangle-body p { font-size: clamp(15px, 4vw, 18px); }
.triangle-body .btn { min-height: 44px; font-size: clamp(15px, 4vw, 17px); display: inline-flex; align-items: center; justify-content: center; }
.wish .triangle-body p { font-size: clamp(13px, 3.6vw, 15px); }

/* Touch-Ziele: Textlinks großzügig antippbar */
.info-grid .value a, .site-footer a { display: inline-block; padding: 11px 0; }
.site-footer a { padding: 12px 4px; }
.info-grid .value a { margin-right: 6px; }
input[type="file"] { min-height: 44px; padding: 10px; }

/* Fokus gut sichtbar (Tastatur), auch in Eingabefeldern */
form input:focus-visible, form textarea:focus-visible, form select:focus-visible { outline: 3px solid var(--color-primary-ink); outline-offset: 1px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--color-primary-ink); outline-offset: 3px; }

/* Gruppe "Kommst du?" */
.radio-fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.radio-fieldset legend { padding: 0; margin-bottom: 8px; font-size: 12px; letter-spacing: .12em; color: var(--color-muted); font-weight: 500; text-transform: uppercase; }

/* Bewegung reduzieren: Blinker aus, Einblenden ohne lange Verzögerung */
@media (prefers-reduced-motion: reduce) {
  .lcd-top .rec { animation: none; opacity: 1; }
  .key .led { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.admin-body) .wrap > .card { animation-delay: .15s; }
  .rv-go { animation-delay: 1.9s; }
}

/* Kleine Bildschirmhöhe (typisch: WhatsApp-Browser, iPhone SE): Kopfbereich kompakter, damit „I'M IN“ sichtbar bleibt */
@media (max-width: 700px) and (max-height: 760px) {
  .hero { padding-top: 22px; padding-bottom: 14px; }
  .hero .eyebrow { margin-bottom: 8px; }
  .hero-big { font-size: clamp(92px, 20vh, 160px) !important; margin-bottom: 6px !important; }
  .hero-sub { margin-bottom: 10px; font-size: 12px; }
  .hero-claim, .hero-range { font-size: clamp(18px, 5.2vw, 24px); }
  .device { margin-top: 14px; }
}

/* QR-Code im Ticket groß und scharf */
.ticket .qr-box svg { display: block; width: min(64vw, 260px); height: auto; }

/* Druck: Ticket mit Titel, Farbe des Balkens bleibt */
.print-only { display: none; }
@media print {
  .print-only { display: block !important; margin: 0 0 6px; font-size: 20px; font-weight: 500; color: #000 !important; }
  .ticket::before { background: #000 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Statusseiten: kompakter Kopf, die Meldung (Dreieck) steht gleich im ersten Bildschirm */
.hero-compact { padding-top: 26px; padding-bottom: 6px; }
.hero-compact .hero-kicker, .hero-compact .hero-sub, .hero-compact .hero-claim, .hero-compact .hero-range { display: none; }
.hero-compact .hero-big { font-size: clamp(84px, 24vw, 150px) !important; margin-bottom: 6px !important; }
.hero-compact .sub { margin: 0 0 4px; font-size: 16px; }
.hero-compact .device { margin-top: 14px; }

/* Freeze-Fix: lange Namen sprengen Tabellen nicht mehr */
table.data-table td, table.data-table th { overflow-wrap: anywhere; }
