@font-face { font-family: 'Null'; src: url('/null.otf') format('opentype'); font-display: swap; }

/* My NLS – Tinte (#171616) auf Creme (#FDF8F8), im Dunkeln umgekehrt. Sand als einziger Zusatzton. */
:root {
  --bg: #F6EFED; --surface: #FDF8F8; --surface2: #EFE6E2; --line: rgba(23,22,22,.10);
  --ink: #171616; --text: #171616; --muted: rgba(23,22,22,.62); --on-ink: #FDF8F8;
  --sand: #8A6F5A; --ok: #1B7A37; --ok-bg: rgba(48,209,88,.14); --warn: #8A5300; --warn-bg: rgba(255,159,10,.16); --bad: #C0392B;
  --shadow: 0 1px 2px rgba(23,22,22,.06), 0 12px 32px rgba(23,22,22,.08);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171616; --surface: #221E1D; --surface2: #2B2624; --line: rgba(253,248,248,.10);
    --ink: #FDF8F8; --text: #FDF8F8; --muted: rgba(253,248,248,.62); --on-ink: #171616;
    --sand: #C9AE98; --ok: #4FE07A; --ok-bg: rgba(48,209,88,.16); --warn: #FFC15C; --warn-bg: rgba(255,159,10,.16); --bad: #FF8A8E;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 36px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--on-ink); }
[hidden] { display: none !important; }
main { max-width: 560px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px calc(104px + env(safe-area-inset-bottom)); }
.center { min-height: 80vh; display: grid; place-items: center; }
.center-text { text-align: center; }
h1, h2, h3 { margin: 0; }
h2 { font-size: 20px; font-weight: 700; }
.view-title { font-family: 'Null', sans-serif; font-weight: 400; font-size: 30px; margin: 26px 0 12px; }
.view-title:first-child { margin-top: 8px; }
.muted { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); margin: 0; }
.label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 6px 2px; }
.gap { margin-top: 16px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.error { color: var(--bad); font-weight: 600; margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Wortmarke in der Hausschrift */
.wordmark { font-family: 'Null', sans-serif; font-weight: 400; font-size: clamp(52px, 16vw, 72px); line-height: .95; letter-spacing: 0; }
.wordmark.small { font-size: 34px; line-height: 1.05; }

/* Felder und Knöpfe */
input, select { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; outline: none; transition: border-color .2s; }
input:focus, select:focus { border-color: var(--ink); }
input::placeholder { color: var(--muted); }
.btn { border: 0; border-radius: 999px; min-height: 52px; padding: 0 22px; font: inherit; font-weight: 650; width: 100%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s cubic-bezier(.2,.8,.2,1), opacity .2s, background .2s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.secondary { background: var(--surface2); color: var(--text); }
.btn.quiet { background: none; color: var(--muted); margin-top: 18px; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn.small { width: auto; min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn:disabled { opacity: .35; cursor: default; }
.link { background: none; border: 0; padding: 10px 2px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn.wallet { background: #000; color: #fff; margin: 14px 0 8px; }
@media (prefers-color-scheme: dark) { .btn.wallet { border: 1px solid rgba(255,255,255,.25); } }
.wallet-icon { width: 26px; height: 19px; border-radius: 4px; background: linear-gradient(180deg, #2d9bf0 0 25%, #f5b62c 25% 50%, #fb5e46 50% 75%, #3bc275 75%); }

/* Symbole (Masken, eine Strichstärke) */
.i { width: 22px; height: 22px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.i-face { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 8V6a2 2 0 0 1 2-2h2M16 4h2a2 2 0 0 1 2 2v2M20 16v2a2 2 0 0 1-2 2h-2M8 20H6a2 2 0 0 1-2-2v-2M9 9v1.5M15 9v1.5M12 9v4h-1M9.5 16a3.5 3.5 0 0 0 5 0'/%3E%3C/svg%3E"); }
.i-mail { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); }
.i-card { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='M7 15h4M3 10h18'/%3E%3C/svg%3E"); }
.i-bag { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6zM9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E"); }
.i-tool { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.i-user { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20.5c0-4 3.6-6.5 8-6.5s8 2.5 8 6.5'/%3E%3C/svg%3E"); }

/* Anmelden */
.auth-screen { min-height: calc(100vh - 140px); display: grid; align-items: center; }
.auth { width: 100%; max-width: 400px; margin: 0 auto; display: grid; gap: 22px; }
.auth-lead { margin: -8px 0 6px; color: var(--muted); font-size: 17px; max-width: 32ch; }
.stack { display: grid; gap: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sent { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.sent .i { margin-top: 2px; }
.sent strong { display: block; }
.sent span:not(.i) { color: var(--muted); font-size: 15px; word-break: break-word; }
.code-boxes { position: relative; }
.code-boxes input { position: absolute; inset: 0; opacity: 0; font-size: 16px; caret-color: transparent; z-index: 1; }
.boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.boxes span { aspect-ratio: .82; display: grid; place-items: center; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font: 400 30px 'Null', sans-serif; transition: border-color .15s, transform .15s; }
.boxes span.on { border-color: var(--ink); }
.boxes span.filled { transform: translateY(-1px); }
.code-boxes.shake .boxes { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.row-links { display: flex; justify-content: space-between; gap: 12px; }

/* Face ID anbieten */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: grid; align-items: end; background: rgba(23,22,22,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s ease-out; }
.sheet { width: min(560px, 100%); margin: 0 auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 28px 22px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 12px; justify-items: center; text-align: center; animation: rise .32s cubic-bezier(.2,.9,.25,1); }
.sheet h2 { font-size: 24px; font-weight: 750; letter-spacing: -.01em; }   /* „Null“ hat kein sauberes Fragezeichen */
.sheet p { margin: 0 0 6px; color: var(--muted); max-width: 34ch; }
.big-icon { width: 54px; height: 54px; }
.sheet .btn.quiet { margin-top: 0; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Kopf */
.top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }

/* Kundenkarte: wie eine echte Karte, in Tinte; die Stufe zeigt sich als Farbe des Rands */
.member { position: relative; border-radius: 22px; padding: 18px 18px 20px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow);
  outline: 3px solid var(--tier, transparent); outline-offset: -3px; }
.member.bronze { --tier: #A86F4C; } .member.silber { --tier: #B9BEC6; } .member.gold { --tier: #D8B25A; }
.member-top, .member-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.member-foot { align-items: flex-end; }
.member-brand { font-family: 'Null', sans-serif; font-size: 22px; line-height: 1; }
.member .label { color: inherit; opacity: .62; margin: 0 0 2px; font-size: 13px; }
.m-name { display: block; font-size: 18px; }
.member .mono { font-size: 14px; opacity: .72; }
.right { text-align: right; }
.m-points { display: block; font-family: 'Null', sans-serif; font-weight: 400; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.tier-badge { font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 99px; background: var(--tier, rgba(255,255,255,.18)); color: #171616; }
.qr-wrap { margin: 18px auto; width: min(66vw, 240px); aspect-ratio: 1; background: #fff; border-radius: 14px; display: grid; place-items: center; padding: 10px; }
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.qr-fallback { color: #171616; font: 700 20px ui-monospace, Menlo, monospace; text-align: center; }

/* Blöcke */
.block { background: var(--surface); border-radius: 20px; padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.block h2 { margin-bottom: 10px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.block-head h2 { margin: 0; }
.block p { margin: 6px 0 0; }
.progress { height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 14px 0 16px; }
.progress div { height: 100%; background: var(--ink); width: 0; border-radius: inherit; transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* Stufen als Strecke: Bronze – Silber – Gold, der eigene Stand markiert */
.tier-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 10px; }
.tier-step { display: grid; gap: 6px; }
.tier-step i { height: 6px; border-radius: 99px; background: var(--surface2); }
.tier-step.done i { background: var(--ink); }
.tier-step strong { font-size: 15px; }
.tier-step small { color: var(--muted); font-size: 13px; }
.tier-step.on strong::after { content: ' · du'; color: var(--sand); }

/* Listen */
.list { display: grid; gap: 10px; }
.item { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.item-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item small { color: var(--muted); font-size: 14px; }
.item a { color: var(--text); font-size: 15px; font-weight: 600; text-underline-offset: 3px; }
.item .btn { margin-top: 8px; }
.list.plain { gap: 0; }
.row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row small { display: block; color: var(--muted); font-size: 13px; }
.plus { color: var(--ok); font-weight: 700; font-variant-numeric: tabular-nums; } .minus { color: var(--bad); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Coupon wie ein Abriss-Zettel */
.coupon { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface2); position: relative; }
.coupon .code { font: 700 20px ui-monospace, Menlo, monospace; letter-spacing: .06em; }
.coupon small { color: var(--muted); font-size: 13px; display: block; }
.coupon .val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sys { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 800; }
.coupon button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }

.chip { display: inline-block; font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 99px; background: var(--surface2); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.off { color: var(--muted); }
.timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 10px; }
.timeline li { position: relative; display: grid; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.timeline li.last::before { background: var(--ink); }

/* Termin buchen */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.days::-webkit-scrollbar { display: none; }
.days button, .slots button { flex: 0 0 auto; font: inherit; color: var(--text); background: var(--surface2); border: 0; border-radius: 14px; cursor: pointer; transition: background .15s, color .15s; }
.days button { width: 64px; padding: 10px 0; display: grid; justify-items: center; gap: 0; scroll-snap-align: start; }
.days button span { font-size: 13px; color: var(--muted); }
.days button strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.days button small { font-size: 11px; color: var(--muted); }
.days button.on, .slots button.on { background: var(--ink); color: var(--on-ink); }
.days button.on span, .days button.on small { color: inherit; opacity: .7; }
.days button:disabled { opacity: .35; cursor: default; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slots button { min-height: 44px; font-weight: 600; font-variant-numeric: tabular-nums; }
#book .btn.primary { margin-top: 18px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv span { color: var(--muted); }
.kv strong { text-align: right; word-break: break-word; }
#pr-save, #pk-add { margin-top: 16px; }

/* Untere Leiste */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(528px, calc(100% - 24px));
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 26px; z-index: 10;
  background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--shadow); }
.tabs button { font: 600 12px -apple-system, system-ui, sans-serif; color: var(--muted); background: none; border: 0; min-height: 52px; border-radius: 20px; display: grid; gap: 3px; justify-items: center; align-content: center; cursor: pointer; transition: background .2s, color .2s; }
.tabs button.active { color: var(--on-ink); background: var(--ink); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--on-ink);
  padding: 12px 18px; border-radius: 99px; font-weight: 650; box-shadow: var(--shadow); z-index: 40; width: max-content; max-width: calc(100% - 32px); text-align: center; animation: rise .25s ease-out; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--muted); padding: 4px 2px; margin: 0; }

/* Reparatur ohne Anmeldung */
#repair-public { padding-top: 12px; display: grid; gap: 14px; }
#repair-public h2 { font-size: 22px; }

.view { animation: fade .25s ease-out; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
