/* =========================================
    BLOCK 1: GLOBALES FUNDAMENT
    (Variablen, Resets, Basis-Layout)
   ========================================= */

/* --- CSS Variablen --- */
:root {
  /* Neue kinderfreundliche Farbpalette */
  --primary: #FF6B6B;        /* Koralle */
  --secondary: #4ECDC4;      /* Türkis */
  --accent: #FFE66D;         /* Gelb */
  --success: #95E1D3;       /* Mint */
  --text: #2d3436;
  --bg: #f8f9fa;
  --container-bg: #fff;
  
  /* Legacy-Farben (für Kompatibilität) */
  --bg-color: var(--bg);
  --primary-green: var(--success);
  --primary-green-hover: #7dd3c0;
  --accent-blue: var(--secondary);
  --accent-blue-darker: #3ab5a8;
  --btn-gradient-start: var(--success);
  --btn-gradient-end: #7dd3c0;
  --btn-gradient-hover-start: #a8e8d8;
  --btn-gradient-hover-end: var(--success);
  --secondary-blue: var(--secondary);
  --secondary-blue-hover: var(--accent-blue-darker);
  
  /* Fonts */
  --font-heading: 'Fredoka One', cursive;
  --font-body: 'Open Sans', sans-serif;
  --font-family: var(--font-body);
  
  /* Design-Tokens */
  --transition-speed: 0.3s;
  --border-radius: 12px;
  --container-radius: 15px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --scanner-border-color: #00ff00;
  --scanner-corner-size: 20px;
  --scanner-corner-thickness: 4px;
}

/* --- Globale Resets & Body --- */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
  width: 100%;
}
body {
  padding: 20px;
  min-height: 100vh;
}

/* --- Allgemeine Layout-Container & Typografie --- */
.container {
  background: var(--container-bg);
  padding: 30px;
  border-radius: var(--container-radius);
  box-shadow: var(--box-shadow);
  margin: 40px auto;
  max-width: 800px;
  width: 95%;
  text-align: center;
  border: 2px solid rgba(255, 107, 107, 0.1);
}
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin-top: 0;
  font-weight: 400;
  letter-spacing: 0.5px;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
  color: var(--secondary);
}
.page-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.section-title {
  margin-top: 25px;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  border-bottom: 3px solid var(--secondary);
  padding-bottom: 8px;
  margin-bottom: 20px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.divider {
  width: 1px;
  height: 30px;
  background-color: #ccc;
}

/* =========================================
    BLOCK 2: KOMPONENTEN & MODULE
    (Buttons, Formulare, Lightbox, etc.)
   ========================================= */

/* --- Buttons (Refactored & Consolidated) --- */
/* Basis-Stil für alle klickbaren Elemente */
.button, button, .btn-scanner, .btn-login, .plus-btn, .minus-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  margin: 5px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  text-align: center;
  color: #fff;
  transition: all var(--transition-speed) ease;
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
}
.button:hover, button:hover, .btn-scanner:hover, .btn-login:hover, .plus-btn:hover, .minus-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
}
.button:active, button:active, .btn-scanner:active, .btn-login:active {
  transform: translateY(0);
}

/* Spezifische Abweichungen pro Button-Typ */
button, #switch-camera-btn { 
  background: linear-gradient(135deg, var(--success), var(--secondary)); 
  color: var(--text); 
  width: 100%; 
  max-width: 250px; 
  border-radius: var(--border-radius);
}
button:hover, #switch-camera-btn:hover { 
  background: linear-gradient(135deg, #a8e8d8, #5dd5c8); 
}

.btn-scanner { 
  background: linear-gradient(135deg, var(--accent), var(--primary)); 
  color: var(--text); 
  border-radius: 25px;
  font-weight: 700;
}
.btn-scanner:hover { 
  background: linear-gradient(135deg, #fff27a, #ff8a8a); 
}

.button { 
  background: linear-gradient(135deg, var(--secondary), var(--primary)); 
  color: #fff;
}
.button:hover { 
  background: linear-gradient(135deg, #5dd5c8, #ff8a8a); 
}

.plus-btn, .minus-btn { 
  background: var(--success); 
  color: var(--text);
  font-size: 0.95rem; 
  padding: 8px 16px; 
  border-radius: 20px;
}

.btn-login { 
  background: linear-gradient(135deg, var(--success), var(--secondary)); 
  border-radius: 25px;
  font-weight: 700;
  padding: 14px 28px;
}
.btn-login:hover { 
  background: linear-gradient(135deg, #a8e8d8, #5dd5c8); 
}

/* CTA-Button (großer Anmelde-Button) */
.btn-cta {
  background: linear-gradient(135deg, var(--success), var(--secondary));
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  padding: 24px 50px;
  border-radius: 35px;
  box-shadow: 0 8px 30px rgba(149, 225, 211, 0.5);
  animation: pulse-cta 2s infinite;
  margin: 40px auto;
  display: block;
  max-width: 500px;
  width: 100%;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

@keyframes pulse-cta {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 30px rgba(149, 225, 211, 0.5);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 12px 45px rgba(149, 225, 211, 0.7);
  }
}

.btn-cta:hover {
  animation: none;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 50px rgba(149, 225, 211, 0.8);
}

.btn-cta i {
  margin-right: 10px;
  font-size: 1.4rem;
}

.button-container { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 20px; flex-wrap: wrap; }

/* --- Formulare (BEIBEHALTEN) --- */
label {
  display: block;
  margin-top: 15px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
}
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="tel"], select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-body);
  box-sizing: border-box;
  max-width: 100%;
  word-wrap: break-word;
  transition: all 0.3s ease;
  background: #fff;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
  transform: translateY(-1px);
}
input:hover, select:hover {
  border-color: var(--secondary);
}
.form-group, .Verantwortliche-Person { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
form label, #login-form label { display: block !important; margin-top: 10px; }
.participant-field, .begleitperson-box { 
  background: linear-gradient(135deg, rgba(149, 225, 211, 0.1), rgba(255, 230, 109, 0.1)); 
  border: 2px solid rgba(255, 107, 107, 0.2); 
  border-radius: var(--border-radius); 
  padding: 20px; 
  margin-top: 15px; 
  text-align: left;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.participant-field:hover, .begleitperson-box:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.15);
  transform: translateY(-2px);
}
#begleitperson-box, #begleitperson-wrapper, .shirt-size-wrapper { display: none; }
.inline-radios { display: inline-flex; align-items: center; gap: 30px; }

/* --- T-Shirts & Lightbox (VERSCHÖNERT) --- */
.shirt-images { 
  display: flex; 
  width: 100%; 
  justify-content: center; 
  margin-top: 30px; 
  align-items: flex-start; 
  flex-wrap: wrap;
  gap: 40px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 230, 109, 0.1), rgba(149, 225, 211, 0.1));
  border-radius: var(--container-radius);
  border: 2px solid rgba(255, 107, 107, 0.2);
}
.shirt-wrapper { 
  position: relative; 
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  perspective: 1000px;
  flex: 0 0 auto;
}
.shirt-label { 
  position: absolute; 
  top: -15px; 
  left: 50%; 
  transform: translateX(-50%); 
  background: linear-gradient(135deg, var(--primary), var(--secondary)); 
  color: #fff; 
  padding: 6px 12px; 
  border-radius: 20px; 
  font-weight: 700; 
  font-family: var(--font-body);
  user-select: none; 
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
  z-index: 10;
}
.shirt-img { 
  max-width: 350px;
  width: 100%;
  border: 10px solid #fff; 
  border-radius: 20px; 
  cursor: pointer; 
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  height: auto;
  background: #fff;
  object-fit: contain;
}
.shirt-img:hover { 
  transform: scale(1.05) rotateY(3deg); 
  box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
  border-color: var(--accent);
}
.shirt-caption {
  margin-top: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 1.1rem;
}
@media (max-width: 768px) {
  .shirt-images {
    gap: 25px;
    padding: 20px;
  }
  .shirt-img {
    max-width: 280px;
  }
  .shirt-img:hover {
    transform: scale(1.02);
  }
}
@media (max-width: 576px) {
  .shirt-images {
    flex-direction: column;
    gap: 30px;
  }
  .shirt-img {
    max-width: 100%;
    max-width: 250px;
  }
}
.shirt-hint { 
  font-size: 0.95rem; 
  color: var(--text); 
  margin-top: 8px; 
  word-wrap: break-word;
  font-weight: 600;
}

.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.lightbox.hidden { display: none; }
#lightbox-img { max-width: 90%; max-height: 90%; border: 2px solid #fff; }
.close-btn { position: absolute; top: 20px; right: 40px; font-size: 3rem; color: #fff; cursor: pointer; }

/* --- Sonstige Komponenten (BEIBEHALTEN) --- */
.slots-info { 
  text-align: center; 
  font-size: 1.2rem; 
  margin-bottom: 15px; 
  color: var(--primary); 
  font-weight: 700;
  font-family: var(--font-heading);
}
.progress-container { 
  background: linear-gradient(90deg, #e0e0e0, #f0f0f0); 
  width: 100%; 
  height: 20px; 
  border-radius: 15px; 
  overflow: hidden; 
  margin-top: 10px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 107, 107, 0.2);
}
.progress-bar { 
  background: linear-gradient(90deg, var(--success), var(--secondary), var(--accent)); 
  height: 100%; 
  width: 100%; 
  transition: width 0.5s ease;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(149, 225, 211, 0.5);
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
#ticket-section { background: var(--container-bg); padding: 20px; border-radius: var(--container-radius); box-shadow: var(--box-shadow); margin-top: 30px; max-width: 650px; margin: 30px auto 0; }
#tickets-container { display: flex; flex-direction: column; gap: 20px; margin-top: 10px; }
.qr-code-container { display: flex; align-items: center; gap: 20px; background: #fafafa; border: 1px solid #ddd; padding: 15px; border-radius: 6px; }
.qr-code-container p { flex: 1; font-size: 1rem; color: #333; margin: 0; white-space: pre-line; }
.qr-code-container canvas, .qr-code-container img { width: 90px; height: 90px; object-fit: contain; border: 1px solid #ccc; border-radius: 4px; }
.tooltip { position: relative; display: inline-block; vertical-align: middle; cursor: pointer; margin-left: 5px; top: 3px; color: rgb(8, 225, 233); }
.tooltip .tooltiptext { visibility: hidden; opacity: 0; position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background-color: rgba(91, 221, 73, 0.85); color: #000; text-align: center; border-radius: 12px; padding: 12px 15px; z-index: 999; width: 220px; transition: opacity 0.3s ease; }
.tooltip:hover .tooltiptext { visibility: visible; opacity: 1; }
.tooltip .tooltiptext::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-style: solid; border-color: rgba(77, 238, 56, 0.85) transparent transparent transparent; }
.hint-message { 
  color: var(--primary); 
  font-size: 0.95rem; 
  line-height: 1.4; 
  margin-top: 70px; 
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 230, 109, 0.1));
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary);
  font-weight: 600;
}
.hint-nummer { 
  color: var(--primary); 
  font-size: 0.9rem; 
  line-height: 1.3; 
  margin-top: 30px;
  font-weight: 600;
}

/* =========================================
    BLOCK 3: SEITEN-SPEZIFISCHE STILE & ANIMATIONEN
   ========================================= */

/* --- Scanner Layout & Video --- */
.scanner-intro { font-size: 1rem; color: #555; text-align: center; margin-bottom: 20px; }
.scanner-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.video-container { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1 / 1; margin: 20px auto 15px; background-color: #000; border-radius: 12px; overflow: hidden; display: flex; justify-content: center; align-items: center; border: 1px solid #ccc; }
.video-container video { width: 100%; height: 100%; object-fit: cover; }

/* --- Scanner Overlays --- */
/* Fokus-Guide: zentriertes Rechteck (70% = deckungsgleich mit jsQR-Crop) */
.scan-frame {
  position: absolute;
  width: 70%;
  height: 70%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* Nur sichtbar wenn Kamera aktiv */
.scan-frame.active {
  opacity: 1;
}
/* Eck-Elemente */
.scan-frame .corner {
  position: absolute;
  width: var(--scanner-corner-size, 20px);
  height: var(--scanner-corner-size, 20px);
  border: var(--scanner-corner-thickness, 4px) solid var(--scanner-border-color, #00ff00);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.scan-frame .corner-top-left    { top: 0; left: 0; border-right: none; border-bottom: none; }
.scan-frame .corner-top-right   { top: 0; right: 0; border-left: none; border-bottom: none; }
.scan-frame .corner-bottom-left  { bottom: 0; left: 0; border-right: none; border-top: none; }
.scan-frame .corner-bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }
/* QR-Erkennungs-Feedback: gelber Flash bei Treffer */
.scan-frame.detected .corner {
  border-color: #f1c40f !important;
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.8);
}
/* Puls-Animation für den gesamten Frame bei Erkennung */
@keyframes scanDetectedPulse {
  0%, 100% { box-shadow: inset 0 0 0 rgba(241, 196, 15, 0); }
  50% { box-shadow: inset 0 0 40px rgba(241, 196, 15, 0.3); }
}
.scan-frame.detected {
  animation: scanDetectedPulse 0.4s ease-in-out 2;
}
/* Scanning-Linie (bewegt sich von oben nach unten) */
.scan-frame.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ff00, transparent);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
  animation: scanLineMove 2s linear infinite;
}
@keyframes scanLineMove {
  0%   { top: 0; opacity: 1; }
  50%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}
.scan-frame.detected::after {
  animation: none;
  opacity: 0;
}
#camera-hint { position: absolute; color: #2caa05; font-size: 1rem; }


#video-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  color: white;
  font-size: 1.6rem;
  font-weight: bold;
  text-align: center;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  
  width: 90%;
  max-width: 450px;
  
  z-index: 9; /* Direkt unter dem Feedback-Overlay */
  pointer-events: none; /* Stellt sicher, dass es nicht klickbar ist */
  transition: opacity 0.5s ease;
}

/* Wir passen die .hidden Regel an, damit sie auch mit Opazität funktioniert */
.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
}
.tab-btn {
  background-color: #e5e5e5;
  border: none;
  padding: 10px 25px;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  cursor: pointer;
  color: #333;
  transition: all 0.2s ease;
}
.tab-btn.active {
  background-color: var(--primary-color);
  color: white;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}


/* --- Feedback & Status Anzeigen --- */
#feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
  background-color: transparent;
  color: #fff;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1.4;
  padding: 15px;
  border-radius: 12px;
  z-index: 10;
  pointer-events: none;
}
.scan-result { margin-top: 20px; font-weight: bold; font-size: 1.2em; text-align: center; min-height: 30px; }
.status-green { color: #28a745; }
.status-red { color: #dc3545; }
.status-blue { color: #0d6efd; }

.scan-signature-status { border-radius: 8px; padding: 10px; text-align: left; font-size: 0.95rem; }
.scan-signature-status.status-green { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.scan-signature-status.status-yellow { background: #fff3cd; border: 1px solid #ffc107; color: #856404; }
.scan-signature-status.status-red { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.scan-signature-status .signature-badge { font-weight: 700; display: inline-block; margin-bottom: 4px; }
.scan-signature-status .signature-ok { color: #155724; }
.scan-signature-status .signature-warn { color: #856404; }
.scan-signature-status.status-red .signature-warn { color: #721c24; }
.scan-signature-status .scan-missing-names { word-break: break-word; }
.scan-signature-status .scan-missing-names-list { margin: 8px 0 10px 1.2em; padding: 0; list-style: disc; font-size: 0.9rem; }
.scan-signature-status .scan-missing-names-list li { margin: 2px 0; }
.btn-paper-confirm { margin-top: 8px; padding: 8px 14px; background: #0d6efd; color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-paper-confirm:hover { background: #0b5ed7; }
.btn-paper-confirm:disabled { opacity: 0.7; cursor: not-allowed; }

.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; margin-left: 6px; }
.badge-haftung-ok { background: #d4edda; color: #155724; }
.badge-haftung-warn { background: #fff3cd; color: #856404; }
.status-blue { color: #007bff; }
#status-overview p { background-color: white; padding: 5px; margin: 5px 0; border-radius: 3px; 
overflow-wrap: break-word;
}

/* --- Animationen (Refactored & Consolidated) --- */
.hidden { display: none !important; }

/* Eine Keyframe-Animation für den Skalierungs-Effekt */
@keyframes scale-pulse { 
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
/* Eine Keyframe-Animation für den Leucht-Effekt */
@keyframes text-glow {
  0% { text-shadow: 0 0 4px currentColor, 0 0 8px currentColor; }
  50% { text-shadow: 0 0 8px currentColor, 0 0 16px currentColor; }
  100% { text-shadow: 0 0 4px currentColor, 0 0 8px currentColor; }
}

/* Die Klassen wenden die Animationen an und setzen die Farbe, die von 'currentColor' im Keyframe genutzt wird */
.success-pulse { color: #28a745; animation: text-glow 1.5s infinite; }
.error-pulse { color: #dc3545; animation: text-glow 1.5s infinite; }
.info-pulse { color: #007bff; animation: text-glow 1.5s infinite; }

.button:active, button:active, #switch-camera-btn:active { animation: scale-pulse 0.2s; }
.pulsate { animation: scale-pulse 1s infinite; color: #ff0000; }


/* =========================================
   BLOCK 4: RESPONSIVE DESIGN
   (Umfassende Media Queries für alle Geräte)
  ========================================= */

/* --- Globale Responsive-Basis --- */
* {
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img, video {
  max-width: 100%;
  height: auto;
}

input, select, textarea, button {
  max-width: 100%;
  box-sizing: border-box;
}

/* --- Container & Layout --- */
@media (max-width: 1200px) {
  .container {
    width: 95%;
    padding: 18px;
  }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
}

@media (max-width: 992px) {
  body {
    padding: 15px;
  }
  .container {
    width: 98%;
    padding: 15px;
    margin: 20px auto;
  }
  .shirt-images {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  .shirt-img {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  .container {
    width: 100%;
    padding: 15px;
    margin: 10px auto;
    border-radius: 0;
  }
  
  /* Typografie */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  
  /* Hero-Banner */
  .hero-banner {
    padding: 30px 15px !important;
    margin: 20px 0 !important;
  }
  .hero-banner h2 {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  .hero-banner p {
    font-size: 1.1rem !important;
    line-height: 1.4;
  }
  .event-details-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  .detail-item {
    padding: 15px !important;
  }
  .detail-item div[style*="font-size: 2.5rem"] {
    font-size: 2rem !important;
  }
  
  /* T-Shirt-Bilder */
  .shirt-images {
    flex-direction: column;
    gap: 15px;
  }
  .shirt-img {
    max-width: 140px;
    border-width: 8px;
  }
  
  /* Formulare */
  input[type="text"], input[type="email"], input[type="number"], 
  input[type="password"], input[type="tel"], select {
    font-size: 16px; /* Verhindert Zoom auf iOS */
    padding: 12px;
  }
  
  /* Buttons */
  button, .btn-login, .btn-scanner {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    font-size: 16px;
    margin: 5px 0;
  }
  .button-container {
    flex-direction: column;
    gap: 10px;
  }
  
  /* Countdown */
  #countdown {
    font-size: 1.2em !important;
    padding: 10px;
    word-break: break-word;
  }
  
  /* Progress Bar */
  .slots-info {
    font-size: 1rem;
    padding: 0 10px;
  }
  
  /* Inline-Radios */
  .inline-radios {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  /* Tooltips */
  .tooltip .tooltiptext {
    width: 200px;
    font-size: 0.85rem;
  }
  
  /* Scanner */
  .video-container {
    max-width: 100%;
    margin: 15px auto;
  }
  .scanner-controls {
    flex-direction: column;
    gap: 10px;
  }
  .btn-scanner {
    width: 100%;
  }
  
  /* Footer */
  footer {
    padding: 20px 10px !important;
    font-size: 0.85rem !important;
  }
  footer a {
    display: block;
    margin: 5px 0 !important;
  }
}

@media (max-width: 576px) {
  body {
    padding: 5px;
  }
  .container {
    padding: 12px;
    margin: 5px auto;
  }
  
  /* Typografie */
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1rem; }
  
  /* Hero-Banner */
  .hero-banner {
    padding: 25px 12px !important;
  }
  .hero-banner h2 {
    font-size: 1.8rem !important;
  }
  .hero-banner p {
    font-size: 1rem !important;
  }
  .detail-item {
    padding: 12px !important;
  }
  .detail-item div[style*="font-size: 2.5rem"] {
    font-size: 1.8rem !important;
  }
  .detail-item strong {
    font-size: 1rem !important;
  }
  
  /* T-Shirt-Bilder */
  .shirt-img {
    max-width: 120px;
    border-width: 6px;
  }
  
  /* Formulare */
  .section-title {
    font-size: 1rem;
    margin-top: 20px;
  }
  label {
    font-size: 0.95rem;
    margin-top: 12px;
  }
  .participant-field, .begleitperson-box {
    padding: 12px;
  }
  
  /* Buttons */
  .plus-btn, .minus-btn {
    width: 100%;
    margin: 5px 0;
  }
  
  /* Countdown */
  #countdown {
    font-size: 1em !important;
    line-height: 1.4;
  }
  
  /* Feedback */
  #feedback {
    font-size: 1rem;
    padding: 12px;
    max-width: 95%;
  }
}

@media (max-width: 400px) {
  body {
    padding: 0;
  }
  .container {
    padding: 10px;
    border-radius: 0;
    box-shadow: none;
  }
  
  /* Typografie */
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.1rem; }
  
  /* Hero-Banner */
  .hero-banner {
    padding: 20px 10px !important;
    border-radius: 10px !important;
  }
  .hero-banner h2 {
    font-size: 1.6rem !important;
  }
  .hero-banner p {
    font-size: 0.95rem !important;
  }
  .detail-item {
    padding: 10px !important;
  }
  .detail-item div[style*="font-size: 2.5rem"] {
    font-size: 1.5rem !important;
  }
  
  /* T-Shirt-Bilder */
  .shirt-img {
    max-width: 100px;
  }
  
  /* Buttons */
  button, .btn-login {
    font-size: 14px;
    padding: 10px;
  }
  
  /* Footer */
  footer {
    padding: 15px 5px !important;
    font-size: 0.8rem !important;
  }
}

/* --- Spezielle Anpassungen für sehr kleine Bildschirme --- */
@media (max-width: 360px) {
  #feedback {
    font-size: 0.95rem;
    padding: 10px;
  }
  .hero-banner h2 {
    font-size: 1.5rem !important;
  }
  .container {
    padding: 8px;
  }
}

/* --- Große Bildschirme (4K, etc.) --- */
@media (min-width: 1920px) {
  .container {
    max-width: 1200px;
  }
  .hero-banner {
    max-width: 1400px;
    margin: 40px auto;
  }
}

/* --- Landscape-Modus auf Mobile --- */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-banner {
    padding: 20px 15px !important;
  }
  .event-details-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* --- Passwort-Felder mit Show/Hide-Icon --- */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--muted, #6b7280);
  font-size: 1.2rem;
  transition: color 0.2s;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-mismatch {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
  text-align: left;
  display: none;
}

.password-wrapper input.error {
  border-color: #e74c3c;
}

/* =========================================
   Corner Ribbon (GESCHLOSSEN / AUSGEBUCHT)
   Top-right, diagonal, non-blocking (pointer-events: none)
   Hover on section fades ribbon to reveal content
   ========================================= */
/* Parent containers: ribbon is absolute within hero/wizard */
.hero-banner,
.wizard-container {
  position: relative;
}
/* Ribbon standardmäßig ausgeblendet – nur bei geschlossener Anmeldung (.visible) anzeigen */
.status-overlay-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 9998;
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.status-overlay-ribbon.visible {
  opacity: 1;
  visibility: visible;
}

.status-overlay-ribbon .ribbon-band {
  position: absolute;
  top: 32px;
  right: -48px;
  width: 220px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #c0392b 0%, #a93226 50%, #922b21 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transform: rotate(45deg);
  transform-origin: center;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.status-overlay-ribbon .ribbon-band.sold-out {
  background: linear-gradient(135deg, #922b21 0%, #7b241c 50%, #641e16 100%);
}

/* Hover on registration section: ribbon fades to reveal content */
.hero-banner:hover .status-overlay-ribbon.visible .ribbon-band,
.wizard-container:hover .status-overlay-ribbon.visible .ribbon-band {
  opacity: 0.3;
}

/* =========================================
   .event-status-ribbon – Interactive Status Ribbon
   Bold semi-transparent red/orange bar, slide-in from right on load.
   pointer-events: none so underlying links/menus stay clickable.
   Hover over header/hero: reduce ribbon opacity to 10% smoothly.
   ========================================= */
.event-status-ribbon {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.event-status-ribbon.visible {
  opacity: 1;
  visibility: visible;
}

.event-status-ribbon .ribbon-band {
  background: linear-gradient(135deg, rgba(220, 80, 50, 0.92) 0%, rgba(200, 60, 40, 0.9) 50%, rgba(180, 50, 35, 0.88) 100%);
  font-weight: 800;
  animation: event-ribbon-slide-in 0.5s ease-out forwards;
  transition: opacity 0.35s ease;
}

.event-status-ribbon.visible .ribbon-band {
  opacity: 1;
}

/* Slide-in from right on page load */
@keyframes event-ribbon-slide-in {
  from {
    transform: rotate(45deg) translateX(120%);
    opacity: 0;
  }
  to {
    transform: rotate(45deg) translateX(0);
    opacity: 1;
  }
}

/* When mouse is over header/hero area: reduce ribbon opacity to 10% smoothly */
.header:hover ~ .hero-banner .event-status-ribbon.visible .ribbon-band,
.hero-banner:hover .event-status-ribbon.visible .ribbon-band,
.wizard-container:hover .event-status-ribbon.visible .ribbon-band {
  opacity: 0.1;
}

/* CTA disabled when registration closed (ID start-registration / "Jetzt anmelden"): grayscale + 60% opacity */
.btn-cta.registration-disabled,
.btn-submit.registration-disabled {
  filter: grayscale(1);
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-cta.registration-disabled:hover,
.btn-submit.registration-disabled:hover {
  transform: none;
}

/* =========================================
   .event-ribbon – Non-blocking status ribbon (HERO only)
   Absolute, diagonal top-right of HERO. Semi-transparent red/orange, white bold text.
   pointer-events: none; hover: 90% transparent (opacity 0.1).
   ========================================= */
.event-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.event-ribbon.visible {
  opacity: 1;
  visibility: visible;
}
.event-ribbon .ribbon-band {
  position: absolute;
  top: 24px;
  right: -40px;
  width: 200px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(220, 80, 50, 0.9) 0%, rgba(180, 50, 35, 0.88) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(45deg);
  transform-origin: center;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.hero-banner:hover .event-ribbon.visible .ribbon-band,
.wizard-container:hover .event-ribbon.visible .ribbon-band {
  opacity: 0.1;
}

/* Dark Mode: floating 50x50 circular button, glassmorphism, bottom-right */
.dark-mode-toggle-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--primary, #FF6B6B);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
.dark-mode-toggle-fab:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .dark-mode-toggle-fab {
  background: rgba(30, 30, 30, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  color: #FFE66D;
}
[data-theme="dark"] .dark-mode-toggle-fab:hover {
  background: rgba(50, 50, 50, 0.6);
}

/* =========================================
   TICKET-CONTROL PAGE (Check-In Scanner)
   Vor-Ort-tauglich: sofort verständlich, schnell bedienbar
   ========================================= */
body.page-ticket-control { padding-bottom: 24px; }
.container-ticket-control { max-width: 720px; margin: 0 auto; }

.tc-header { margin-bottom: 1.25rem; }
.tc-header h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 0.25rem; }
.tc-subtitle { color: var(--text); font-size: 1rem; margin: 0 0 0.5rem 0; opacity: 0.9; }
.tc-intro {
  margin: 0;
  padding: 0.75rem 1rem;
  background: rgba(149, 225, 211, 0.15);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.tc-section { margin-bottom: 1.5rem; }
.tc-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tc-section-title i { opacity: 0.9; }

/* Kamera-Status: klar lesbar */
.tc-camera-status {
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.05);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0,0,0,0.06);
}
.tc-camera-info { font-size: 1rem; color: var(--text); min-height: 1.4em; font-weight: 500; }
.tc-camera-error { color: #c0392b; font-weight: 700; }

/* Scan-Hinweis (wird ausgeblendet, wenn Kamera läuft) */
.tc-scan-hint {
  margin: 0 0 1rem 0;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: #555;
}
.tc-scan-hint.tc-hidden { display: none; }

/* Scanner-Buttons: Start-Button dominant */
.tc-scan-area .scanner-controls { flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1rem; }
.tc-scanner-controls .btn-scanner {
  min-height: 52px;
  min-width: 160px;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tc-btn-start {
  min-height: 56px;
  padding: 16px 28px;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(45, 52, 54, 0.2);
}
.tc-btn-start:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 52, 54, 0.25);
}
.btn-scanner-primary,
.tc-btn-start { background: linear-gradient(135deg, #27ae60, var(--secondary)); color: #fff; }
.btn-scanner-primary:hover:not(:disabled),
.tc-btn-start:hover:not(:disabled) { background: linear-gradient(135deg, #2ecc71, #5dd5c8); }
.btn-scanner-secondary { background: linear-gradient(135deg, #6c757d, #5a6268); color: #fff; }
.btn-scanner-secondary:hover:not(:disabled) { background: linear-gradient(135deg, #5a6268, #495057); }
.btn-scanner-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-scanner-admin { background: linear-gradient(135deg, var(--secondary), #3ab5a8); color: #fff; max-width: 220px; }

/* Video: groß genug für QR-Erkennung */
.tc-video-wrapper {
  margin: 1rem 0;
  min-height: 260px;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #111;
  border: 2px solid rgba(0,0,0,0.1);
}
.tc-video-container { position: relative; width: 100%; min-height: 260px; }
.tc-video-container video { width: 100%; height: auto; display: block; min-height: 260px; object-fit: cover; }
.tc-canvas { display: none; }
.tc-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  text-align: center;
  pointer-events: none;
}
@keyframes status-pulse-green {
  0%, 100% { transform: translate(-50%, -50%) scale(1); background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7), 0 10px 32px rgba(22, 163, 74, 0.55); }
  50% { transform: translate(-50%, -50%) scale(1.08); background: #4ade80; box-shadow: 0 0 0 18px rgba(22, 163, 74, 0), 0 14px 40px rgba(74, 222, 128, 0.75); }
}
@keyframes status-pulse-red {
  0%, 100% { transform: translate(-50%, -50%) scale(1); background: #dc2626; box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7), 0 10px 32px rgba(220, 38, 38, 0.55); }
  50% { transform: translate(-50%, -50%) scale(1.08); background: #f87171; box-shadow: 0 0 0 18px rgba(220, 38, 38, 0), 0 14px 40px rgba(248, 113, 113, 0.75); }
}
@keyframes status-pulse-orange {
  0%, 100% { transform: translate(-50%, -50%) scale(1); background: #ea580c; box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7), 0 10px 32px rgba(234, 88, 12, 0.55); }
  50% { transform: translate(-50%, -50%) scale(1.08); background: #fb923c; box-shadow: 0 0 0 18px rgba(234, 88, 12, 0), 0 14px 40px rgba(251, 146, 60, 0.75); }
}
@keyframes status-pulse-yellow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); background: #facc15; box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7), 0 10px 32px rgba(250, 204, 21, 0.55); }
  50% { transform: translate(-50%, -50%) scale(1.08); background: #fde047; box-shadow: 0 0 0 18px rgba(250, 204, 21, 0), 0 14px 40px rgba(253, 224, 71, 0.8); }
}
.tc-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 400px;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  z-index: 10;
  line-height: 1.35;
  text-shadow: none;
}
#feedback.tc-feedback.success-pulse,
.tc-feedback.success-pulse {
  background: #16a34a;
  color: #ffffff;
  animation: status-pulse-green 0.7s ease-in-out infinite;
}
#feedback.tc-feedback.error-pulse,
.tc-feedback.error-pulse {
  background: #dc2626;
  color: #ffffff;
  animation: status-pulse-red 0.7s ease-in-out infinite;
}
#feedback.tc-feedback.info-pulse,
#feedback.tc-feedback.already-pulse,
.tc-feedback.info-pulse,
.tc-feedback.already-pulse {
  background: #ea580c;
  color: #ffffff;
  animation: status-pulse-orange 0.7s ease-in-out infinite;
}
#feedback.tc-feedback.warn-pulse,
.tc-feedback.warn-pulse {
  background: #facc15;
  color: #422006;
  animation: status-pulse-yellow 0.7s ease-in-out infinite;
}

/* Aktuelles Ergebnis: große Karte, eindeutig lesbar */
.tc-result-area {
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border: 1px solid rgba(0,0,0,0.08);
}
.tc-scan-result {
  min-height: 3.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  font-size: 1rem;
  line-height: 1.45;
  border-radius: 10px;
}
/* Zustand: Bereit für nächsten Scan */
.tc-scan-result.tc-state-ready {
  background: #e8f4f8;
  color: #2c3e50;
  font-size: 1.15rem;
  font-weight: 600;
}
.tc-scan-result.tc-state-ready::before {
  content: "✓ ";
  color: var(--secondary);
  margin-right: 0.35em;
}
/* Erfolg: Name groß, grüne Karte */
.tc-scan-result.status-green {
  background: #d4edda;
  color: #155724;
  font-size: 1.2rem;
  font-weight: 700;
  border: 2px solid #c3e6cb;
}
/* Fehler: rote Karte, sofort erkennbar */
.tc-scan-result.status-red {
  background: #f8d7da;
  color: #721c24;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid #f5c6cb;
}
/* Info (bereits eingecheckt) – klar als Erfolg/Info, nicht als Fehler */
.tc-scan-result.status-blue {
  background: #d1ecf1;
  color: #0c5460;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid #0ea5d6;
}
/* Warnung (z. B. Signatur fehlt) */
.tc-scan-result.status-yellow {
  background: #fef3c7;
  color: #92400e;
  font-size: 1.05rem;
  font-weight: 600;
  border: 2px solid #f59e0b;
}
/* Ergebnis-Karten: Headline + Name + Details */
.tc-result-headline {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.tc-result-headline-success { color: #0d5c2e; }
.tc-result-headline-info { color: #0c5460; }
.tc-result-headline-warn { color: #92400e; }
.tc-result-headline-error { color: #721c24; }
.tc-result-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.3;
  word-break: break-word;
}
.tc-result-name-info { font-size: 1.35rem; color: #0c5460; }
.tc-result-name-small { font-size: 1.1rem; margin: 0.5rem 0; }
.tc-result-detail {
  font-size: 1rem;
  margin: 0.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tc-result-label {
  font-weight: 600;
  opacity: 0.9;
}
.tc-result-badge {
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-block;
}
.tc-badge-haftung-ok { background: rgba(21, 87, 36, 0.15); color: #155724; }
.tc-result-hint {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
}
.tc-result-action {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.tc-result-action-retry { margin-top: 0.75rem; }
.tc-signature-status { margin-top: 1rem; padding: 0.75rem; border-radius: 8px; font-size: 0.95rem; }
.tc-paper-hint {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #724a05;
}
.scan-missing-names-list { margin: 0.5rem 0 0 1rem; padding-left: 1rem; }
.btn-paper-confirm {
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 8px;
  background: var(--secondary);
  color: #fff;
  border: none;
  font-weight: 600;
  display: inline-block;
}
.btn-paper-confirm:hover { opacity: 0.95; filter: brightness(1.05); }

/* Alerts: deutlich sichtbar */
.tc-alerts { min-height: 2.5rem; }
.tc-alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  border-width: 2px;
  border-style: solid;
}
.tc-alert-error { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.tc-alert-warning { background: #fff3cd; border-color: #ffc107; color: #856404; }
.tc-alert-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.tc-alert-info { background: #d1ecf1; border-color: #bee5eb; color: #0c5460; }

/* Zuletzt gescannt: schnell erfassbar */
.tc-last-scan-info {
  padding: 1rem 1.25rem;
  background: #f0f0f0;
  border-radius: 10px;
  font-size: 1rem;
  color: #555;
  font-weight: 500;
}
.tc-last-scan-info.tc-last-scan-ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Session-Statistik: kompakt */
.tc-system-status-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border: 1px solid rgba(0,0,0,0.06);
}
.tc-stat { font-size: 1rem; color: var(--text); }
.tc-stat-value { font-weight: 700; color: var(--primary); margin-right: 0.35rem; }

/* Admin: klar getrennt, optional – Helfer können ignorieren */
.tc-admin-section {
  border-top: 3px solid #0ea5d6;
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  background: linear-gradient(180deg, rgba(14, 165, 214, 0.06) 0%, transparent 8rem);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding-bottom: 0.5rem;
}
.tc-admin-heading { color: #0c5460; }
.tc-admin-intro {
  font-size: 0.9rem;
  color: #555;
  margin: -0.25rem 0 1rem 0;
  font-weight: 500;
}
.tc-admin-card {
  background: #f0f2f5;
  border-radius: var(--border-radius);
  padding: 1.25rem;
  border: 1px solid #dee2e6;
}
.tc-btn-restart { }
.tc-btn-restart i.fa-redo { margin-right: 0.35em; }
.tc-admin-auth { margin-bottom: 1rem; }
.tc-admin-label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
.tc-admin-input { width: 100%; max-width: 320px; padding: 12px 14px; border-radius: 8px; border: 1px solid #ced4da; font-size: 1rem; }
.tc-admin-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.tc-admin-search { margin-top: 0.75rem; }
.tc-status-overview {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  max-height: 420px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tc-checkin-list { list-style: none; padding-left: 0; margin: 0; }
.tc-checkin-item {
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tc-checkin-item:last-child { margin-bottom: 0; }
.tc-checkin-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.35rem; font-size: 0.9em; color: #555; }
.tc-checkin-email { word-break: break-all; }
.tc-checkin-phone { }
.tc-checkin-details { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid #eee; }
.tc-persons-detail { padding-left: 1.25rem; font-size: 0.9rem; margin: 0.25rem 0 0 0; list-style: disc; }
.badge-haftung-ok {
  display: inline-block;
  color: #155724;
  background: #d4edda;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.badge-haftung-warn {
  display: inline-block;
  color: #856404;
  background: #fff3cd;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.doc-summary {
  cursor: pointer;
  padding: 0.25rem 0;
  font-size: 1rem;
}
.doc-summary:hover { text-decoration: underline; }

/* Footer Ticket-Control */
.tc-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(149, 225, 211, 0.08));
  border-top: 3px solid var(--primary);
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: 15px 15px 0 0;
}
.tc-footer-links { margin-bottom: 0.75rem; }
.tc-footer-links a { margin: 0 12px; color: var(--primary); text-decoration: none; font-weight: 600; }
.tc-footer-copy { font-weight: 600; }
.tc-footer i.fa-heart { color: var(--primary); }

/* Status-Farben Ticket-Control */
.status-yellow { color: #856404; }
.status-green { color: #155724; }
.status-red { color: #721c24; }
.status-blue { color: #0c5460; }

/* Mobile: Touch-freundlich, Ergebnis-Karten lesbar */
@media (max-width: 768px) {
  body.page-ticket-control { padding-bottom: 28px; }
  .tc-intro { font-size: 0.9rem; padding: 0.65rem 1rem; }
  .tc-btn-start { min-height: 56px; font-size: 1.2rem; padding: 16px 20px; }
  .tc-btn-restart { font-size: 1.15rem !important; min-height: 56px; }
  .tc-scanner-controls .btn-scanner {
    min-height: 52px;
    min-width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
  }
  .tc-video-wrapper { min-height: 240px; }
  .tc-video-container video { min-height: 240px; }
  .tc-scan-result { min-height: 3.5rem; padding: 1.25rem 0.75rem; font-size: 1.05rem; }
  .tc-scan-result.tc-state-ready { font-size: 1.1rem; }
  .tc-scan-result.status-green { font-size: 1.05rem; }
  .tc-result-headline { font-size: 1.05rem; }
  .tc-result-name { font-size: 1.35rem; }
  .tc-result-name-info { font-size: 1.2rem; }
  .tc-result-detail { font-size: 0.95rem; }
  .tc-result-action { font-size: 0.95rem; }
  .tc-admin-actions { flex-direction: column; }
  .tc-admin-actions .btn-scanner { max-width: 100%; min-height: 48px; }
  .tc-system-status-inner { flex-direction: column; gap: 0.75rem; }
  .tc-checkin-item { padding: 0.85rem; }
  .tc-footer-links a { display: block; margin: 0.5rem 0; }
}

@media (max-width: 480px) {
  .tc-video-wrapper { min-height: 220px; }
  .tc-video-container video { min-height: 220px; }
}

/* ===== Offline-Banner ===== */
.tc-offline-banner {
  background: #e74c3c;
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: offlinePulse 2s infinite;
}
.tc-offline-banner.hidden { display: none; }
.tc-offline-banner.tc-offline-hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: all 0.3s ease;
}
@keyframes offlinePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== Version-Badge ===== */
#tc-version-badge {
  position: fixed;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ccc;
  font-size: 11px;
  font-family: monospace;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 9998;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.15);
}