/* ============================================================
   Nuvane Stempelkarte – Editorial White
   ============================================================ */

:root {
  --paper: #ffffff;
  --paper-2: #f7f7f4;
  --paper-3: #f2f1ed;
  --line: #e7e4dd;
  --line-strong: #d8d4cb;
  --ink: #16140f;
  --muted: #6f6a5e;
  --gold: #b08c4a;
  --gold-deep: #8a6a33;
  --danger: #a04b2f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body.page {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  animation: nv-fade .35s ease;
}

@keyframes nv-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 24px;
}

.page-wide .wrap { max-width: 960px; }

/* ---------- Typografie ---------- */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display-italic {
  font-style: italic;
  color: var(--gold);
}

.lede {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

.gold-text { color: var(--gold-deep); }

/* „Nur gültig in Neumünster“ – für Läden mit mehreren Standorten */
.gueltig-hinweis {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}

.display + .gueltig-hinweis,
.nur-vorlesen + .gueltig-hinweis { margin-top: 10px; }

.poster .gueltig-hinweis { margin: -12px 0 26px; font-size: 15px; padding: 6px 16px; }

.muted { color: var(--muted); font-size: 13px; }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 14px;
}

.card-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

/* ---------- Banner ---------- */

.banner {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  font-size: 15px;
  animation: nv-fade .4s ease;
}

.banner-gold {
  border-color: var(--gold);
  background: var(--paper-2);
  color: var(--ink);
}

.banner-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.banner-dark em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
}

.banner-err {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--paper);
}

/* ---------- Stempelkarte ---------- */

.stamp-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 24px 20px;
  margin-bottom: 18px;
}

/* --spalten setzt die Seite je nach Stempelzahl (8 = 4 + 4). Die Stempel bleiben so groß
   wie bei fünf nebeneinander, das Raster steht mittig, eine kürzere letzte Reihe auch. */
.stamp-grid {
  --spalten: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: calc((100% - 48px) / 5 * var(--spalten) + (var(--spalten) - 1) * 12px);
  margin: 0 auto 18px;
}

.stamp-grid > .stamp {
  flex: 0 0 calc((100% - (var(--spalten) - 1) * 12px) / var(--spalten));
}

.stamp {
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.stamp.is-filled {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--gold);
}

.stamp.is-filled svg {
  width: 55%;
  height: 55%;
}

.stamp.is-new {
  animation: nv-stamp .55s cubic-bezier(.2, 1.6, .4, 1);
}

@keyframes nv-stamp {
  0%   { transform: scale(.2) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.progress {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.progress strong { color: var(--ink); }
.progress strong.gold-text { color: var(--gold-deep); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover { background: #2b2619; }

.btn-ghost {
  border-color: var(--line-strong);
}

.btn-ghost:hover { border-color: var(--ink); }

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}

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

.btn-row-center { justify-content: center; }

/* ---------- PIN-Bereich ---------- */

details.pin-box > summary {
  list-style: none;
  width: 100%;
}

details.pin-box > summary::-webkit-details-marker { display: none; }

.pin-form {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 18px;
}

.pin-hint {
  font-size: 14px;
  color: var(--muted);
}

.pin-input {
  width: 100%;
  font-size: 28px;
  letter-spacing: .45em;
  text-align: center;
  padding: 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-family: var(--sans);
}

/* ---------- Formulare & Panels ---------- */

.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 22px;
  margin-bottom: 18px;
}

.panel-danger { border-color: var(--danger); }

.stack { display: grid; gap: 12px; }

label {
  display: block;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 0;
  appearance: none;
}

input:focus, .btn:focus-visible, summary:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.check-row input { accent-color: var(--gold-deep); }

/* Paket-Auswahl im Admin */
.paket-feld { border: 1px solid var(--line-strong); padding: 10px 14px 12px; margin: 4px 0 0; }
.paket-feld legend { font-size: 13px; letter-spacing: .04em; color: var(--muted); padding: 0 6px; }
.paket-wahl { align-items: flex-start; padding: 6px 0; line-height: 1.4; }
.paket-wahl input { margin-top: 3px; flex: none; }

.copy-input {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  margin: 6px 0 14px;
}

.fineprint {
  font-size: 13px;
  color: var(--muted);
}

.fineprint a { color: var(--gold-deep); }

.copy-code {
  display: block;
  resize: vertical;
  line-height: 1.5;
  word-break: break-all;
}

/* Website-Knopf: Vorschau im Dashboard */
.web-vorschau {
  padding: 22px;
  margin: 6px 0 10px;
  border: 1px dashed var(--line-strong);
  text-align: center;
}

/* Scan-Seite am Computer: QR-Code fürs Handy */
.handy-qr {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 15px;
}

[hidden] { display: none !important; }

.handy-qr-code {
  flex: none;
  width: 116px;
  height: 116px;
}

.handy-qr-code svg { display: block; width: 100%; height: 100%; }

/* Lockfeld gegen Formular-Bots – für Menschen unsichtbar */
.nv-feld {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Karte: Meta & Löschen ---------- */

.card-meta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.delete-box { margin-top: 10px; }

.delete-box > summary {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.delete-box .stack { margin-top: 12px; }

.inline-details { display: inline; }

.inline-details > summary {
  display: inline;
  cursor: pointer;
  color: var(--gold-deep);
  text-decoration: underline;
  text-decoration-style: dotted;
  font-size: 14px;
}

.pin-reveal { margin-left: 6px; }

/* ---------- Dashboard ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (min-width: 700px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

.tile {
  border: 1px solid var(--line);
  padding: 18px 16px;
  background: var(--paper);
}

.tile-num {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.1;
}

.tile-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.data-table .empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

.data-table .links a {
  color: var(--gold-deep);
  margin-right: 8px;
  white-space: nowrap;
}

/* Schaltfläche, die wie ein Link in der Tabelle aussieht (z. B. Löschen) */
.data-table .links .linkbtn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--gold-deep);
  cursor: pointer;
  white-space: nowrap;
}
.data-table .links .linkbtn:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid;
}

.badge-on { color: var(--gold-deep); border-color: var(--gold); }
.badge-off { color: var(--muted); border-color: var(--line-strong); }
.badge-paket { color: var(--ink); border-color: var(--line-strong); }

/* ---------- Startseite ---------- */

.hero { padding: 24px 0 28px; }

.steps {
  display: grid;
  gap: 0;
  margin-bottom: 26px;
}

.step {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  min-width: 24px;
}

.cta-block p { margin-bottom: 12px; color: var(--muted); }

/* ---------- Datenschutz / Prosa ---------- */

.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  margin: 20px 0 8px;
}

.prose h2:first-child { margin-top: 0; }

.prose p { color: var(--muted); font-size: 15px; }

/* ---------- QR-Aushang ---------- */

.poster {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 40px 36px;
  border: 1px solid var(--ink);
  outline: 1px solid var(--line);
  outline-offset: 6px;
  text-align: center;
  background: var(--paper);
}

.poster .display { font-size: 40px; }

.poster-lede {
  margin: 14px 0 30px;
  font-size: 17px;
  color: var(--muted);
}

.poster-qr {
  display: flex;
  justify-content: center;
  margin: 0 auto 30px;
}

.poster-qr svg {
  width: 300px;
  height: 300px;
  max-width: 100%;
}

.poster-steps {
  text-align: left;
  max-width: 360px;
  margin: 0 auto 30px;
  padding-left: 24px;
}

.poster-steps li {
  margin: 10px 0;
  font-size: 16px;
}

.poster-steps li::marker {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
}

.poster-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: 480px;
  margin: 24px auto 0;
  padding: 18px 20px 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.page-wide .site-footer { max-width: 960px; }

.site-footer a { color: var(--gold-deep); }

.site-footer .dot { padding: 0 6px; }

/* ---------- Druck ---------- */

@media print {
  .no-print, .site-footer { display: none !important; }
  body.page { animation: none; }
  .wrap { padding: 0; max-width: none; }
  .poster { border: 1px solid #000; outline: none; }
}

@page { size: A4; margin: 16mm; }

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Apple-Wallet-Knopf auf der Stempelkarte */
.wallet-knopf {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding: 16px 18px;
  background: var(--ink, #16140f); color: #fff;
  border-radius: 14px; text-decoration: none; line-height: 1.4;
}
.wallet-knopf:hover { opacity: .92; }
.wallet-knopf svg { width: 30px; height: 30px; flex: 0 0 30px; color: #fff; }   /* immer weiß: die Ladenfarbe kann so dunkel sein wie der Knopf */
.wallet-knopf b { font-size: 15.5px; }
.wallet-knopf span { font-size: 13px; opacity: .78; }
.wallet-knopf b + br + * { opacity: .78; }

/* Google Wallet: Googles eigene Knopf-Grafik, unverändert. Vorgabe: mindestens 48 hoch, ringsum 8 Abstand. */
.gwallet-zeile { margin: 18px 0 0; text-align: center; }
.gwallet-knopf { display: inline-block; padding: 8px; line-height: 0; }
.gwallet-knopf img { display: block; height: 56px; width: auto; max-width: 100%; }
.gwallet-zeile .fineprint { display: block; }

/* Wallet-Checkliste im Admin */
.wok { color: #3f7d4f; font-size: 13px; }
.woffen { color: #a4442f; font-size: 13px; }

/* ---------- Logo des Ladens ---------- */

.laden-logo {
  display: block;
  max-width: 220px;
  max-height: 72px;
  width: auto;
  height: auto;
  margin-bottom: 16px;
}

.poster .laden-logo {
  max-width: 320px;
  max-height: 120px;
  margin: 0 auto 22px;
}

/* Überschrift nur für Vorlesehilfen (Name steht schon im Logo) */
.nur-vorlesen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Zeichen in Originalfarben (Einstellung „Stempel in den Originalfarben“) – leere Stempel zeigen es blass */
.stempel-bild {
  display: block;
  width: 64%;
  height: 64%;
  object-fit: contain;
}

.stamp.is-leer-bild .stempel-bild {
  opacity: .16;
  filter: grayscale(1);
}

/* Logo als Stempelabdruck: Form aus dem Logo, Farbe vom Stempel */
.stempel-logo {
  display: block;
  width: 64%;
  height: 64%;
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Admin: Vorschau */
.logo-vorschau {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

@media (min-width: 560px) {
  .logo-vorschau { grid-template-columns: 1fr 1.3fr; }
}

.logo-weiss,
.pass-mini {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
}

.logo-gross {
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  align-self: center;
  margin: auto 0;
}

.logo-vorschau small {
  font-size: 12px;
  color: var(--muted);
}

.pass-mini {
  border: none;
  border-radius: 14px;
}

.pass-mini small { color: inherit; opacity: .7; }

.pass-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 25px;
}

.pass-kopf img { display: block; width: auto; height: auto; max-height: 40px; max-width: 55%; }

.pass-name { font-size: 14px; font-weight: 600; }

.pass-streifen { display: block; width: 100%; height: auto; }

/* ---------- Team-Zugang: Stempeln per Scan ---------- */

.karte-scan {
  display: flex;
  gap: 18px;
  align-items: center;
}

.karte-qr {
  flex: 0 0 auto;
  width: 150px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
}

.karte-qr svg { display: block; width: 100%; height: auto; }

.karte-scan p { line-height: 1.45; }
.karte-scan .fineprint { display: inline-block; margin-top: 4px; }

.team-hinweis { border-color: var(--gold); }
.team-hinweis p { margin-bottom: 12px; line-height: 1.45; }

.team-gast-zeile {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 15px;
}

.team-gast-zeile span { color: var(--muted); }
.team-gast-zeile strong { overflow-wrap: anywhere; text-align: right; }

.team-stand { font-size: 20px; margin-bottom: 14px; }

.team-aktion { margin: 20px 0 10px; }

.btn.team-knopf {
  width: 100%;
  min-height: 78px;
  font-size: 22px;
  font-weight: 600;
}

.btn.team-knopf:disabled { opacity: .6; cursor: default; transform: none; }

.team-praemie { margin-top: 10px; text-align: center; font-weight: 600; }

.team-weiter { text-align: center; margin-bottom: 18px; }

.team-schritte { padding-left: 20px; line-height: 1.5; }
.team-schritte li + li { margin-top: 6px; }

.team-ok { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.team-ok svg { width: 28px; height: 28px; flex: 0 0 auto; color: var(--gold-deep); }

.team-einrichten {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 12px 0 16px;
}

.team-verwalten { margin-top: 16px; }
.team-verwalten > summary { cursor: pointer; font-weight: 600; }
.team-verwalten form { margin-top: 14px; }

@media (max-width: 520px) {
  .karte-scan, .team-einrichten { flex-direction: column; align-items: center; text-align: center; }
  .karte-qr { width: 200px; }
}

/* ---------- Team-App: Vollbild-Scanner (Web-App auf dem Startbildschirm) ---------- */

.team-teilen svg { width: 17px; height: 17px; vertical-align: -3px; color: #0a84ff; }
.team-installieren .team-schritte { margin-top: 4px; }

body.team-app {
  background: #0e0d0b;
  color: #fff;
  animation: none;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.team-app .wrap { max-width: none; padding: 0; }

.tapp [hidden] { display: none !important; }

.tapp {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  background: #0e0d0b;
}

.tapp-kopf {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
}

.tapp-marke { min-width: 0; display: flex; align-items: center; }
.tapp-logo { display: block; max-height: 34px; max-width: 62vw; width: auto; border-radius: 6px; }
.tapp-name {
  font-family: var(--serif);
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tapp-rund {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tapp-rund svg { width: 22px; height: 22px; fill: currentColor; }
.tapp-rund.tapp-klein { width: 30px; height: 30px; }
.tapp-rund.tapp-klein svg { width: 16px; height: 16px; }

.tapp-tipp {
  position: relative;
  z-index: 3;
  margin: 0 16px 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.tapp-tipp p { flex: 1; }
.tapp-tipp-knopf {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: #fff;
  color: #16140f;
  font: 600 14px var(--sans);
  cursor: pointer;
}

.tapp-sucher { position: relative; flex: 1; overflow: hidden; }

.tapp-sucher video {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Rahmen in der Bildmitte – dort liest der Scanner. Außen abgedunkelt. */
.tapp-rahmen {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70vw, 300px);
  height: min(70vw, 300px);
  transform: translate(-50%, -50%);
  border-radius: 24px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .42);
}
.tapp-rahmen i {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 0 solid #fff;
}
.tapp-rahmen i:nth-child(1) { left: 0; top: 0; border-width: 4px 0 0 4px; border-top-left-radius: 24px; }
.tapp-rahmen i:nth-child(2) { right: 0; top: 0; border-width: 4px 4px 0 0; border-top-right-radius: 24px; }
.tapp-rahmen i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 4px 4px; border-bottom-left-radius: 24px; }
.tapp-rahmen i:nth-child(4) { right: 0; bottom: 0; border-width: 0 4px 4px 0; border-bottom-right-radius: 24px; }

.tapp-hinweis {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 16px;
  color: rgba(255, 255, 255, .9);
}

.tapp-stoerung {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px 28px calc(28px + env(safe-area-inset-bottom));
  background: #0e0d0b;
  text-align: center;
}
.tapp-stoerung .btn { align-self: center; min-width: 220px; }
.tapp-stoerung .btn-primary { background: #fff; color: #16140f; border-color: #fff; }
.tapp-klein-text { font-size: 13px; color: rgba(255, 255, 255, .6); margin-top: 8px; }

.tapp-meldung {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(66px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(22, 20, 15, .88);
  color: #fff;
  font-size: 15px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
}

/* Blatt von unten: Karte des Gastes, Ergebnis, Menü */
.tapp-blatt {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 560px;
  max-height: 88%;
  overflow-y: auto;
  margin: 0 auto;
  padding: 22px 20px calc(18px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  display: grid;
  gap: 10px;
  animation: tapp-hoch .26s cubic-bezier(.2, .8, .2, 1);
  -webkit-user-select: text;
  user-select: text;
}
@keyframes tapp-hoch { from { transform: translateY(100%); } to { transform: none; } }

.tapp-blatt .eyebrow { margin-bottom: 0; }
.tapp-blatt .btn { width: 100%; }
.tapp-blatt .stack { gap: 10px; }

.tapp-gast { font-size: 19px; font-weight: 600; word-break: break-all; }
.tapp-stand { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.tapp-stand strong { font-size: 34px; font-weight: 400; }
.tapp-laedt { padding: 22px 0; text-align: center; color: var(--muted); }
.tapp-notiz { color: var(--danger); font-size: 15px; }
.tapp-blatt .team-praemie { margin: -2px 0 2px; }

.tapp-punkte { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 8px; }
.tapp-punkt {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
}
.tapp-punkt.is-voll { background: var(--marke, var(--gold)); border-color: var(--marke, var(--gold)); }

.tapp-titel { font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.tapp-text { font-size: 16px; color: var(--muted); }
.tapp-stoerung .tapp-text { color: rgba(255, 255, 255, .78); }
.tapp-blatt .tapp-text strong { color: var(--ink); }

.tapp-erfolg, .tapp-fehler { text-align: center; display: grid; gap: 6px; justify-items: center; padding: 6px 0 4px; }
.tapp-erfolg + .tapp-punkte { justify-content: center; }
.tapp-haken {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--marke, var(--gold));
  color: var(--auf-marke, #fff);
  animation: tapp-pop .38s cubic-bezier(.2, 1.4, .4, 1);
  margin-bottom: 6px;
}
.tapp-haken svg { width: 44px; height: 44px; }
@keyframes tapp-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tapp-blatt, .tapp-haken { animation: none; }
}
