/* Designsystem: Stout & Bernstein – Dunkel und Hell */
: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: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  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);
  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);
    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); }

.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; }
.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); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--surface2); padding: 6px 8px calc(env(safe-area-inset-bottom) + 8px); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; min-height: 48px; justify-content: center; position: relative; }
.tabbar a[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
.tabbar a.plus { justify-self: center; width: 60px; height: 60px; border-radius: 30px; background: var(--accent); color: var(--on-accent); margin-top: -24px; border: 4px solid var(--bg); }
.tabbar .badge-count { position: absolute; top: 2px; left: 55%; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.sticky-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--surface2); 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); }
.scanner .msg { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #F4ECDF; font-size: 14px; }

.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; }
