/* Designsystem Log&Cheers: Stout & Bernstein, Apple-Stil (Systemschrift, Glas-Leisten, Federn) – Dunkel und Hell */
/* Schriftzug-Schrift vom eigenen Server (keine Verbindung zu Google Fonts) */
@font-face { font-family: 'Bricolage Grotesque'; src: url(/fonts/BricolageGrotesque-Bold.ttf) format('truetype'); font-weight: 600 900; font-display: swap; }
:root {
  --bg: #14100C;
  --surface: #1E1813;
  --surface2: #2A221B;
  --line: #3A3027;
  --line-strong: #5A4B3D;
  --text: #F4ECDF;
  --muted: #B3A594;
  --faint: #978979;
  --accent: #F5A524;
  --accent-text: #F5A524;
  --on-accent: #14100C;
  --safe: #6FD3BF;
  --safe-text: #6FD3BF;
  --danger: #FF8A6B;
  --chip-on-bg: #F4ECDF;
  --chip-on-fg: #14100C;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: var(--font); /* Zahlen: Systemschrift mit gleich breiten Ziffern statt Monospace */
  --brand-font: 'Bricolage Grotesque', var(--font); /* nur für den Schriftzug Log&Cheers */
  --fill: rgba(120, 120, 128, .24);
  --glass: rgba(30, 24, 19, .72);
  --glass-edge: rgba(255, 255, 255, .10);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --card-shadow: none;
  --seg-on: #4A3E33;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F7F2EA;
  --surface: #FFFFFF;
  --surface2: #EFE6D8;
  --line: #E0D3C0;
  --line-strong: #C9B9A3;
  --text: #1C1611;
  --muted: #6A5B4B;
  --faint: #6F604F;
  --accent: #F5A524;
  --accent-text: #9A5B00;
  --on-accent: #1C1611;
  --safe: #6FD3BF;
  --safe-text: #1D7A69;
  --danger: #B3381A;
  --chip-on-bg: #1C1611;
  --chip-on-fg: #F7F2EA;
  --shadow: 0 10px 30px rgba(60, 40, 10, .12);
  --fill: rgba(120, 100, 70, .12);
  --glass: rgba(255, 252, 247, .74);
  --glass-edge: rgba(255, 255, 255, .8);
  --glass-shadow: 0 10px 30px rgba(60, 40, 10, .12);
  --card-shadow: 0 1px 2px rgba(60, 40, 10, .04), 0 6px 20px rgba(60, 40, 10, .05);
  --seg-on: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F7F2EA;
    --surface: #FFFFFF;
    --surface2: #EFE6D8;
    --line: #E0D3C0;
    --line-strong: #C9B9A3;
    --text: #1C1611;
    --muted: #6A5B4B;
    --faint: #6F604F;
    --accent-text: #9A5B00;
    --on-accent: #1C1611;
    --safe-text: #1D7A69;
    --danger: #B3381A;
    --chip-on-bg: #1C1611;
    --chip-on-fg: #F7F2EA;
    --shadow: 0 10px 30px rgba(60, 40, 10, .12);
    --fill: rgba(120, 100, 70, .12);
    --glass: rgba(255, 252, 247, .74);
    --glass-edge: rgba(255, 255, 255, .8);
    --glass-shadow: 0 10px 30px rgba(60, 40, 10, .12);
    --card-shadow: 0 1px 2px rgba(60, 40, 10, .04), 0 6px 20px rgba(60, 40, 10, .05);
    --seg-on: #FFFFFF;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
#view { padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 112px); display: flex; flex-direction: column; gap: 16px; }
#view.no-tabs { padding-bottom: calc(env(safe-area-inset-bottom) + 32px); }

h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
h3 { margin: 0; font-size: 17px; font-weight: 700; }
p { margin: 0; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--safe-text); }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--safe); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }

.card { background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card.outline { border: 1.5px solid var(--accent); }
.card.flat { background: transparent; padding: 0; }
.divider { border-top: 1px solid var(--surface2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 16px; text-align: center; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.big { min-height: 56px; font-size: 18px; font-weight: 800; width: 100%; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.soft { background: var(--surface2); color: var(--text); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: none; background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 5px; background: var(--accent); border: 2px solid var(--surface); }

.fav-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fav { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 8px 8px; overflow: hidden; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--accent-text); text-align: left; }
.fav b { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
.fav[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: none; background: var(--surface2); color: var(--text); font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); font-weight: 700; }
.size { min-height: 40px; min-width: 60px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-weight: 600; font-size: 14px; }
.size[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-text); background: var(--surface2); }
.segmented { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; gap: 4px; }
.card .segmented { background: var(--bg); }
.segmented button { flex: 1; min-height: 40px; border: none; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 15px; }
.segmented button[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-fg); }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cat { min-height: 76px; border: none; border-radius: 16px; background: var(--surface); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 13px; }
.cat[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input, input[type=text], input[type=password], input[type=email], input[type=datetime-local], input[type=number], input[type=search], input[type=tel], textarea, select {
  min-height: 48px; width: 100%; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); padding: 0 12px; font-size: 16px;
}
textarea { padding: 12px; min-height: 80px; resize: vertical; }
.card input, .card textarea, .card select { background: var(--bg); }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input.mono, input.mono { font-family: var(--mono); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.checkbox input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; background: transparent; border: none; border-top: 1px solid var(--surface2); padding: 6px 0; text-align: left; font-size: 15px; width: 100%; color: var(--text); }
.toggle .track { width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex-shrink: 0; transition: background .15s; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #F4ECDF; transition: left .15s; }
.toggle[aria-pressed="true"] .track { background: var(--accent); }
.toggle[aria-pressed="true"] .track::after { left: 23px; }

.avatar { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); width: 40px; height: 40px; border-radius: 20px; color: #14100C; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 3px solid var(--surface); }
.avatar.xl { width: 128px; height: 128px; border-radius: 64px; font-size: 52px; }
.avatar.lg { width: 72px; height: 72px; border-radius: 36px; font-size: 30px; }
.avatar.md { width: 48px; height: 48px; border-radius: 24px; font-size: 18px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 16px; font-size: 14px; border-width: 0; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -12px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--mono); font-size: 20px; font-weight: 600; }
.stat span { font-size: 12px; color: var(--muted); }

.offer { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--surface2); }
.offer .thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--surface2); object-fit: contain; flex-shrink: 0; }
.price { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--accent-text); text-align: right; }

.feed-item { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.feed-item .head { padding: 16px 16px 12px; display: flex; align-items: center; gap: 12px; }
.feed-item .photo { width: 100%; max-height: 420px; object-fit: cover; background: var(--surface2); }
.feed-item .foot { padding: 10px 16px 14px; display: flex; align-items: center; gap: 10px; }
.react-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px 0; }
.react-chip, .react-add { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 10px; border-radius: 17px; border: 1.5px solid var(--line-strong); background: transparent; font-size: 17px; line-height: 1; }
.react-chip span { font-size: 13px; font-weight: 700; color: var(--muted); }
.react-chip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.react-chip[aria-pressed="true"] span { color: var(--accent-text); }
.react-add { color: var(--muted); font-size: 15px; }
.react-pick { display: flex; gap: 2px; padding: 4px; border-radius: 22px; background: var(--surface2); width: 100%; justify-content: space-between; }
.react-pick button { font-size: 26px; line-height: 1; width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; transition: transform .12s; }
.react-pick button:active { transform: scale(1.25); }
.react-pick button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.cheers[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.list-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--surface2); }

.bac-value { font-family: var(--mono); font-size: 56px; font-weight: 600; line-height: 1; color: var(--accent-text); }
.drive { display: flex; align-items: center; gap: 12px; }
.drive .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--safe); color: #14100C; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chart-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.notice { background: var(--surface2); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }

.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 16px; overflow: hidden; }
.photos img { aspect-ratio: 1; object-fit: cover; width: 100%; }

.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--muted); background: none; border: none; }
.badge .disc { width: 56px; height: 56px; border-radius: 28px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #14100C; }
.badge.locked .disc { background: transparent; border: 2px dashed var(--line-strong); color: var(--faint); }

/* Schwebende Glas-Leiste (Apple-Stil): vier Bereiche in einer Kapsel, „+“ als eigener Knopf daneben */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 16px calc(max(env(safe-area-inset-bottom), 16px) - 4px); pointer-events: none; }
.tabbar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; top: -36px; background: linear-gradient(color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 82%); pointer-events: none; }
.tabbar > div { position: relative; max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.tabbar nav { flex: 1; min-width: 0; height: 62px; padding: 4px; border-radius: 31px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow); pointer-events: auto; }
.tabbar nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 27px; color: var(--text); font-size: 10px; font-weight: 500; letter-spacing: .01em; position: relative; min-width: 0; }
.tabbar nav a svg { width: 22px; height: 22px; }
.tabbar nav a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); font-weight: 600; }
.tabbar a.plus { flex-shrink: 0; width: 62px; height: 62px; border-radius: 31px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 26px rgba(245, 165, 36, .35); pointer-events: auto; }
.tabbar .badge-count { position: absolute; top: 4px; left: 56%; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--surface); }

/* Feste Leiste unten (Loggen, Morgen-Check …): Glas statt deckender Fläche, Inhalt scrollt sichtbar darunter */
.sticky-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-edge), 0 -6px 24px rgba(0, 0, 0, .06); border-radius: 24px 24px 0 0; padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px); }
.sticky-bottom > div { max-width: 528px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.has-sticky { padding-bottom: calc(env(safe-area-inset-bottom) + 170px) !important; }

.scanner { position: relative; border-radius: 24px; overflow: hidden; background: #0B0907; aspect-ratio: 4 / 3; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 22% 12%; border: 3px solid var(--accent); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; }
.scanner .msg { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #F4ECDF; font-size: 14px; pointer-events: none; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 100px); z-index: 50; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; max-width: min(92vw, 480px); font-weight: 600; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo span { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.tally svg { display: block; }
.skeleton { background: var(--surface); border-radius: var(--radius); height: 120px; opacity: .6; }
dialog { border: none; border-radius: 24px; background: var(--surface); color: var(--text); padding: 20px; width: min(92vw, 480px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
.notice > svg { flex-shrink: 0; }

.badge-row { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--surface2); }
.badge-row.locked .badge-tile { opacity: .45; filter: grayscale(1); }
.badge-row.locked b { color: var(--muted); }
.badge-tile { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge-tile.social { background: #DFF1E6; color: #1F6B47; }
.badge-tile.tier-bronze { background: #F5E6D3; color: #8A5A2B; }
.badge-tile.tier-silber { background: #E6E8EC; color: #4A5260; }
.badge-tile.tier-gold { background: #F8E7A8; color: #7A5B00; }
.progress { display: block; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; margin-top: 4px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* Bierkarte */
.bmap-box { height: min(56vh, 460px); border-radius: var(--radius); }
.bmap-box.small { height: 190px; }
.bmap { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: var(--surface2); cursor: grab; }
.bmap:active { cursor: grabbing; }
.bmap-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
/* Dunkelmodus: helle OSM-Karte umkehren und warm abtönen */
.bmap-dark .bmap-tiles { filter: invert(1) hue-rotate(185deg) brightness(.82) contrast(.92) saturate(.45) sepia(.15); }
.bmap-layer > * { position: absolute; left: 0; top: 0; }
.bmap-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid var(--bg); background: var(--accent); color: #14100C; font-family: var(--mono); font-weight: 600; font-size: 14px; padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.35); text-decoration: none; }
.bmap-pin.selected { border-color: var(--text); box-shadow: 0 0 0 10px rgba(245,165,36,.25); }
.bmap-pin.friend { background: var(--safe); }
.bmap-heat { border-radius: 50%; background: radial-gradient(circle, rgba(245,165,36,.7) 0%, rgba(245,165,36,.25) 45%, rgba(245,165,36,0) 70%); pointer-events: none; }
.bmap-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.bmap-zoom button { width: 44px; height: 44px; border-radius: 14px; border: none; background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.bmap-attr { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 2px 6px; border-radius: 8px; }
.bmap-attr a { color: inherit; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--line-strong); }
.state-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.state-tile { height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 600; border: 1.5px solid var(--line); color: var(--faint); }
.state-tile.on { background: var(--accent); border-color: var(--accent); color: #14100C; }

/* Trink-Pace */
.pace-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 12px; font-weight: 600; background: var(--surface2); color: var(--text); }
.pace-chip.zone-sprint { background: var(--danger); color: #14100C; }
.pace-chip.zone-tempo { background: var(--accent); color: #14100C; }
.pace-chip.zone-endurance { background: var(--safe); color: #14100C; }
.pace-chip.zone-ultra { background: var(--chip-on-bg); color: var(--chip-on-fg); }
.zone-bar.zone-sprint { background: var(--danger) !important; }
.zone-bar.zone-tempo { background: var(--accent) !important; }
.zone-bar.zone-endurance { background: var(--safe) !important; }
.zone-bar.zone-ultra { background: var(--text) !important; }
.pace-table { display: flex; flex-direction: column; }
.pace-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px 64px 64px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--surface2); font-size: 14px; }
.pace-row.head { font-size: 12px; color: var(--muted); padding-top: 0; }
.pace-row > span:not(:first-child) { text-align: right; }
.pace-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pace-dot.zone-sprint { background: var(--danger); } .pace-dot.zone-tempo { background: var(--accent); } .pace-dot.zone-endurance { background: var(--safe); } .pace-dot.zone-ultra { background: var(--text); }

/* Startanimation: Bier wird schräg eingegossen, Glas richtet sich auf, dann erscheint das Logo */
#splash { position: fixed; inset: 0; z-index: 100; background: #14100C; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .45s ease; cursor: pointer; }
#splash.done { opacity: 0; pointer-events: none; }
.no-splash #splash { display: none; }
.sp-svg { width: min(300px, 72vw); height: auto; overflow: visible; }
.sp-tag { font-family: var(--font); font-size: 18px; font-weight: 700; color: #B3A594; animation: sp-fade .5s ease-out 3.15s both; }
.sp-b { fill: none; stroke: #14100C; stroke-width: 3; }
@keyframes sp-tilt { 0% { transform: rotate(-30deg); } 55% { transform: rotate(-24deg); } 100% { transform: rotate(0deg); } }
@keyframes sp-level { 0% { transform: rotate(30deg); } 55% { transform: rotate(24deg); } 100% { transform: rotate(0deg); } }
@keyframes sp-fill { from { transform: translateY(300px); } to { transform: translateY(0); } }
@keyframes sp-wave { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes sp-foam { 0% { transform: scale(0.2); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sp-bubble { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-170px); opacity: 0; } }
@keyframes sp-logo { 0% { transform: scale(0.6) rotate(-6deg); opacity: 0; } 70% { transform: scale(1.08) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes sp-clink { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-5deg); } 60% { transform: rotate(3deg); } }
@keyframes sp-spark { 0% { opacity: 0; transform: scale(0.4); } 40% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes sp-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.sp-clink { transform-origin: 150px 360px; animation: sp-clink .5s ease-in-out 3s both; }
.sp-tilt { transform-origin: 150px 360px; animation: sp-tilt 2s cubic-bezier(.45,0,.35,1) both; }
.sp-level { transform-origin: 0 0; animation: sp-level 2s cubic-bezier(.45,0,.35,1) both; }
.sp-beer { animation: sp-fill 2s cubic-bezier(.3,.6,.35,1) both; }
.sp-wave { animation: sp-wave .8s linear infinite; }
.sp-foam { transform-box: fill-box; transform-origin: 50% 100%; animation: sp-foam .6s cubic-bezier(.3,1.6,.5,1) 1.95s both; }
.sp-b1 { animation: sp-bubble 1.6s ease-in .6s infinite; }
.sp-b2 { animation: sp-bubble 1.9s ease-in 1s infinite; }
.sp-b3 { animation: sp-bubble 1.4s ease-in 1.3s infinite; }
.sp-b4 { animation: sp-bubble 2.1s ease-in .8s infinite; }
.sp-logo { transform-box: fill-box; transform-origin: 50% 50%; animation: sp-logo .55s cubic-bezier(.3,1.5,.5,1) 2.5s both; }
.sp-spark { transform-box: fill-box; transform-origin: 50% 100%; animation: sp-spark .6s ease-out 3.05s both; }
@media (prefers-reduced-motion: reduce) {
  #splash *, #splash { animation: none !important; }
  .sp-spark, .sp-b { opacity: 0; }
}

/* Profilbild im Vollformat */
dialog.lightbox { border: 0; padding: 16px; background: transparent; max-width: 100vw; max-height: 100dvh; }
dialog.lightbox::backdrop { background: rgba(10, 8, 6, .88); }
dialog.lightbox img { width: min(92vw, 560px); height: auto; max-height: 72dvh; object-fit: contain; border-radius: 24px; display: block; cursor: zoom-out; }
img.avatar { cursor: zoom-in; }
#install-slot:empty, #push-slot:empty { display: none; }

/* Tagesbericht */
.collage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 18px; overflow: hidden; position: relative; }
.collage a { display: block; aspect-ratio: 1; }
.collage a.big { grid-column: span 2; grid-row: span 2; }
.collage.n1 a.big { grid-column: span 3; grid-row: auto; aspect-ratio: 4 / 3; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage .more { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 10px; padding: 2px 8px; font-size: 13px; }
.report-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; }

/* Ladeanzeige */
.loading { display: flex; align-items: center; gap: 12px; padding: 14px 4px; color: var(--muted); font-size: 15px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* Promille: Wert und Zeichen bleiben in einer Zeile; ‰ aus der Textschrift, kleiner */
.bac-value { white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
.bac-unit { font-family: var(--font); font-size: .5em; font-weight: 700; }
.quick-friend { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; padding: 8px 4px; border-radius: 16px; border: 1.5px solid transparent; background: transparent; color: var(--text); }
.quick-friend[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.befriend { position: absolute; right: -4px; bottom: -2px; width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--bg); background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; padding: 0; }
.befriend.done { background: var(--surface2); color: var(--muted); }
.react-who { width: 100%; font-size: 12px; color: var(--muted); line-height: 1.4; }
/* Reiergeier am Profilbild */
.av-wrap { position: relative; display: inline-flex; flex-shrink: 0; width: auto; height: auto; border: 0; background: none; padding: 0; }
.av-wrap .puke-badge { position: absolute; right: -6%; bottom: -6%; width: 46%; height: 46%; min-width: 16px; min-height: 16px; pointer-events: none; }
.walk-pin { position: absolute; left: -18px; top: -18px; padding: 2px; border-radius: 20px; background: var(--safe-text, #2E9E7A); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.walk-pin .avatar { display: flex; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--accent-text); }
.faq[open] summary::after { content: "–"; }
/* Fotoalbum im Vollbild */
dialog.gallery { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #000; color: #fff; overflow: hidden; }
dialog.gallery::backdrop { background: #000; }
.gal-stage { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.gal-track { display: flex; height: 100%; will-change: transform; }
.gal-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gal-slide img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; pointer-events: none; }
.gal-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 10px) 12px 10px 18px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.gal-close { width: 48px; height: 48px; border-radius: 24px; border: 0; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; }
.gal-nav.prev { left: 10px; }
.gal-nav.next { right: 10px; }
.gal-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 18px calc(env(safe-area-inset-bottom) + 18px); text-align: center; font-size: 15px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.gal-cap:empty { display: none; }
/* iPhone-Web-App: Wenn iOS den Layout-Bereich zu kurz meldet (Leisten „schweben“), schiebt --ios-gap sie wieder an den Rand */
.tabbar, .sticky-bottom, .toast { translate: 0 var(--ios-gap, 0px); }
/* Kein Warten auf Doppeltipp-Zoom: Antippen reagiert sofort */
a, button, label, .chip, [data-cheers] { touch-action: manipulation; }
/* „Was ist neu“: gut lesbare Schrift, auch auf kleinen Handys */
.changes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.45; }
.changes li::marker { color: var(--accent-text); }
.changes-list { gap: 18px; }
dialog.changes-dlg .changes-list { max-height: 60vh; overflow-y: auto; outline: none; padding-right: 4px; }

/* ===================== Apple-Stil (Log&Cheers) ===================== */
/* Schrift: Systemschrift (SF Pro bzw. Inter), Laufweite je nach Größe – groß enger, klein etwas weiter */
html, body { font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-size: 16px; line-height: 1.4; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.12; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.012em; line-height: 1.25; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.small { font-size: 13px; letter-spacing: 0; }
.mono, .stat b, .bac-value, .price, .pace-chip, .chart-axis, .state-tile, .size, .bmap-pin, input.mono, .input.mono { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.brand, .logo span.brand { font-family: var(--brand-font); }
.logo span { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.large-title { display: flex; flex-direction: column; gap: 2px; margin-top: -4px; }
.large-title .date { font-size: 15px; color: var(--muted); }
.bac-value { font-weight: 700; letter-spacing: -0.035em; }
.bac-unit { font-weight: 600; letter-spacing: 0; color: var(--muted); }
.stat b { font-weight: 700; letter-spacing: -0.01em; }

/* Karten mit weichem Schatten (hell), Gruppen wie in iOS */
.card, .feed-item, .stat { box-shadow: var(--card-shadow); }
.card.flat { box-shadow: none; }
.btn { font-weight: 600; letter-spacing: -0.005em; }
.btn.big { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.btn.soft, .chip, .icon-btn.soft { background: var(--fill); }
.chip { font-weight: 500; }
.chip[aria-pressed="true"] { font-weight: 600; }

/* Eingabefelder: gefüllte Flächen statt Rahmen (Höhe bleibt gleich) */
.input, input[type=text], input[type=password], input[type=email], input[type=datetime-local], input[type=number], input[type=search], input[type=tel], textarea, select { border-color: transparent; background: var(--fill); }
.card input, .card textarea, .card select { background: var(--fill); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }

/* Segment-Schalter wie in iOS: hervorgehobene Fläche hebt sich ab */
.segmented, .card .segmented { background: var(--fill); padding: 3px; gap: 2px; border-radius: 12px; }
.segmented button { border-radius: 9px; color: var(--text); font-weight: 500; transition: background-color .16s ease-out, box-shadow .16s ease-out; }
.segmented button[aria-pressed="true"] { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }

/* Schalter in iOS-Größe */
.toggle .track { width: 51px; height: 31px; border-radius: 16px; background: var(--fill); transition: background-color .2s ease-out; }
.toggle .track::after { top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #FFFFFF; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .06); transition: left .25s cubic-bezier(.3, 1.3, .5, 1); }
.toggle[aria-pressed="true"] .track::after { left: 22px; }

/* Rückmeldung schon beim Drücken (nicht erst beim Loslassen) */
.btn, .chip, .cat, .fav, .icon-btn, .size, .react-chip, .react-add, .quick-friend, .tabbar a, .badge, .cheers, .toggle, a.card { transition: transform 100ms ease-out, background-color 120ms ease-out, opacity 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .chip:active, .cat:active, .fav:active, .icon-btn:active, .size:active, .react-chip:active, .react-add:active, .quick-friend:active, .tabbar a:active, .cheers:active { transform: scale(.96); }
a.card:active { transform: scale(.985); }

/* Dialoge: erscheinen als Material (Größe + Deckkraft), Hintergrund wird abgedunkelt */
dialog { border-radius: 28px; }
dialog[open] { animation: dlg-in .28s cubic-bezier(.2, .9, .3, 1); }
dialog[open]::backdrop { animation: dlg-fade .28s ease-out; background: rgba(0, 0, 0, .45); }
@keyframes dlg-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes dlg-fade { from { opacity: 0; } to { opacity: 1; } }
.toast { border-radius: 16px; background: color-mix(in srgb, var(--text) 92%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* Sheet: Loggen schiebt sich als Karte über die Seite, die dahinter abgedunkelt nach hinten rückt */
#sheet-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); transform-origin: 50% 0; border-radius: calc(var(--sheet-p, 1) * 22px); transform: translateY(calc(var(--sheet-p, 1) * (env(safe-area-inset-top) + 4px))) scale(calc(1 - var(--sheet-p, 1) * .06)); }
#sheet-bg .sheet-bg-inner { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 16px 0; display: flex; flex-direction: column; gap: 16px; pointer-events: none; }
#sheet-scrim { position: fixed; inset: 0; z-index: 1; background: #000; opacity: calc(var(--sheet-p, 1) * .32); }
html.sheet-mode, html.sheet-mode body { overflow: hidden; height: 100%; background: #000; }
html.sheet-mode #view { position: fixed; z-index: 2; left: 50%; width: min(100%, 560px); top: calc(env(safe-area-inset-top) + 12px); bottom: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); padding-top: 22px; transform: translate(-50%, var(--sheet-y, 0px)); will-change: transform; }
html.sheet-mode #view::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-strong); }
html.sheet-mode #view .sticky-bottom { position: sticky; bottom: 0; margin: auto -16px 0; translate: none; }
html.sheet-mode #app { position: static; }

/* Start: Glas-Ebenen stoßen an, dann der Schriftzug */
.sp-grp { position: relative; width: min(300px, 72vw); aspect-ratio: 750 / 710; }
.sp-grp img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.sp-beer2 { transform-origin: 35% 95%; animation: sp-beer2 1.1s cubic-bezier(.5, 0, .25, 1) .15s both, sp-recoil-l .6s ease-out 1.25s both; }
.sp-wine2 { transform-origin: 72% 95%; animation: sp-wine2 1.1s cubic-bezier(.5, 0, .25, 1) .15s both, sp-recoil-r .6s ease-out 1.25s both; }
.sp-spark2 { transform-origin: 52% 30%; animation: sp-pop .45s cubic-bezier(.3, 1.6, .5, 1) 1.25s both; }
.sp-word { font-family: var(--brand-font); font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: #FFF8EC; line-height: 1; animation: sp-fade .5s ease-out 1.7s both; }
.sp-word span { color: #F5A524; }
@keyframes sp-beer2 { from { transform: translateX(-60vw) rotate(-24deg); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes sp-wine2 { from { transform: translateX(60vw) rotate(24deg); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes sp-recoil-l { 0%, 100% { transform: none; } 35% { transform: rotate(-5deg); } 70% { transform: rotate(1.5deg); } }
@keyframes sp-recoil-r { 0%, 100% { transform: none; } 35% { transform: rotate(5deg); } 70% { transform: rotate(-1.5deg); } }
@keyframes sp-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sp-tag { animation-delay: 2s; }

/* Barrierefreiheit: weniger Bewegung, weniger Transparenz, mehr Kontrast */
@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled), .chip:active, .cat:active, .fav:active, .icon-btn:active, .size:active, .react-chip:active, .react-add:active, .quick-friend:active, .tabbar a:active, .cheers:active, a.card:active { transform: none; opacity: .7; }
  dialog[open], dialog[open]::backdrop { animation: none; }
  .toggle .track::after { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .tabbar nav, .sticky-bottom, .toast { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
  .toast { background: var(--text); }
}
@media (prefers-contrast: more) {
  .tabbar nav, .sticky-bottom { background: var(--surface); box-shadow: 0 0 0 1.5px var(--line-strong); }
  .input, input, textarea, select { border-color: var(--line-strong); }
}
/* Systemschrift läuft etwas breiter als Bricolage: Knöpfe in Zweier-/Dreierreihen mit weniger Innenabstand, damit nichts umbricht */
.grid2 > .btn, .grid3 > .btn, .row > .btn { padding-left: 12px; padding-right: 12px; }
html.sheet-dragging, html.sheet-dragging * { user-select: none; -webkit-user-select: none; }
/* Impressum & Datenschutz: gut lesbarer Fließtext */
.legal .card { gap: 8px; }
.legal p { font-size: 15px; line-height: 1.55; }
.legal a { word-break: break-word; }
.checkbox span a { text-decoration: underline; }

/* Logo-Kachel: dunkel im dunklen, weiß im hellen Design */
.logo-img { display: block; flex-shrink: 0; position: relative; border-radius: 22%; overflow: hidden; }
.logo-img img { display: block; width: 100%; height: 100%; }
.logo-l { display: none !important; }
:root[data-theme="light"] .logo-d { display: none !important; }
:root[data-theme="light"] .logo-l { display: block !important; }
:root[data-theme="light"] .logo-img { box-shadow: 0 0 0 1px rgba(60, 40, 10, .08), 0 2px 8px rgba(60, 40, 10, .06); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .logo-d { display: none !important; }
  :root:not([data-theme]) .logo-l { display: block !important; }
  :root:not([data-theme]) .logo-img { box-shadow: 0 0 0 1px rgba(60, 40, 10, .08), 0 2px 8px rgba(60, 40, 10, .06); }
}

/* Großansicht Profilbild: Schließen-Knopf hell auf dunklem Glas, in jedem Design gut lesbar */
dialog.lightbox .lb-close { background: rgba(255, 255, 255, .18); color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); min-width: 140px; }
dialog.lightbox .btn.soft { background: rgba(255, 255, 255, .9); color: #14100C; }
/* Zweierreihen: Text bleibt einzeilig (z. B. „Session starten“), notfalls etwas kleiner */
.grid2 > .btn, .grid3 > .btn { white-space: nowrap; font-size: clamp(14px, 3.9vw, 16px); }
