/* Grid – clean & sportlich. Eine Akzentfarbe, schmale Versal-Überschriften, ruhige Flächen. */
@import url("/static/fonts/fonts.css");

:root {
  --bg: #0d0e12;
  --surface: #15171d;
  --surface-2: #1d2028;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f2f4;
  --muted: #8c919b;
  --faint: #5f646e;
  --accent: #f0281e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(240, 40, 30, 0.12);
  --good: #22b07d;
  --good-soft: rgba(34, 176, 125, 0.12);
  --warn: #e9a23b;
  --warn-soft: rgba(233, 162, 59, 0.14);
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", -apple-system, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f4f1;
    --surface: #ffffff;
    --surface-2: #ececea;
    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.16);
    --text: #121317;
    --muted: #5d616b;
    --faint: #8d9099;
    --accent: #e0211a;
    --accent-soft: rgba(224, 33, 26, 0.09);
    --good-soft: rgba(34, 176, 125, 0.12);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst überschreiben display-Regeln das hidden-Attribut */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(76px + var(--safe-bottom));
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
h1 { font-size: 2rem; letter-spacing: 0.01em; }
h2 { font-size: 1.2rem; letter-spacing: 0.03em; }
h3 { font-size: 1.02rem; letter-spacing: 0.02em; font-weight: 600; }
p { margin: 0; }
small { color: var(--muted); font-size: 0.82rem; }
.muted { color: var(--muted); font-size: 0.92rem; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 700; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ Gerüst */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand img { border-radius: 7px; }
main { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 6px; }
.page-head .actions { display: flex; gap: 6px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 4px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; color: var(--faint);
}
.tabbar a .icon { width: 23px; height: 23px; }
.tabbar a.active { color: var(--text); }
.tabbar a.active .icon { color: var(--accent); }
.tab-badge {
  position: absolute; top: 0; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 0.66rem; font-weight: 700; display: grid; place-items: center;
}

/* ------------------------------------------------------------ Bausteine */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.card.flat { padding: 0; overflow: hidden; gap: 0; }
.card.hero { border-top: 3px solid var(--accent); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 2px -6px; }
.section-title h2 { font-size: 0.78rem; font-family: var(--font); font-weight: 600; letter-spacing: 0.14em; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.pill.red { background: var(--accent-soft); color: var(--accent); }
.pill.green { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 11px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; font-size: 1rem;
}
.btn:active { transform: scale(0.985); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.white { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); padding: 0 4px; min-height: 36px; font-weight: 600; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 0.9rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

input[type=text], input[type=number], input[type=tel], input[type=password], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); outline: none; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
label.field > input, label.field > select { color: var(--text); font-weight: 400; }
.pin-input { font-family: var(--font-display); font-size: 1.8rem !important; letter-spacing: 0.5em; text-align: center; font-weight: 700; }
.code-input { font-family: var(--font-display); font-size: 1.6rem !important; letter-spacing: 0.25em; text-align: center; text-transform: uppercase; font-weight: 700; }

.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: 0.2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.2s; }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(18px); }

.seg { display: flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px;
  font-weight: 600; font-size: 0.9rem; color: var(--muted); cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }

.list { display: flex; flex-direction: column; }
.list > .item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none;
  border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; width: 100%;
}
.list > .item:last-child { border-bottom: 0; }
.item .flag { font-size: 1.3rem; width: 28px; text-align: center; }
.item .chev { color: var(--faint); display: flex; }
.item b { font-weight: 600; }

table.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { font-family: var(--font-display); font-size: 1.05rem; }
.table tr.me td { background: var(--accent-soft); }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rank { width: 34px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--muted); }
.rank.r1 { color: var(--accent); }

.countdown { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 2.6rem; line-height: 1; letter-spacing: 0.01em; }
.big-num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.05; }

/* ------------------------------------------------------------ Tippen */
.bet { gap: 12px; }
.bet-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.bet-head h3 { font-size: 1.08rem; }
.bet .desc { font-size: 0.86rem; color: var(--muted); margin-top: 3px; }
.bet.saved { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.save-state { font-size: 0.76rem; color: var(--muted); min-height: 1em; }
.save-state.ok { color: var(--good); }
.save-state.err { color: var(--accent); }

.drivers { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.driver {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: 7px 8px 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2);
  cursor: pointer; text-align: left; overflow: hidden; min-height: 50px;
}
.driver::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--team, #888); }
.driver b { font-family: var(--font-display); font-size: 1.12rem; letter-spacing: 0.03em; font-weight: 700; }
.driver small { font-size: 0.7rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.driver.selected { border-color: var(--accent); background: var(--accent-soft); }
.driver .pick-badge {
  position: absolute; right: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; display: grid; place-items: center;
}
.driver.none { --team: var(--faint); }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slot {
  flex: 1 1 0; min-width: 64px; min-height: 46px; border-radius: 9px; border: 1px dashed var(--line-strong);
  display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; background: transparent;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
}
.slot.filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.slot .pos { color: var(--muted); font-size: 0.8rem; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  flex: 1 1 auto; min-height: 46px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 600; cursor: pointer;
}
.choice.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 46px; height: 46px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.stepper .val { min-width: 52px; text-align: center; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.duel .vs { color: var(--faint); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; }

.answer { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 6px;
  background: var(--surface-2); font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.03em;
}
.tag::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--team, var(--muted)); }
.tag.plain::before { display: none; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; }
.result-line:first-of-type { border-top: 0; }
.pts { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.pts.hit { color: var(--good); }
.pts.zero { color: var(--faint); }

.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip-link { padding: 7px 12px; border-radius: 9px; background: var(--surface-2); font-weight: 600; font-size: 0.88rem; text-decoration: none; white-space: nowrap; }
.chip-link.active { background: var(--text); color: var(--bg); }

/* ------------------------------------------------------------ Einladen / Anmelden / Verwalten */
.code-display { font-family: var(--font-display); font-weight: 700; font-size: 3rem; letter-spacing: 0.12em; text-align: center; line-height: 1; }
.qr { width: 190px; height: 190px; border-radius: 12px; background: #fff; padding: 8px; align-self: center; }
.welcome-logo { width: 72px; height: 72px; border-radius: 18px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps > div { display: flex; gap: 12px; align-items: flex-start; }
.steps > div::before {
  counter-increment: s; content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2);
  font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; color: var(--accent);
}
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
}
.menu { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.menu button { border: 0; background: none; text-align: left; padding: 12px 14px; font-weight: 600; cursor: pointer; border-top: 1px solid var(--line); }
.menu button:first-child { border-top: 0; }
.menu button.danger { color: var(--accent); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.preset b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; }
.preset small { font-size: 0.74rem; line-height: 1.3; }
.preset.active { border-color: var(--accent); background: var(--accent-soft); }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.toggle-row:first-child { border-top: 0; }
.toggle-row .grow b { font-weight: 600; }

/* ------------------------------------------------------------ Profil */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat .big-num { font-size: 1.9rem; }
.rate { height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.rate span { display: block; height: 100%; border-radius: 2px; background: var(--good); }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .dot.last { stroke-width: 3; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip {
  position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; z-index: 2;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
  font-size: 0.82rem; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
a.result-line { color: inherit; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px; text-align: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; min-height: 96px;
}
.badge .emoji { font-size: 1.6rem; line-height: 1.2; filter: grayscale(1); opacity: 0.3; }
.badge b { font-size: 0.74rem; line-height: 1.15; color: var(--faint); font-weight: 600; }
.badge small { font-size: 0.7rem; color: var(--faint); }
.badge.earned { border-color: var(--line-strong); background: var(--surface); }
.badge.earned .emoji { filter: none; opacity: 1; }
.badge.earned b { color: var(--text); }
.badge.earned small { color: var(--muted); }

/* ------------------------------------------------------------ Rennbericht */
.report-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.report-lines li { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: baseline; font-size: 0.95rem; }
.report-lines .label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.report-lines li.winner .label, .report-lines li.leader .label { color: var(--accent); }

/* ------------------------------------------------------------ Paddock */
body.with-composer { padding-bottom: calc(150px + var(--safe-bottom)); }
body.with-composer #toast { bottom: calc(140px + var(--safe-bottom)); }
.feed { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 86%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-name { padding-left: 12px; font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 8px 12px; cursor: pointer; }
.msg.mine .bubble { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 16px 16px 5px 16px; }
.msg.mentioned .bubble { border-color: var(--warn); }
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-time { display: block; font-size: 0.66rem; opacity: 0.65; margin-top: 2px; text-align: right; }
.msg.mine .msg-time { color: rgba(255, 255, 255, 0.85); }
.mention { font-weight: 700; color: var(--accent); }
.msg.mine .mention { color: #fff; text-decoration: underline; }
.quote { border-left: 2px solid currentColor; opacity: 0.75; padding-left: 8px; margin-bottom: 4px; font-size: 0.85rem; }
.msg-actions { display: flex; gap: 4px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.react { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; font-size: 0.85rem; cursor: pointer; }
.react.mine { border-color: var(--accent); background: var(--accent-soft); }
.react.add { color: var(--faint); display: inline-flex; align-items: center; padding: 3px 7px; }
.react.add .icon { width: 15px; height: 15px; }
.react-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.system-msg { border-left: 3px solid var(--accent); gap: 6px; font-size: 0.92rem; }
.photo-card { gap: 10px; }
.photo { width: 100%; max-height: 70vh; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.photo-locked {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 240px; border-radius: 10px; padding: 20px; background: var(--surface-2); color: var(--muted);
}
.photo-locked .icon { width: 30px; height: 30px; }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-bottom)); z-index: 25;
  padding: 8px 12px; background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 6px;
}
.composer-input { flex: 1; resize: none; min-height: 44px; max-height: 120px; border-radius: 22px !important; padding: 11px 16px !important; }
.btn.send { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest .pill { border: 0; cursor: pointer; padding: 6px 10px; text-transform: none; letter-spacing: 0; font-size: 0.85rem; }
.reply-bar { display: flex; align-items: center; gap: 6px; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow: auto;
}
.sheet-photo { width: 100%; max-height: 55vh; object-fit: contain; border-radius: 10px; background: #000; }

/* ------------------------------------------------------------ Logos */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.logo-card {
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface-2); cursor: pointer; text-align: left;
}
.logo-card img { width: 64px; height: 64px; border-radius: 15px; }
.logo-card.selected { border-color: var(--accent); }
.logo-card p { font-size: 0.8rem; color: var(--muted); }

/* ------------------------------------------------------------ Meldungen */
#toast {
  position: fixed; left: 50%; bottom: calc(88px + var(--safe-bottom)); transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 11px; font-weight: 600; font-size: 0.92rem;
  opacity: 0; pointer-events: none; transition: 0.22s; z-index: 70; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#banner:empty { display: none; }
#banner { max-width: 640px; margin: 4px auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.notice {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem; text-decoration: none;
}
.notice > .icon { color: var(--accent); }
.notice.warn { border-color: var(--warn); }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding-top: 8px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
@media (min-width: 720px) {
  .tabbar { left: 50%; right: auto; width: 640px; transform: translateX(-50%); bottom: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 6px; }
  body { padding-bottom: 96px; }
  .composer { left: 50%; right: auto; width: 640px; transform: translateX(-50%); bottom: 86px; border: 1px solid var(--line); border-radius: 18px; }
  body.with-composer { padding-bottom: 190px; }
}
