/* Prime Stamp – Grundlayout. Farben kommen pro Café als CSS-Variablen. */
:root {
  --bg: #F7F3EA; --fg: #48382B; --strip: #48382B; --accent: #70C34E;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: color-mix(in srgb, var(--bg) 82%, #000 6%);
  color: var(--fg);
  line-height: 1.45;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
a { color: inherit; }
.hidden { display: none !important; }
.muted { opacity: .68; font-size: .92em; }
.center { text-align: center; }
.wrap { max-width: 440px; margin: 0 auto; }
.wrap--wide { max-width: 980px; }
h1 { font-size: 1.7rem; line-height: 1.15; margin: .4em 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0; }

/* Buttons & Formulare */
.btn {
  appearance: none; border: 2px solid var(--fg); background: transparent; color: var(--fg);
  font: inherit; font-weight: 650; padding: .7em 1.1em; border-radius: 14px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--fg); color: var(--on-fg, var(--bg)); }
.btn-reward { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { border-color: transparent; text-decoration: underline; font-weight: 500; }
.btn-big { width: 100%; padding: 1em; font-size: 1.08rem; }
.btn-small { padding: .35em .7em; font-size: .9rem; }
input, select {
  font: inherit; color: var(--field-ink, var(--fg)); background: #fff; width: 100%;
  border: 1.5px solid color-mix(in srgb, var(--field-ink, var(--fg)) 30%, transparent); border-radius: 12px; padding: .75em .9em;
}
input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
input[type=color] { padding: 4px; height: 46px; }
label { display: grid; gap: .35em; font-weight: 600; font-size: .95rem; }
label .muted { font-weight: 400; }
.alert { background: #FBE9E6; color: #8A2A1B; border-radius: 12px; padding: .75em 1em; }
.alert-ok { background: #E7F4E4; color: #24561B; }

/* Beitritt / Login */
.join { max-width: 420px; margin: 4vh auto 0; text-align: center; }
.join-logo { width: 140px; height: 110px; object-fit: contain; margin: 0 auto; display: block; }
.join-lead { font-size: 1.05rem; margin: 0 0 1.6em; }
.join-form { display: grid; gap: 1em; text-align: left; background: var(--bg); padding: 22px; border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 30px rgba(0,0,0,.06); }
.fineprint { font-size: .8rem; opacity: .6; margin-top: 1.6em; text-align: center; }

/* Die Karte */
.pass {
  background: var(--bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 40px rgba(0,0,0,.10);
}
.pass-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.cafe-logo { width: 64px; height: 44px; object-fit: contain; flex: none; }
.cafe-logo--empty { display: grid; place-items: center; }
.cafe-logo--empty .bean { width: 26px; }
.pass-title { font-weight: 750; font-size: 1.08rem; line-height: 1.2; flex: 1; }
.pass-count { text-align: right; line-height: 1.1; }
.pass-count strong { font-size: 1.5rem; display: block; }
.label { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.pass-strip { background: var(--strip); padding: 22px 18px; }
.beans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 14px 6px; }
.beans li { display: grid; place-items: center; }
.bean { width: 34px; height: auto; }
.bean-body { fill: none; stroke: color-mix(in srgb, var(--bg) 55%, var(--strip)); stroke-width: 3; }
.bean-line { fill: none; stroke: color-mix(in srgb, var(--bg) 55%, var(--strip)); stroke-width: 3; stroke-linecap: round; }
.bean.is-on .bean-body { fill: var(--accent); stroke: var(--accent); }
.bean.is-on .bean-line { stroke: var(--strip); }
.bean.pop { animation: pop .55s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
.pass-ready { background: var(--accent); color: #fff; font-weight: 700; text-align: center; padding: .8em 1em; }
.pass-fields { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px 4px; }
.pass-fields strong { font-size: 1.05rem; }
.pass-fields .right { text-align: right; }
.pass-qr { text-align: center; padding: 14px 20px 22px; }
.pass-qr img { background: #fff; padding: 12px; border-radius: 16px; width: 220px; height: 220px; }
.pass-qr .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; font-weight: 700; margin-top: 6px; }
.wallet-btns { display: grid; gap: 10px; margin-bottom: 16px; }
.wallet-btns { justify-items: center; }
.wallet-badge { display: inline-block; line-height: 0; padding: 5px; }
.wallet-badge img { width: 200px; height: auto; display: block; }
.save-hint { margin: 18px 4px 0; background: var(--bg); border-radius: 16px; padding: 12px 16px; }
.save-hint summary { font-weight: 650; cursor: pointer; }

/* Personal */
.staff-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.staff-head > div { flex: 1; }
.reader { border-radius: var(--radius); overflow: hidden; background: #000; min-height: 260px; }
.reader video { width: 100% !important; display: block; }
.manual { display: flex; gap: 8px; margin-top: 14px; }
.manual input { text-transform: uppercase; letter-spacing: .1em; }
.pass--staff { margin-bottom: 14px; }
.actions { display: grid; gap: 10px; margin-top: 14px; }
.actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Aufsteller zum Ausdrucken */
@media print {
  .no-print { display: none !important; }
  body { padding: 0; background: #fff; }
}

/* Admin */
.admin-head, .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel { background: #fff; border-radius: 18px; padding: 20px; margin-top: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.links a { margin-right: 12px; white-space: nowrap; }
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.colors { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 520px) { .form-row.colors { grid-template-columns: 1fr 1fr; } }
.prose { background: #fff; padding: 24px; border-radius: 18px; }

/* Aktion */
.campaign { background: var(--accent); color: #fff; font-weight: 650; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }

/* ---------- Marke Prime Stamp ---------- */
.wm { display: inline-flex; align-items: baseline; font-weight: 750; letter-spacing: -.01em; }
.wm-l { font-weight: 400; }
.wm-dot { display: inline-block; width: .34em; height: .34em; border-radius: 50%; background: #F2B65A; margin-left: .12em; }
.brand-mark { width: 34px; height: auto; flex-shrink: 0; }
.cs-head { max-width: 980px; margin: 0 auto; padding: 18px 16px 0; }
.cs-head a { display: inline-flex; align-items: center; gap: 10px; color: #142A20; text-decoration: none; font-size: 1.1rem; }
.cs-hero-mark { width: 96px; height: auto; }
.cs-hero { display: flex; justify-content: center; margin-bottom: 8px; }
.cs-by { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px auto 8px; font-size: .78rem; color: inherit; opacity: .55; text-decoration: none; }
.cs-by:hover { opacity: .85; }
.cs-by .wm { font-weight: 700; }
.cs-mini { width: 20px; height: auto; flex-shrink: 0; }

/* ---------- QR-Aufsteller (Druck) ---------- */
.pz-body { background: #D9D6CF; margin: 0; --u: 1mm; color: var(--fg); }
.pz-a4 { --u: 1.4142mm; }
.pz-tools { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; font-size: .9rem; flex-wrap: wrap; }
.pz-tools a { color: #333; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: #fff; }
.pz-tools a.on { background: #1F2A24; color: #fff; }
.pz { width: calc(148 * var(--u)); height: calc(210 * var(--u)); margin: 0 auto 24px; background: var(--bg); box-sizing: border-box; overflow: hidden;
  display: flex; flex-direction: column; padding: calc(10 * var(--u)) calc(10 * var(--u)) calc(8 * var(--u));
  font-family: 'Onest', system-ui, sans-serif; font-size: calc(3.4 * var(--u)); line-height: 1.3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pz-top { display: flex; align-items: center; gap: calc(3 * var(--u)); }
.pz-logo { width: calc(11 * var(--u)); height: calc(11 * var(--u)); object-fit: contain; border-radius: calc(2.5 * var(--u)); }
.pz-logo.cafe-logo--empty { display: grid; place-items: center; background: var(--strip); }
.pz-logo.cafe-logo--empty .bean { width: 50%; }
.pz-cafe { font-weight: 700; font-size: calc(4 * var(--u)); letter-spacing: -.01em; }
.pz-title { margin: calc(10 * var(--u)) 0 0; font-size: calc(13 * var(--u)); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.pz-title span { color: var(--accent-ink, var(--accent)); }
.pz-reward { display: flex; align-items: center; gap: calc(2.2 * var(--u)); margin: calc(5 * var(--u)) 0 0; font-size: calc(5 * var(--u)); font-weight: 650; letter-spacing: -.01em; }
.pz-reward i { width: calc(2.6 * var(--u)); height: calc(2.6 * var(--u)); border-radius: 50%; background: var(--accent-ink, var(--accent)); flex: none; }
.pz-main { flex: 1; display: grid; grid-template-columns: calc(64 * var(--u)) 1fr; gap: calc(7 * var(--u)); align-items: center; align-content: center; }
.pz-qr { margin: 0; }
.pz-frame { background: #fff; border-radius: calc(5 * var(--u)); padding: calc(4.5 * var(--u)); border: calc(.35 * var(--u)) solid color-mix(in srgb, var(--fg) 18%, var(--bg)); }
.pz-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.pz-qr figcaption { margin-top: calc(3 * var(--u)); font-weight: 650; font-size: calc(3.6 * var(--u)); text-align: center; }
.pz-side { display: flex; flex-direction: column; gap: calc(6 * var(--u)); }
.pz-stack { position: relative; padding-top: calc(15 * var(--u)); }
.pz-google { position: absolute; top: 0; left: calc(4 * var(--u)); right: 0; background: var(--strip); color: #fff; border-radius: calc(3.4 * var(--u)); overflow: hidden; height: calc(40 * var(--u)); }
.pz-apple { position: relative; margin-right: calc(4 * var(--u)); background: var(--bg); color: var(--fg); border-radius: calc(2.6 * var(--u)); overflow: hidden;
  border: calc(.35 * var(--u)) solid color-mix(in srgb, var(--fg) 28%, var(--bg)); }
.pz-gg-head { display: flex; align-items: center; gap: calc(1.4 * var(--u)); padding: calc(2.2 * var(--u)) calc(2.8 * var(--u)) 0; font-size: calc(2.3 * var(--u)); font-weight: 600; }
.pz-gg-logo { width: calc(4.2 * var(--u)); height: calc(4.2 * var(--u)); border-radius: 50%; object-fit: contain; background: #fff; flex: none; }
.pz-gg-title { padding: calc(.8 * var(--u)) calc(2.8 * var(--u)) calc(2 * var(--u)); font-size: calc(3.4 * var(--u)); font-weight: 600; }
.pz-ap-head { display: flex; align-items: center; gap: calc(1.4 * var(--u)); padding: calc(2 * var(--u)) calc(2.4 * var(--u)); font-size: calc(2.6 * var(--u)); }
.pz-ap-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-ap-logo { width: calc(4.4 * var(--u)); height: calc(4.4 * var(--u)); object-fit: contain; flex: none; }
.pz-ap-fields { display: flex; gap: calc(2 * var(--u)); padding: calc(1.8 * var(--u)) calc(2.4 * var(--u)) calc(2.2 * var(--u)); }
.pz-f { display: flex; flex-direction: column; font-weight: 600; font-size: calc(2.5 * var(--u)); line-height: 1.15; }
.pz-f small { font-size: calc(1.7 * var(--u)); font-weight: 600; letter-spacing: .04em; opacity: .75; }
.pz-right { text-align: right; margin-left: auto; }
.pz-strip { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: calc(1 * var(--u)) calc(1.2 * var(--u)); justify-items: center; background: var(--strip); padding: calc(2 * var(--u)) calc(2.6 * var(--u)); }
.pz-bean { width: calc(3.5 * var(--u)); }
.pz-wallets { display: flex; flex-direction: column; align-items: flex-start; gap: calc(2.4 * var(--u)); }
.pz-wallets img { width: calc(36 * var(--u)); height: auto; display: block; }
.pz-steps { list-style: none; margin: 0; padding: calc(4 * var(--u)) 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between;
  border-top: calc(.3 * var(--u)) solid color-mix(in srgb, var(--fg) 20%, var(--bg)); font-size: calc(3.2 * var(--u)); font-weight: 600; }
.pz-steps li { display: flex; align-items: baseline; gap: calc(1.6 * var(--u)); }
.pz-steps b { color: var(--accent-ink, var(--accent)); font-weight: 800; font-variant-numeric: tabular-nums; }
.pz-foot { display: flex; justify-content: space-between; align-items: center; margin-top: calc(3.5 * var(--u)); font-size: calc(2.6 * var(--u)); color: color-mix(in srgb, var(--fg) 60%, var(--bg)); }
.pz-by { display: inline-flex; align-items: center; gap: calc(1.4 * var(--u)); font-weight: 650; }
.pz-by .cs-mini { width: calc(4.6 * var(--u)); }
@media print {
  .pz-body { background: none; }
  .pz { margin: 0; }
  .no-print { display: none !important; }
}

/* Eigenes Stempel-Symbol statt Bohne */
.bean.stamp-img { width: 40px; height: 44px; object-fit: contain; filter: brightness(0); opacity: .14; transition: opacity .2s, filter .2s; }
.bean.stamp-img.is-on { filter: none; opacity: 1; }
.pass-program { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.pz-bean.stamp-img { width: calc(5 * var(--u)); height: calc(5.5 * var(--u)); }
img.cafe-logo { width: auto; max-width: 110px; height: auto; max-height: 44px; }

/* Karte wählen (ein QR-Code für mehrere Karten) */
.picks { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px 12px 12px; border: 0; border-radius: 18px;
  background: var(--fg); color: var(--on-fg, var(--bg)); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .12s; }
.pick:active { transform: scale(.98); }
.pick-icon { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--strip); }
.pick-icon .bean { width: 48px; height: 52px; }
.pick-icon svg.bean { width: 30px; }
.pick-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pick-text strong { font-size: 1.15rem; }
.pick-text small { font-size: .9rem; opacity: .8; }
.pick-go { font-size: 1.8rem; line-height: 1; opacity: .5; }
.pz-google--light { color: #2b2b2b; }
img.pz-logo { width: auto; max-width: calc(40 * var(--u)); }
img.pz-ap-logo { width: auto; max-width: calc(18 * var(--u)); height: calc(3.6 * var(--u)); }
input::placeholder { color: var(--field-ink, var(--fg)); opacity: .45; }
