:root {
  --ink: #13241F; --ink2: #2B3D37; --paper: #F3EEE3; --paper2: #EAE3D4; --card: #FFFDF8; --line: #DDD4C2;
  --muted: #6E6B5E; --brand: #1F5C4A; --stamp: #E4573D; --gold: #C99A2E; --ok: #2F8A5B; --warn: #C7801E; --bad: #C23B2B;
  --r: 18px; --r-sm: 12px; --shadow: 0 1px 0 rgba(19,36,31,.06), 0 10px 30px -12px rgba(19,36,31,.25);
  --f-ui: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-display: 'Fraunces', ui-serif, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--f-ui); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(19,36,31,.045) 1px, transparent 1px); background-size: 18px 18px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: clamp(30px, 5vw, 52px); } h2 { font-size: 26px; } h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.grow { flex: 1; } .stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 11px 18px; border-radius: 999px; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.soft { background: var(--paper2); border-color: transparent; color: var(--ink); }
.btn.red { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.lg { padding: 16px 26px; font-size: 17px; }
.btn.block { width: 100%; }
.btn.wrap { white-space: normal; text-align: center; }
.hero > *, .grid > *, .row > * { min-width: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: var(--paper2); }

/* Felder */
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); }
label.f > span { display: block; margin-bottom: 5px; }
.in, select.in, textarea.in { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 10px 12px; outline: none; font-weight: 400; }
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,92,74,.15); }
textarea.in { min-height: 84px; resize: vertical; }
/* Aufklapp-Menüs: eigener Pfeil direkt hinter dem Text, Breite passend zum Inhalt */
select.in { -webkit-appearance: none; appearance: none; cursor: pointer; width: auto; min-width: min(100%, 220px); max-width: 100%;
  padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2313241F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
select.in.sm { min-width: 0; padding: 6px 28px 6px 10px; background-position: right 9px center; font-size: 14px; }
select.in::-ms-expand { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 17px; height: 17px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--brand); } .switch input:checked + i::after { transform: translateX(18px); }
.seg { display: inline-flex; background: var(--paper2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.panel.flat { box-shadow: none; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--paper2); }
.badge.ok { background: #DDEFE3; color: var(--ok); } .badge.warn { background: #F7E8CF; color: var(--warn); } .badge.bad { background: #F6DAD5; color: var(--bad); } .badge.red { background: var(--stamp); color: #fff; }
hr.sep { border: 0; border-top: 1px dashed var(--line); margin: 18px 0; }

/* ---------- Start ---------- */
.hub { max-width: 1080px; margin: 0 auto; padding: 28px 16px 60px; }
.hub-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 24px; text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; margin-bottom: 48px; }
.hero h1 em { font-style: italic; color: var(--stamp); }
[data-offer]:empty, .f[hidden] { display: none; }
.offerbox { margin-top: 18px; padding: 14px 16px; max-width: 520px; border-radius: var(--r-sm); background: #FBEDE3; border: 1px solid #F2C9B5; }
.panel .offerbox { margin-top: 0; max-width: none; }
.offerbox p { margin: 8px 0 0; } .offerbox p.small { margin-top: 6px; }
.offer-n { margin-top: 6px; } .offer-n strong { font-size: 30px; line-height: 1; color: var(--stamp); }
.offer-bar { height: 8px; margin-top: 8px; border-radius: 99px; background: #F2D9CB; overflow: hidden; } .offer-bar i { display: block; height: 100%; background: var(--stamp); }
.hero p.lead { font-size: 18px; color: var(--ink2); max-width: 520px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.role { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 20px; cursor: pointer; transition: transform .12s, border-color .12s; text-decoration: none; display: block; }
.role:hover { transform: translateY(-3px); border-color: var(--ink); }
.role .ri { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 12px; background: var(--paper2); }
.role h3 { margin-bottom: 4px; }
.better { margin-top: 48px; }
.better ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.better li { padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255,253,248,.7); border: 1px dashed var(--line); font-size: 14px; }
.better li b { display: block; }

/* ---------- Die Karte (Aufbau wie in Apple Wallet, siehe card.js) ---------- */
.passbox { width: 100%; max-width: 375px; margin-inline: auto; }
.pass { text-align: start; --c: var(--brand); --a: var(--stamp); --t: #FFFDF8; width: 100%; border-radius: 16px; overflow: hidden; background: var(--c); color: var(--t);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Segoe UI', sans-serif; box-shadow: 0 24px 40px -24px rgba(19,36,31,.6), inset 0 0 0 1px rgba(128,128,128,.2); }
.pass-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pass-logo { width: 50px; height: 50px; border-radius: 50%; background: color-mix(in srgb, var(--t) 16%, var(--c)); display: grid; place-items: center; font-size: 26px; overflow: hidden; flex: none; }
.pass-logo img { width: 70%; height: 70%; object-fit: contain; }
.pass-logo.art { background: none; }
.pass-logo.art img { width: 100%; height: 100%; }
.pass-name { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pass-count { flex: none; text-align: end; }
.pass-count, .pass-info div { font-size: 11px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.pass-count b, .pass-info b { display: block; margin-top: 2px; letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.pass-row { aspect-ratio: 375 / 144; }
.pass-row.hero { aspect-ratio: 1032 / 812; }
.pass-row img, .pass-row svg { display: block; width: 100%; height: 100%; }
.pass-row.fresh { animation: thump .55s cubic-bezier(.2,1.3,.4,1); }
@keyframes thump { 0% { transform: scale(1.12); opacity: .2; } 60% { transform: scale(.98); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pass-row.fresh { animation: none; } }
.pass-info { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.pass-info div { min-width: 0; }
.pass-info div:last-child:not(:first-child) { flex: none; text-align: end; }
.pass-qr { width: max-content; margin: 18px auto 16px; padding: 8px 8px 6px; border-radius: 8px; background: #fff; color: #13241F; text-align: center; font-size: 14px; }
.pass-qr .qr { padding: 0; border-radius: 0; margin: 0 auto 4px; }
.pass.google { border-radius: 24px; }
.pass.google .pass-head { border-bottom: 1px solid color-mix(in srgb, var(--t) 22%, transparent); }
.pass-under { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.pass-ready { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--gold); color: var(--ink); }
.qr { width: 84px; height: 84px; flex: none; background: #fff; border-radius: 8px; padding: 5px; display: grid; place-items: center; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.qr .fallback { font-size: 10px; text-align: center; color: var(--muted); }
.progress { height: 6px; background: rgba(255,255,255,.18); border-radius: 99px; margin: 0 20px 14px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--a); border-radius: 99px; transition: width .5s; }
.hist.undone .grow > span:first-child { text-decoration: line-through; opacity: .6; }

/* ---------- Inhaber-Layout ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: var(--paper); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side .logo { color: var(--paper); margin: 4px 8px 22px; font-size: 22px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: rgba(243,238,227,.75); font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.side nav a:hover { background: rgba(255,255,255,.06); color: var(--paper); }
.side nav a.on { background: var(--paper); color: var(--ink); }
.side nav .grp { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .45; margin: 16px 12px 6px; }
.side .shopname { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 13px; }
.main { padding: 28px clamp(16px, 3vw, 40px) 80px; max-width: 1180px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.tabbar { display: none; }
.pagefoot { margin-top: 48px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: center; font-size: 13px; color: var(--muted); }
.pagefoot a { color: inherit; }

/* KPIs */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--f-display); font-size: clamp(24px, 7vw, 34px); font-weight: 700; line-height: 1.1; margin: 4px 0 2px; }
.delta { font-size: 12px; font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--brand); } .chart .bar.today { fill: var(--stamp); } .chart text { font-size: 10px; fill: var(--muted); font-family: var(--f-ui); }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.feed li:last-child { border: 0; }
.feed .fi { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper2); flex: none; font-size: 14px; }
.hbar { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 7px 0; }
.hbar .lab { width: 150px; flex: none; } .hbar .track { flex: 1; height: 10px; border-radius: 99px; background: var(--paper2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); } .hbar .num { width: 36px; text-align: right; font-weight: 700; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px dashed var(--line); }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--paper); }
.tbl-wrap { overflow-x: auto; }
.page-head > .row, .page-head .f { min-width: 0 !important; max-width: 100%; } .page-head select { width: 100%; }
.bonrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }

/* Telefon-Vorschau */
.phone { width: 300px; max-width: 100%; border-radius: 40px; background: #0D0D0D; padding: 12px; box-shadow: var(--shadow); margin: 0 auto; }
.phone-in { border-radius: 30px; overflow: hidden; background: var(--paper); min-height: 520px; position: relative; }
.lock { background: linear-gradient(160deg, #2B4B41, #13241F 60%, #3A2620); color: #fff; padding: 40px 14px 20px; min-height: 520px; text-align: center; }
.lock .time { font-size: 64px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.notif { text-align: left; background: rgba(255,255,255,.2); backdrop-filter: blur(10px); border-radius: 16px; padding: 10px 12px; margin-top: 24px; font-size: 13px; }
.notif b { font-size: 13px; }

/* Team-Ansicht */
.team { max-width: 520px; margin: 0 auto; padding: 18px 16px 120px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 20px auto; }
.pinpad button { aspect-ratio: 1.3; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); font-size: 24px; font-weight: 600; cursor: pointer; }
.pinpad button:active { background: var(--paper2); }
.pindots { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); } .pindots i.on { background: var(--ink); }
.scanbox { position: relative; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 4/3; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; }
.scanbox::after { content: ''; position: absolute; inset: 18%; border: 3px solid var(--stamp); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.counter { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0; }
.counter button { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); font-size: 26px; cursor: pointer; }
.counter .n { font-family: var(--f-display); font-size: 56px; font-weight: 700; min-width: 70px; text-align: center; }
.banner { padding: 10px 14px; border-radius: var(--r-sm); background: var(--stamp); color: #fff; font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.banner.gold { background: var(--gold); color: var(--ink); }

/* Gast-Ansicht */
.guest { max-width: 440px; margin: 0 auto; padding: 18px 16px 60px; }
.guest .pass { margin: 0 auto; }
.msg { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; font-size: 14px; }
.msg.unread { border-color: var(--stamp); }
.msg time { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Socials / Shop öffentlich */
.public { max-width: 460px; margin: 0 auto; padding: 28px 16px 60px; }
.linkbtn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; text-decoration: none; margin-bottom: 10px; transition: transform .1s; }
.linkbtn:hover { transform: translateY(-2px); border-color: var(--ink); }
.linkbtn .li { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--paper2); flex: none; }
.prod { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.prod .pe { width: 52px; height: 52px; border-radius: 14px; background: var(--paper2); display: grid; place-items: center; font-size: 26px; flex: none; }
.prod .pp { margin-left: auto; font-weight: 700; white-space: nowrap; }
.cattabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; position: sticky; top: 0; background: var(--paper); z-index: 2; padding-top: 6px; }

/* Aufsteller (Druck) */
/* Alle Maße relativ zur Aushang-Breite (cqw), damit A6/A5/A4 gleich aussehen und alles auf die Farbfläche passt */
.tent-wrap { container-type: inline-size; width: 105mm; max-width: 100%; margin: 0 auto; }
.tent-wrap.a5 { width: 148mm; } .tent-wrap.a4 { width: 190mm; }
.tent { width: 100%; aspect-ratio: 105 / 148; background: var(--c, var(--brand)); color: #fff; border-radius: 5cqw; padding: 8cqw 7cqw; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw; box-shadow: var(--shadow); }
.tent .qr { width: 52cqw !important; height: 52cqw !important; padding: 3cqw; border-radius: 4cqw; }
.tent h2 { font-size: 9cqw; line-height: 1.1; color: #fff; margin: 0; overflow-wrap: anywhere; }
.tent .t-logo { width: 15cqw; height: 15cqw; border-radius: 4cqw; object-fit: cover; }
.tent .t-emoji { font-size: 12cqw; line-height: 1; }
.tent .t-sub { font-size: 4.4cqw; opacity: .9; }
.tent .t-call { font-family: var(--f-display); font-size: 6.4cqw; }
.tent .t-rw { font-size: 3.8cqw; opacity: .85; }
@media print {
  body { background: #fff; } .side, .tabbar, .page-head .btn, .no-print, #toasts { display: none !important; }
  .shell { display: block; } .main { padding: 0; } .tent { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Modal & Toast */
.modal-bg { position: fixed; inset: 0; background: rgba(19,36,31,.45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 22px; padding: 22px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); animation: pop .18s; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; animation: pop .2s; width: 100%; }
.toast button { margin-left: auto; background: transparent; border: 1.5px solid rgba(255,255,255,.4); color: inherit; border-radius: 99px; padding: 4px 12px; cursor: pointer; font-weight: 700; }
.confetti { position: fixed; top: -10px; width: 9px; height: 14px; z-index: 70; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* Erklärtexte neben Feldern und Schaltern */
.hint { font-size: 12.5px; line-height: 1.45; color: var(--muted); font-weight: 400; margin: 5px 0 0; }
.hint b { color: var(--ink2); font-weight: 600; }
label.f .hint { margin-top: 6px; }
.opt { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.opt:last-child { border: 0; }
.opt .t { font-weight: 600; font-size: 14px; }
.staffgrid { columns: 2 320px; column-gap: 14px; }
.staffgrid > .staffcard { break-inside: avoid; margin-bottom: 14px; }
/* Kacheln unterschiedlicher Höhe lückenlos in Spalten (Übersicht, Einstellungen) */
.masonry { columns: 2 340px; column-gap: 14px; }
/* Einstellungen: zwei feste Spalten, „Deine Daten“ unten über die volle Breite */
.setgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; align-items: start; }
.setcol { display: grid; gap: 14px; min-width: 0; }
.datagrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: start; }
.datagrid .btn { white-space: normal; text-align: center; min-height: 48px; line-height: 1.2; }
.masonry > * { break-inside: avoid; margin: 0 0 14px; display: block; width: 100%; }
.staffcard { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--card); }
.staffcard .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.staffcard .stats div { background: var(--paper); border-radius: 10px; padding: 8px; font-size: 11px; color: var(--muted); }
.staffcard .stats b { display: block; font-size: 18px; color: var(--ink); font-family: var(--f-display); }
.alert-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.alert-row.seen { opacity: .5; }
.alert-row .ai { width: 34px; height: 34px; border-radius: 10px; background: #F7E8CF; display: grid; place-items: center; flex: none; }
.alertbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-sm); background: #F7E8CF; border: 1px solid #EBCB94; margin-bottom: 14px; font-weight: 600; text-decoration: none; }
.empty { text-align: center; padding: 30px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2.5px var(--ink); }
/* eigener Farbwähler: rund wie die Farbtupfer, mit Regenbogen-Rand als Hinweis */
input[type=color] { -webkit-appearance: none; appearance: none; width: 34px; height: 34px; padding: 0; border: 3px solid var(--card); border-radius: 50%;
  cursor: pointer; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); box-shadow: 0 0 0 1.5px var(--line); }
input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
/* Zeilen wie „Bonus für beide [1] Stempel“: Text bleibt neben dem Feld */
label.f.row > span { display: inline; margin: 0; }
/* Code-Felder: Eingabe in Großbuchstaben, Platzhalter normal lesbar */
input[style*="uppercase"]::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--f-ui); }
.auto { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.auto:last-child { border: 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 200px 1fr; }
  .side { padding: 16px 10px; }
  .hbar .lab { width: 110px; }
}

/* Stempel-Bons: A4-Bogen mit 24 Zetteln zum Ausschneiden */
.bongrid { display: grid; grid-template-columns: repeat(3, 1fr); width: 210mm; max-width: 100%; margin: 0 auto; background: #fff; }
.bon { display: flex; gap: 3mm; align-items: center; padding: 3mm 3.5mm; height: 37mm; border: 1px dashed #bbb; color: var(--ink); background: #fff; overflow: hidden; }
.bon-l .qr { width: 26mm !important; height: 26mm !important; padding: 0; border-radius: 0; }
.bon-r { min-width: 0; font-size: 10px; line-height: 1.3; }
.bon-r b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bon-n { font-family: var(--f-display); font-size: 17px; font-weight: 700; color: var(--c, var(--brand)); margin: 2px 0; }
.bon-t { color: var(--muted); }
.bon-c { font-family: ui-monospace, Menlo, monospace; font-size: 9px; letter-spacing: .08em; margin-top: 2px; color: var(--muted); }
@media print { .bonsheet { background: #fff; } .bongrid { width: 100%; } .bon { -webkit-print-color-adjust: exact; print-color-adjust: exact; } @page { size: A4; margin: 6mm; } }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,253,248,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar[hidden] { display: none; }
.topbar .tb-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .logo { font-size: 20px; flex: none; }
.topbar .logo img { width: 30px; height: 30px; }
.topbar nav { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar .tl { font-weight: 600; font-size: 14px; text-decoration: none; padding: 7px 10px; border-radius: 9px; white-space: nowrap; color: var(--ink); }
.topbar .tl:hover, .topbar .tl.on { background: var(--paper2); }
.topbar .tl-label { font-size: 12px; color: var(--ink2); opacity: .7; white-space: nowrap; }
.topbar .tl-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: none; }
.topbar .btn.sm { white-space: nowrap; }
@media print { .topbar { display: none !important; } }

/* ---------- Fußzeile immer ganz unten ---------- */
#app > div:has(> .sitefoot) { display: flex; flex-direction: column; min-height: calc(100vh - var(--tb, 0px)); min-height: calc(100dvh - var(--tb, 0px)); }
.sitefoot { margin-top: auto !important; padding-top: 32px; }
.main { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.main > #main { margin-bottom: 48px; }
.main > .pagefoot { margin-top: auto; }

/* ---------- Demo-Hinweis im Inhaber-Bereich ---------- */
.demobar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #FBEDE3; border: 1px solid #F2C9B5; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }

@media print { .grid.g2:has(.tent-wrap) { display: block; } .tent-wrap { margin: 0 auto; } @page { size: A4; margin: 10mm; } }

.bonprev { grid-template-columns: 1fr; width: 100%; border-radius: 10px; overflow: hidden; }
.bon.muster { position: relative; }
.bon.muster::after { content: 'MUSTER'; position: absolute; right: 6px; top: 4px; font-size: 9px; font-weight: 800; letter-spacing: .12em; color: var(--stamp); opacity: .8; }

/* Inhaber-Bereich unter der Kopfzeile */
.side { top: var(--tb, 0px); height: calc(100vh - var(--tb, 0px)); }
.shell { min-height: calc(100vh - var(--tb, 0px)); }
.main { min-height: calc(100vh - var(--tb, 0px)); }
.side nav { margin-top: 6px; }

/* Stempeln-Knopf mittig in der Kopfzeile */
.topbar .tb-in { display: grid; grid-template-columns: 1fr auto 1fr; }
.topbar .tb-in > nav { justify-self: end; }
.topbar .tb-mid { justify-self: center; }
.topbar .tb-stamp { padding: 9px 20px; font-size: 15px; white-space: nowrap; box-shadow: 0 2px 8px rgba(228,87,61,.25); }

/* Handy: Logo oben mittig, darunter alle Knöpfe gleich breit nebeneinander */
@media (max-width: 600px) {
  .topbar .tb-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px 12px 10px; }
  .topbar .logo { width: 100%; justify-content: center; font-size: 18px; }
  .topbar .logo img { width: 26px; height: 26px; }
  .topbar .tb-mid, .topbar .tb-in > nav { display: contents; }
  .topbar .tb-mid:empty { display: none; }
  .topbar .tb-stamp, .topbar .tb-in > nav > .btn, .topbar .tb-in > nav > .tl, .topbar .tb-in > nav > .badge {
    flex: 1 1 0; min-width: 0; max-width: 200px; justify-content: center; text-align: center; padding: 9px 6px; font-size: 13px; line-height: 1.15; white-space: normal; }
  .topbar .tb-in > nav > .tl { border: 1.5px solid var(--line); border-radius: 999px; display: flex; align-items: center; }
}

/* Handy-Menü (nur Smartphones): drei Balken oben links öffnen die Seitenleiste von links */
.tb-menu, .side-head, .side-shade { display: none; }
@media (max-width: 600px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-bottom: 32px; }
  .topbar .tb-in { position: relative; }
  .tb-menu { display: grid; gap: 4px; align-content: center; justify-items: center; position: absolute; left: 12px; top: 8px; width: 40px; height: 36px;
    border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; padding: 0; z-index: 2; }
  .tb-menu i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
  body.menu-open .side { display: flex; position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(290px, 82vw); z-index: 70;
    box-shadow: 8px 0 30px rgba(0,0,0,.25); animation: side-in .18s ease-out; }
  body.menu-open .side-shade { display: block; position: fixed; inset: 0; background: rgba(19,36,31,.45); z-index: 65; }
  body.menu-open { overflow: hidden; }
  .side-head { display: flex; align-items: center; justify-content: space-between; margin: 0 8px 8px; font-size: 16px; }
  .side-x { background: none; border: 0; color: var(--paper); font-size: 20px; cursor: pointer; padding: 6px; }
}
@keyframes side-in { from { transform: translateX(-100%); } to { transform: none; } }

.only-sm { display: none !important; }
@media (max-width: 600px) { .side nav a.only-sm { display: flex !important; } }
/* Handy: Zeile 1 Logo, Zeile 2 Menü · Stempeln · (Anmelden/Registrieren bzw. Abmelden) – alle gleich hoch */
@media (max-width: 600px) {
  .topbar .tb-in { padding: 10px 12px 12px; row-gap: 10px; }
  .topbar .tb-in > .logo { order: 0; }
  .tb-menu { position: static; transform: none; order: 1; flex: 0 0 46px; width: 46px; height: auto; min-height: 40px; align-self: stretch; border-radius: 999px; }
  .topbar .tb-stamp { order: 2; }
  .topbar .tb-in > nav > * { order: 3; }
  .topbar .tb-stamp, .topbar .tb-in > nav > .btn, .topbar .tb-in > nav > .tl { min-height: 40px; }
  .topbar .hide-sm { display: none !important; }
}

/* Als App speichern */
.a2hs { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 16px; box-shadow: var(--shadow); }
.a2hs-i img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.a2hs .small { color: var(--ink2); }
.a2hs-x { background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; padding: 6px; }
.a2hs-steps { margin: 6px 0 0; padding-left: 20px; font-size: 14px; } .a2hs-steps li { margin-bottom: 6px; }
.a2hs-share { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--paper2); color: #0A84FF; vertical-align: middle; }
@media (max-width: 420px) { .a2hs { flex-wrap: wrap; } .a2hs .grow { flex: 1 1 60%; } }
/* Ziehen zum Aktualisieren (in der gespeicherten App) */
.pull { position: fixed; top: calc(var(--tb, 0px) + 4px); left: 50%; transform: translate(-50%, 0); z-index: 80; width: 38px; height: 38px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 20px; color: var(--ink); transition: transform .05s; pointer-events: none; }
.pull.spin { animation: pullspin .6s linear infinite; }
@keyframes pullspin { to { transform: translate(-50%, 70px) rotate(360deg); } }
/* In der gespeicherten App: Platz für Statusleiste/Notch */
@media (display-mode: standalone) { .topbar { padding-top: env(safe-area-inset-top); } body { overscroll-behavior-y: none; } }

/* ---------- Klapphandys, halb aufgeklappt ----------
   Browser melden den Knick über „Viewport Segments“ (Chrome auf Android-Klapphandys). Dann liegt nichts Wichtiges auf dem Knick.
   Buch-Haltung (Knick senkrecht, zwei Hälften nebeneinander): links Menü bzw. Logo, rechts der Inhalt.
   Laptop-Haltung (Knick waagerecht): oben anschauen, unten bedienen – Fenster und Hinweise erscheinen in der unteren Hälfte. */
@media (horizontal-viewport-segments: 2) {
  :root { --seg-l: env(viewport-segment-width 0 0); --seg-r: env(viewport-segment-width 1 0);
          --fold: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); }
  .shell { grid-template-columns: var(--seg-l) var(--seg-r); column-gap: var(--fold); }
  .side { display: flex; position: sticky; width: auto; box-shadow: none; animation: none; }
  .side-head, .side-shade, .tb-menu { display: none !important; }
  .topbar .tb-in { display: grid; grid-template-columns: var(--seg-l) 1fr auto; column-gap: var(--fold); max-width: none; padding-left: 16px; }
  .topbar .tb-in > nav, .topbar .tb-mid { display: flex; }
  .topbar .tb-mid { justify-self: start; }
  .topbar .logo { width: auto; justify-content: flex-start; }
  .team, .guest { margin-left: env(viewport-segment-left 1 0); margin-right: 0; max-width: calc(var(--seg-r) - 0px); }
  .hub { max-width: none; padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: calc(var(--seg-l) - 32px) calc(var(--seg-r) - 32px); column-gap: calc(var(--fold) + 32px); }
  .modal-bg { justify-items: end; padding-left: env(viewport-segment-left 1 0); }
}
@media (vertical-viewport-segments: 2) {
  :root { --seg-top-end: env(viewport-segment-bottom 0 0); --seg-bot-start: env(viewport-segment-top 0 1); }
  .modal-bg { align-items: end; padding-top: calc(var(--seg-bot-start) + 8px); }
  .modal { max-height: calc(100vh - var(--seg-bot-start) - 24px); }
  #toasts { top: auto; bottom: 16px; }
  body.menu-open .side { height: var(--seg-top-end); }
}

/* Aufmerksamkeit, dezent: einzelne kurze Bewegungen in unregelmäßigen Abständen (Zeitpunkte setzt app.js) */
.tb-menu.hop.go { animation: tm-hop .7s ease-out; }
@keyframes tm-hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-4px); } 60% { transform: translateY(0); } 78% { transform: translateY(-1px); } }
.btn.wiggle.go { animation: tm-wiggle .55s ease-in-out; transform-origin: 50% 60%; }
@keyframes tm-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } 75% { transform: rotate(-.5deg); } }
body.menu-open .tb-menu { animation: none; }
@media (prefers-reduced-motion: reduce) { .tb-menu.hop.go, .btn.wiggle.go { animation: none; } }

/* Pflichtfelder bei der Registrierung */
.f .req-msg { display: none; font-size: 12.5px; font-weight: 600; color: var(--bad); margin-top: 4px; }
.f.bad .req-msg { display: block; }
.f.bad > span:first-child { color: var(--bad); }
.f.bad .in { border-color: #E9A89B; }
.check.bad > span { color: var(--bad); }
.check.bad > span a { color: inherit; }
.check.bad input { outline: 2px solid #E9A89B; outline-offset: 2px; }
.req-left { color: var(--bad); margin: -4px 0 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* Registrieren-Knopf: zeigt erst den Hinweis, dann „Konto erstellen“ – gleiche Größe, weicher Farbwechsel */
.btn.reg-go { min-height: 56px; font-size: 15px; white-space: normal; line-height: 1.25; transition: background-color .35s ease, border-color .35s ease, color .35s ease; }
.btn.reg-go:disabled { opacity: 1; background: var(--paper2); border-color: var(--paper2); color: var(--bad); }

/* Admin-Bereich ganz oben im Handy-Menü, leicht abgesetzt */
.side nav a.side-admin { background: rgba(228,87,61,.18); color: var(--paper); margin-bottom: 10px; }
.side nav a.side-admin.on { background: var(--paper); color: var(--ink); }

/* Offizieller Google-Knopf (auf schmalen Handys die kleine Fassung): nicht verändern, mindestens 48 px hoch, 8 px Abstand */
.gwallet { display: block; width: max-content; margin: 0 auto; padding: 8px 0; border: 0; background: none; cursor: pointer; }
.gwallet img { display: block; width: auto; height: 50px; max-width: none; }
@media (max-width: 389px) { .gwallet img { height: 55px; } }
.gwallet.apple { padding: 8px; }            /* Apple: mindestens 10 % der Höhe frei lassen */
.gwallet.apple img { height: 50px; }

/* Handy und Tablet: kein Zoom in der App (index.html). Die Rechtstexte bleiben zoombar, sie laden app.js nicht.
   Felder haben mindestens 16 px, sonst zoomt das iPhone beim Antippen von selbst hinein. */
@media (any-pointer: coarse) {
  html:has(#app), html:has(#app) body, html:has(#app) body * { touch-action: pan-x pan-y; }
  html:has(#app) input[type=range] { touch-action: none; }
  input, textarea, select, .in, select.in, select.in.sm, textarea.in { font-size: max(16px, 1em); }
}

/* Wortfilter und Rechtshinweis */
.wordwarn { color: #A3271C; font-size: 14px; font-weight: 600; margin: 6px 0; }
[aria-invalid="true"] { border-color: #A3271C !important; }
.legalbox { margin-bottom: 14px; border: 1px solid #EBCB94; }
