#stickyBonusBar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #e9353d;
  height: 50px;
  display: flex;
  align-items: center;
  padding-left: 16px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.euro-amount {
  font-size: 28px;
  font-weight: 900;
  color: white;
  display: inline-flex;
  align-items: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.euro-suffix {
  font-size: 10px;
  font-weight: normal;
  vertical-align: super;
  margin-left: 2px;
}
.top-form { margin-top: 24px; }

footer {
  font-size: 10px;
  text-align: center;
  color: #666;
  margin: 40px 0;
  background: transparent;
  padding: 8px;
}
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.3px;
  background: linear-gradient(180deg, #eceff4 0%, #e6e9ef 100%);
}

h1 {
  font-size: 26px;
  margin: 24px 16px;
  color: #e9353d;
  text-align: center;
}

form {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
  padding: 24px;
  margin: 0 16px 24px;
}

button,
input[type="file"] {
  display: block;
  width: 100%;
  font-size: 16px;
  padding: 14px;
  border-radius: 12px;
  border: none;
  margin-bottom: 16px;
}

button {
  background: rgba(233,53,61,0.8);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(233,53,61,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}
button:hover:not(:disabled) {
  background: rgba(233,53,61,1);
  transform: translateY(-1px);
}
button:disabled { background-color: #ccc; cursor: not-allowed; }

.card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  padding: 10px 20px;
  margin: 0 16px 24px;
}
.card h3 {
  margin-top: 0;
  color: #e9353d;
  font-size: 20px;
}

ul { list-style: none; padding: 0; margin: 0; }
ul li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

.highlight { font-weight: bold; color: #e9353d; }

#loadingOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  backdrop-filter: blur(10px);
  background-color: rgba(255,255,255,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
#loadingTime {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 500;
  color: #e9353d;
}

.spinner {
  width: 60px; height: 60px;
  border: 6px solid transparent;
  border-top-color: #e9353d;
  border-radius: 50%;
  animation: rotateSpinner 1s linear infinite;
}
.spinner.small {
  width: 30px; height: 30px;
  border-width: 4px;
  border-top-color: #aaa;
  animation-direction: reverse;
}
@keyframes rotateSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.analysis-grid {
  font-size: 14px;
  line-height: 1.3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 8px;
  align-items: start;
}
.analysis-grid .label {
  font-size: 13px;
  color: rgba(17, 17, 17, 0.65);
  font-weight: 600;
}
.analysis-grid .label.highlight {
  color: #e9353d;
}
.analysis-grid .label.muted {
  color: rgba(17, 17, 17, 0.55);
}
.analysis-grid .value {
  font-weight: 600;
}
.analysis-grid .full {
  grid-column: 1 / -1;
}

.muted {
  color: rgba(17, 17, 17, 0.55);
}

#scanControls button {
  padding: 12px 16px;
  text-align: center;
}

@media (max-width: 600px) {
  form, .card { margin: 0 8px 16px; padding: 16px; }
  h1 { font-size: 22px; margin: 16px 8px; }
  .card h3 { font-size: 18px; }
  ul li { font-size: 14px; }
  button, input[type="file"] { font-size: 15px; padding: 12px; }
  footer { font-size: 9px; margin: 24px 8px; }
}

@keyframes scanDown { 0% { top: 0; } 100% { top: 100%; } }

/* Weiße Icons in der Sticky-Leiste erzwingen */
#stickyBonusBar div[style*="font-size: 20px;"] {
  filter: brightness(0) invert(1);
}

.bon-wert {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  width: 80px;
}

@keyframes pulse {
  0% { background-color: #e9353d; }
  50% { background-color: #ff5b5b; }
  100% { background-color: #e9353d; }
}
.pulse-bonus {
  background-color: #e9353d !important;
  animation: pulse 1s ease-in-out 3;
  color: white;
  font-weight: bold;
}

/* === Utilities === */
.flex{display:flex;}
.flex-col{flex-direction:column;}
.items-center{align-items:center;}
.justify-center{justify-content:center;}
.justify-between{justify-content:space-between;}
.gap-16{gap:16px;}
.mr-16{margin-right:16px;}
.text-center{text-align:center;}
.text-white{color:#fff;}
.fs-10{font-size:10px;}
.fs-11{font-size:11px;}
.fs-12{font-size:12px;}
.fs-14{font-size:14px;}
.fs-18{font-size:18px;}
.fw-300{font-weight:300;}
.fw-600{font-weight:600;}
.pos-rel{position:relative;}
.pos-abs{position:absolute;}
.top-18{top:18px;}
.left-62{left:62px;}
.w-20{width:20px;}
.h-20{height:20px;}
.h-24{height:24px;}
.h-50{height:50px;}
.aspect-square{aspect-ratio:1/1;}
.opacity-40{opacity:.4;}
.cursor-pointer{cursor:pointer;}
.hidden{display:none;}
.mt-10{margin-top:10px;}
.mb-10{margin-bottom:10px;}
.mt-12{margin-top:12px;}
.mt-16{margin-top:16px;}
.mb-16{margin-bottom:16px;}
.p-16{padding:16px;}
.p-10{padding:10px;}
.round-16{border-radius:16px;}
.border-gray{border:1px solid #ddd;}
.bg-white{background:#fff;}
.bg-black-60{background-color:rgba(0,0,0,0.6);}

/* === Components === */
.sticky-icons{display:flex;align-items:center;gap:16px;margin-right:16px;}
.icon-stack{ text-align:center;color:#fff;font-size:14px;display:flex;flex-direction:column;align-items:center;}
.icon-emoji{font-size:20px;}
.icon-dots{display:flex;justify-content:center;align-items:flex-end;gap:2px;}
.icon-bar{width:3px;background:#fff;}
.icon-bar.s{height:8px;}
.icon-bar.m{height:14px;}
.icon-bar.l{height:10px;}

.partner-slider{overflow-x:auto;scroll-snap-type:x mandatory;display:flex;width:100%;-webkit-overflow-scrolling:touch;}
.partner-page{flex:0 0 100%;scroll-snap-align:start;}
.partner-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:16px;}
.partner-kachel{
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius:16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio:1/1;
  position:relative;
  overflow:hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.partner-kachel {
  background: #fff !important;
}

.partner-kachel::before {
  background: #fff !important;
}

.partner-kachel .logo {
  background: #fff !important;
}
.partner-kachel:hover{
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.partner-kachel .logo{max-width:70%;max-height:70%;object-fit:contain;position:absolute;top:0;bottom:20%;left:0;right:0;margin:auto;}
.partner-kachel .logo--placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  width:70%;
  height:70%;
  border-radius:14px;
  background: repeating-linear-gradient(
    135deg,
    rgba(246,248,253,0.8),
    rgba(246,248,253,0.8) 6px,
    rgba(214,219,234,0.6) 6px,
    rgba(214,219,234,0.6) 12px
  );
  border:1px dashed rgba(120,127,152,0.35);
}
.partner-kachel .bonusbar{
  position:absolute;
  bottom:0;
  width:100%;
  height:20%;
  font-size:10px;
  color: #111;
  text-align:center;
  line-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom-left-radius:16px;
  border-bottom-right-radius:16px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.3);
}

.partner-kachel .bonusbar.pulse-bonus {
  color: #fff;
}

.partner-kachel .firework-overlay{
  position:absolute;
  inset:-6%;
  pointer-events:none;
  opacity:0;
  transform:scale(0.95);
  z-index:6;
}
.partner-kachel.firework-playing > :not(.firework-overlay){
  filter:blur(3px);
  transition:filter 0.3s ease;
}
.partner-kachel.firework-playing .firework-overlay{
  opacity:1;
}
.partner-kachel .firework-overlay::before,
.partner-kachel .firework-overlay::after{
  content:"";
  position:absolute;
  inset:-20%;
  opacity:0;
  transform:scale(0.35) rotate(0deg);
  mix-blend-mode:screen;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.9) 0, rgba(255,255,255,0) 55%),
    radial-gradient(circle at 70% 18%, rgba(255,214,0,0.85) 0, rgba(255,214,0,0) 55%),
    radial-gradient(circle at 30% 80%, rgba(0,214,255,0.8) 0, rgba(0,214,255,0) 55%),
    radial-gradient(circle at 85% 65%, rgba(255,105,180,0.85) 0, rgba(255,105,180,0) 55%),
    radial-gradient(circle at 55% 55%, rgba(146,83,255,0.9) 0, rgba(146,83,255,0) 60%);
}
.partner-kachel .firework-overlay::after{
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.9) 0, rgba(255,255,255,0) 55%),
    radial-gradient(circle at 75% 30%, rgba(255,115,0,0.85) 0, rgba(255,115,0,0) 55%),
    radial-gradient(circle at 40% 85%, rgba(0,255,178,0.8) 0, rgba(0,255,178,0) 55%),
    radial-gradient(circle at 82% 75%, rgba(54,163,255,0.85) 0, rgba(54,163,255,0) 55%),
    radial-gradient(circle at 60% 50%, rgba(255,255,255,0.9) 0, rgba(255,255,255,0) 60%);
}
.partner-kachel.firework-playing .firework-overlay::before{
  animation:fireworkBurstA 3s ease-out forwards;
}
.partner-kachel.firework-playing .firework-overlay::after{
  animation:fireworkBurstB 3s ease-out .45s forwards;
}
@keyframes fireworkBurstA{
  0%{opacity:0;transform:scale(0.2) rotate(0deg);}
  15%{opacity:1;}
  60%{opacity:.85;transform:scale(1.05) rotate(45deg);}
  100%{opacity:0;transform:scale(1.45) rotate(65deg);}
}
@keyframes fireworkBurstB{
  0%{opacity:0;transform:scale(0.25) rotate(0deg);}
  15%{opacity:1;}
  55%{opacity:.9;transform:scale(1.1) rotate(-35deg);}
  100%{opacity:0;transform:scale(1.5) rotate(-55deg);}
}

.partner-kachel .bonus-count{
  position:absolute;
  right:6px;
  top:32px;
  text-align:center;
  pointer-events:none;
  line-height:1.1;
}
.partner-kachel .bonus-count-value{
  font-size:15px;
  font-weight:700;
  line-height:1;
}
.partner-kachel .bonus-count-label{
  font-size:9px;
  opacity:0.85;
}
@media (max-width:360px){
  .partner-kachel .bonus-count{
    top:30px;
  }
  .partner-kachel .bonus-count-value{
    font-size:14px;
  }
  .partner-kachel .bonus-count-label{
    font-size:8.5px;
  }
}

.dot{
  display:inline-block;
  width:10px;
  height:10px;
  margin:0 5px;
  border-radius:50%;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.6);
}
.dot.active{
  background: rgba(255,255,255,0.9);
}

.statistik-wrap,.bons-wrap{padding:16px;}
.statistik-controls{display:flex;justify-content:center;gap:8px;margin-bottom:16px;}
.statistik-field{display:flex;flex-direction:column;align-items:center;}
.statistik-field label{font-size:12px;color:#444;margin-bottom:4px;}
.statistik-field input{padding:10px;font-size:16px;border-radius:8px;border:1px solid #ccc;}

.bons-header{display:flex;justify-content:space-between;align-items:center;margin:0 16px 32px;}
.bons-total{display:flex;flex-direction:column;align-items:flex-end;text-align:right;width:80px;}
.bons-total .sum{font-size:14px;}
.bons-total .bonus{font-size:11px;color:#0a0;}

.status{font-size:11px;}
.status.genehmigt{color:green;}
.status.abgelehnt{color:red;}
.status.pruefung{color:orange;}

/* === More utilities for inline-style removal === */
.flex-1{flex:1;}
.gap-8{gap:8px;}
.gap-12{gap:12px;}
.mt-8{margin-top:8px;}
.mt-24{margin-top:24px;}
.mx-auto{margin-left:auto;margin-right:auto;}
.ml-8{margin-left:8px;}
.text-brand{color:#e9353d;}
.text-muted{color:#777;}
.text-green{color:#0a0;}
.text-red{color:red;}
.m-0{margin:0;}
.w-60{width:60px;}
.maxw-120{max-width:120px;}
.fs-13{font-size:13px;}
.fw-500{font-weight:500;}
.mt-20{margin-top:20px;}
.my-20{margin-top:20px;margin-bottom:20px;}

/* Bons list components */
.list-header{display:flex;justify-content:space-between;font-size:14px;border-bottom:1px solid #eee;padding-bottom:6px;font-weight:600;}
.list-row{display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:4px 0;}
.center-bold-lg{text-align:center;font-weight:bold;font-size:18px;}
.logo-cell{
  width:90px;
  height:24px; /* Container-Höhe für alle Logos in der Liste */
  display:flex;
  justify-content:center;
  align-items:center;
  overflow:hidden; /* verhindert Ausreißer */
}
.logo-cell img{
  max-height:100%;
  max-width:100%;
  width:auto;
  height:100%;
  object-fit:contain;
}

/* Empty state */
.empty-state{text-align:center;padding:40px;font-size:18px;}

/* === Overlays (default hidden, replacing former inline styles) === */
#loadingOverlay,
#infoOverlay,
#bonusOverlay,
#incompleteOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(10px);
  background-color: rgba(255,255,255,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  text-align: center;
  color: #e9353d;
  font-weight: bold;
}

#loadingOverlay {
  background-color: rgba(255,255,255,0.6);
  z-index: 1000;
  flex-direction: column;
}

#bonusOverlay {
  z-index: 3000;
}

#incompleteOverlay {
  z-index: 3100;
}

/* Spinner wrapper utility for overlays */
.spinner-wrap {
  position: relative;
  width: 60px;
  height: 60px;
}

/* Force-hide file inputs on mobile */
input[type="file"].hidden {
  display: none !important;
}

#scanWrapper input[type="file"] {
  display: none !important;
}

/* Optional visually-hidden class for programmatic clicks */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

h1, h2, h3 {
  font-weight: 500;
}
h1, h2, h3 {
  font-weight: 500;
}

/* Inaktive Partner-Kacheln: Glas-Overlay + Blur + Schloss-Icon */
.partner-kachel.inaktiv {
  pointer-events: none;
  position: relative;
}

.partner-kachel.inaktiv .logo {
  filter: blur(1.5px) saturate(0.8);
}

.partner-kachel.inaktiv::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
  border-radius: 16px;
}

.partner-kachel.inaktiv::after {
  content: "🔒";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 20px;
  line-height: 1;
  opacity: 0.7;
}

.partner-kachel.inaktiv .bonusbar {
  background: rgba(255,255,255,0.25);
  color: #666;
}

/* Einheitliche Logo-Größe (Erkennungskarte & Bonliste) */
:root{--logo-height-card:30px;--logo-height-list:22px;}

/* Karte/Erkennung */
.card h3 .logo{
  height:var(--logo-height-card);
  width:auto;
  max-width:100%;
  object-fit:contain;
  display:block;
}

/* Bonliste */
.list-row .logo{
  height:var(--logo-height-list);
  width:auto;
  max-width:100%;
  object-fit:contain;
  display:block;
}

/* === Defensive overrides against inline styles from index === */
/* Bonliste: erzwinge einheitliche Bildhöhe auch wenn <img> width/height-Attributes oder inline-styles gesetzt sind */
.list-row img.logo,
.logo-cell img{
  height: var(--logo-height-list) !important;
  width: auto !important;
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* Karte/Erkennung: ebenfalls gegen Inline-Styles absichern */
.card h3 img.logo{
  height: var(--logo-height-card) !important;
  width: auto !important;
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* === Responsive FAB Layout: gleichmäßig verteilt über die gesamte Breite === */
:root{
  --fab-m: 30px;           /* Mindestabstand links/rechts (veraltet, nicht mehr benutzt unten) */
  --fab-small: 57px;       /* 5% kleiner: zuvor 60px */
  --fab-big: 95px;         /* 5% kleiner: zuvor 100px */
}

:root{ --footer-h: 60px; }

:root{
  --safeL: env(safe-area-inset-left);
  --safeR: env(safe-area-inset-right);
  --outer: 30px; /* gewünschter Außenabstand links/rechts */
}
@supports(padding: constant(safe-area-inset-left)){
  :root{
    --safeL: constant(safe-area-inset-left);
    --safeR: constant(safe-area-inset-right);
  }
}

:root{
  /* Kanten (Außenkanten) */
  --startEdge: calc(max(var(--safeL), 0px) + var(--outer));
  --endEdge: calc(100vw - max(var(--safeR), 0px) - var(--outer));
  /* Zentren der Außenbuttons (kleine Kreise) */
  --startC: calc(var(--startEdge) + (var(--fab-small) / 2));
  --endC: calc(var(--endEdge) - (var(--fab-small) / 2));
  /* Spanne zwischen den Außen-Zentren */
  --spanC: calc(var(--endC) - var(--startC));
}

/* Alle FABs absolute mit top setzen */
#logoutFab, #statsFab, #scanFab, #profileFab, #homeFab{
  position:absolute;
  top:-30px;
}
#scanFab{ top:-50px; width:var(--fab-big); height:var(--fab-big); }
#logoutFab, #statsFab, #profileFab, #homeFab{ width:var(--fab-small); height:var(--fab-small); }

#logoutFab{ left: var(--startEdge) !important; }
#statsFab { left: calc(var(--startC) + (var(--spanC) * 0.22) - (var(--fab-small) / 2)) !important; }
#scanFab  { left: calc(50vw - (var(--fab-big) / 2)) !important; }
#profileFab{ left: calc(var(--startC) + (var(--spanC) * 0.78) - (var(--fab-small) / 2)) !important; }
#homeFab  { left: calc(var(--endC) - (var(--fab-small) / 2)) !important; right:auto !important; }

@media (max-width: 360px){
  :root{ --fab-small: 53px; --fab-big: 91px; }
}

/* ===== Footer-Leiste und Buttons (ausgelagert) ===== */
footer.footer-bar{
  /* überschreibt den generischen footer-Style weiter oben */
  margin: 0;
  padding: 0;
  background: transparent;
}

.footer-bar{
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 40%, #6e6e6e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
  z-index: 1000; /* ggf. erhöhen, falls andere Elemente drüberliegen */
}

/* SCAN mittig ausrichten über linken Rand (ohne translate) */
.scan-button{
  position: absolute;
  top: -50px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e9353d;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform .15s ease;
  left: calc(50% - (var(--fab-big) / 2));
  z-index: 4003;
}
.scan-button:hover{ transform: scale(1.05); }

/* kleine runde Buttons: Home/Logout */
.footer-button{
  position: absolute;
  top: -30px;                 /* halb über der Leiste */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e9353d;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.22);
  cursor: pointer;
  user-select: none;
  z-index: 4002;
}
.footer-button.left{ left: auto; }
.footer-button.right{ right: auto; }

/* Bogen-/Hinweistext im Logout-Kreis (vereinfachte Variante) */
.danger-zone-text{
  position: absolute;
  top: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* === Ergänzung: IDs aus index.php, falls verwendet === */
#stickyFooterBar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 40%, #6e6e6e 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  height: 60px; /* fallback, falls --footer-h nicht gesetzt ist */
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}
#stickyFooterBar .footer-inner { display: grid; row-gap: 2px; text-align: center; font-size: 11px; line-height: 1.2; }
#stickyFooterBar .footer-line.strong { font-weight: 600; }



/* === iOS Safe-Area fixes for sticky footer & FABs === */
:root { --footer-base: 60px; }

.footer-bar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 4000; /* über allem */
  height: calc(var(--footer-base) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}

/* Fallback für ältere Safari-Versionen */
@supports(padding: constant(safe-area-inset-bottom)){
  .footer-bar{
    height: calc(var(--footer-base) + constant(safe-area-inset-bottom));
    padding-bottom: constant(safe-area-inset-bottom);
  }
}

/* Sicherheitsnetz: Body bekommt stets genug Platz nach unten */
body{
  padding-bottom: calc(var(--footer-h, 48px) + env(safe-area-inset-bottom));
}
@supports(padding: constant(safe-area-inset-bottom)){
  body{
    padding-bottom: calc(var(--footer-h, 48px) + constant(safe-area-inset-bottom));
  }
}
/* === Favorites mode: disable horizontal pagination and stack pages vertically === */
#partnerSlider.fav-mode{
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}
#partnerSlider.fav-mode .partner-page{
  flex: 0 0 auto; /* allow natural height */
}

/* Kleinere Screens: etwas mehr Abstand zwischen den mittleren Buttons */
@media (max-width: 400px){
  #statsFab{ transform: translateX(-3px); }
  #profileFab{ transform: translateX(3px); }
}

/* Entferne verbleibende CWX/Crossworx-Branding-Fläche am Seitenende */
#footerLogo, .footer-logo, .cw-brand, .cw-logo, .brand-footer,
footer .footer-logo, footer .cw-logo, footer .cw-brand {
  display: none !important;
}

/* ===== Modal-Overlay für vergrößerte Partner-Card ===== */
#cardOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#cardOverlay.active { display: flex; }
#cardOverlay .modal-card {
  width: min(520px, 92vw);
  border-radius: 16px;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 12px 36px rgba(0,0,0,0.25);
  overflow: hidden;
}
#cardOverlay .modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
#cardOverlay .modal-head .title{ font-weight:600; font-size:16px; }
#cardOverlay .modal-close{
  border:none; background:transparent; font-size:22px; line-height:1; cursor:pointer; padding:6px; color:#333;
}
#cardOverlay .modal-body{ padding: 14px; }
#cardOverlay .modal-row{ display:flex; justify-content:space-between; align-items:center; padding:6px 0; font-size:14px; }
#cardOverlay .label{ color:#555; }
#cardOverlay .value{ font-weight:600; }
#cardOverlay .modal-logo{
  height: 34px; width:auto; object-fit:contain; display:block;
}
