/* Gastseite: die Stempelkarte */
body.gast { background: linear-gradient(180deg, var(--farbe-hell) 0, var(--grund) 22rem); min-height: 100vh; min-height: 100dvh; }

.kopf {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 0 1rem;
}
.kopf .logo {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none;
  color: var(--auf-farbe); background: var(--farbe); border-radius: 16px;
}
.kopf .logo .symbol { width: 30px; height: 30px; }
.kopf .betrieb { font-family: var(--titel-schrift); font-size: 1.375rem; font-weight: 700; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.kopf .unter { color: var(--text-leise); font-size: .9375rem; margin: 0; }
html[data-branche="barbershop"] .kopf .betrieb { text-transform: uppercase; letter-spacing: .06em; font-size: 1.2rem; }

.karte { position: relative; overflow: hidden; padding: 1.25rem 1.25rem 1.5rem; }
.karte::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--farbe); }
.karte h1 { font-size: 1.5rem; margin-top: .25rem; }
.belohnung {
  display: flex; gap: .75rem; align-items: center;
  padding: .75rem .875rem; margin: .75rem 0 1.25rem;
  background: var(--farbe-hell); border-radius: 14px;
}
.belohnung .symbol { width: 34px; height: 34px; color: var(--farbe-text); }
.belohnung .klein { display: block; font-size: .875rem; color: var(--text-leise); }
.belohnung strong { display: block; font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }

.felder {
  --spalten: 5;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--spalten), minmax(0, 1fr)); gap: clamp(.5rem, 2.5vw, .875rem);
}
.feldchen {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px dashed var(--farbe-mittel); color: var(--text-leise);
  font-weight: 700; font-size: clamp(.875rem, 3.6vw, 1.125rem);
  background: #fff;
}
.feldchen .symbol { width: 52%; height: 52%; }
.feldchen.ziel { border-style: solid; border-color: var(--farbe-text); color: var(--farbe-text); background: var(--farbe-hell); }
.feldchen.voll {
  border: 0; color: var(--auf-farbe); background: var(--farbe);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 0 5px var(--farbe);
  transform: rotate(var(--dreh, 0deg));
}
.feldchen.neu { animation: stempel .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.feldchen.neu::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid var(--farbe); opacity: 0;
  animation: ring .7s ease-out .15s both;
}
@keyframes stempel {
  0% { transform: scale(1.9) rotate(-25deg); opacity: 0; }
  60% { transform: scale(.92) rotate(var(--dreh, 0deg)); opacity: 1; }
  100% { transform: scale(1) rotate(var(--dreh, 0deg)); opacity: 1; }
}
@keyframes ring {
  0% { transform: scale(.8); opacity: .8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.fortschritt { margin-top: 1.25rem; }
.balken { height: 12px; border-radius: 99px; background: var(--farbe-hell); overflow: hidden; }
.balken > span { display: block; height: 100%; width: 0; background: var(--farbe); border-radius: inherit; transition: width .6s ease; }
.fortschritt p { margin: .5rem 0 0; font-weight: 600; }
.fortschritt .zahl { font-size: 1.125rem; }

.karte.ist-voll .belohnung { background: var(--farbe); color: var(--auf-farbe); animation: puls 2.4s ease-in-out infinite; }
.karte.ist-voll .belohnung .symbol, .karte.ist-voll .belohnung .klein { color: var(--auf-farbe); }
@keyframes puls { 0%, 100% { box-shadow: 0 0 0 0 var(--farbe-mittel); } 50% { box-shadow: 0 0 0 8px transparent; } }

.hinweis { font-size: 1.0625rem; }
.aktionen { display: grid; gap: .75rem; margin: 1.25rem 0; }
.aktionen .knopf { min-height: 64px; font-size: 1.125rem; flex-direction: column; gap: .125rem; }

.info { font-size: .9375rem; color: var(--text-leise); }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 0 0 1rem; }
.info dt { font-weight: 600; color: var(--text); }
.info dd { margin: 0; }
.info h2 { font-size: 1rem; font-family: var(--schrift); color: var(--text); }

.andere { margin-top: 1rem; }
.andere ul { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.andere a { display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: .5rem .75rem; background: #fff; border: 1px solid var(--linie); border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; }

/* Hinweis-Leiste unten (Erfolg und Fehler) */
.toast {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 30;
  transform: translate(-50%, 150%); width: min(30rem, calc(100% - 2rem));
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1rem; border-radius: 14px; background: #1d1d1f; color: #fff; box-shadow: var(--schatten);
  visibility: hidden; opacity: 0;
  transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s;
}
.toast.zeigen { transform: translate(-50%, 0); visibility: visible; opacity: 1; transition: transform .3s ease, opacity .3s ease; }
.toast .text { flex: 1; font-weight: 600; }
.toast button { flex: none; min-height: 44px; padding: .5rem .875rem; font: inherit; font-weight: 700; color: #fff; background: transparent; border: 2px solid rgba(255,255,255,.6); border-radius: 10px; cursor: pointer; }

/* Dialog für das Personal */
dialog.personal {
  width: min(26rem, 100%); max-height: 100%; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 22px 22px 0 0; background: var(--flaeche); color: var(--text);
  box-shadow: 0 -8px 40px rgba(0,0,0,.25);
}
@media (min-width: 40rem) { dialog.personal { margin: auto; border-radius: 22px; } }
dialog.personal::backdrop { background: rgba(20, 16, 12, .55); }
dialog.personal[open] { animation: hoch .25s ease-out; }
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog-innen { padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom)); }
.dialog-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.dialog-kopf h2 { font-size: 1.25rem; margin: 0; font-family: var(--schrift); }
.dialog-kopf .unter { margin: .125rem 0 0; color: var(--text-leise); font-size: .9375rem; }
.schliessen { min-width: 48px; min-height: 48px; border: 0; border-radius: 12px; background: var(--farbe-hell); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }

.anzahl { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .5rem 0 1rem; }
.anzahl button { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--farbe-mittel); background: #fff; color: var(--farbe-text); font-size: 1.75rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.anzahl button[disabled] { opacity: .35; cursor: not-allowed; }
.anzahl output { min-width: 3ch; text-align: center; font-size: 2.25rem; font-weight: 800; }

.pin-punkte { display: flex; justify-content: center; gap: 1rem; margin: .5rem 0 1rem; }
.pin-punkte span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text-leise); }
.pin-punkte span.an { background: var(--text); border-color: var(--text); }
.pin-punkte.wackeln { animation: wackeln .4s ease; }
@keyframes wackeln { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.tasten { display: grid; grid-template-columns: repeat(3, 1fr); gap: .625rem; }
.tasten button {
  min-height: 64px; font: inherit; font-size: 1.5rem; font-weight: 700;
  color: var(--text); background: var(--farbe-hell); border: 0; border-radius: 16px;
  cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.tasten button:active { background: var(--farbe-mittel); }
.tasten button.text { font-size: 1rem; }
.tasten button[disabled] { opacity: .4; }

.dialog-meldung { min-height: 1.5em; margin: 0 0 .75rem; text-align: center; font-weight: 600; }
.dialog-meldung.fehler { color: var(--fehler); }

.erfolg { text-align: center; padding: .5rem 0; }
.erfolg .haken { width: 72px; height: 72px; margin: 0 auto .75rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok-hell); color: var(--ok); }
.erfolg .haken .symbol { width: 40px; height: 40px; stroke-width: 2.5; }
.erfolg.warnung .haken { background: var(--fehler-hell); color: var(--fehler); }
.erfolg p { font-size: 1.125rem; }
.erfolg .knopf { margin-top: .5rem; }
.knopfreihe { display: grid; gap: .625rem; margin-top: 1rem; }
.gesperrt-kurz { pointer-events: none; }

.leer { text-align: center; padding: 2.5rem 1.25rem; }
.leer .gross { width: 64px; height: 64px; margin: 0 auto 1rem; color: var(--farbe-text); }

.app-installieren { margin-top: .5rem; }
.offline-hinweis { position: sticky; top: 0; z-index: 20; margin: 0 -1rem 1rem; border-radius: 0; text-align: center; }
