:root {
  --bg: #0d1117; --card: #161b22; --border: #30363d;
  --fg: #e6edf3; --muted: #8b949e; --accent: #e0562c; --accent2: #f0883e;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 40px;
}
header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; background: linear-gradient(135deg, #1a1006, #0d1117);
  border-bottom: 1px solid var(--border);
}
.logo { width: 52px; height: 52px; border-radius: 12px; }
h1 { margin: 0; font-size: 1.35rem; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
main { max-width: 640px; margin: 0 auto; padding: 12px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 14px;
}
h2 { font-size: 1.05rem; margin: 0 0 12px; }
h3 { font-size: .98rem; margin: 0 0 6px; }
label { display: block; font-size: .9rem; color: var(--muted); margin: 10px 0; }
select, input {
  display: block; width: 100%; margin-top: 5px; padding: 11px;
  background: #0d1117; color: var(--fg); border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem;
}
button {
  display: block; width: 100%; margin-top: 10px; padding: 12px;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
button:active { opacity: .85; }
button.secondary { background: #21262d; border: 1px solid var(--border); }
button.danger { background: #8b1a1a; }
button:disabled { opacity: .5; }
.channel { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.channel:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.muted { color: var(--muted); font-size: .85rem; }
.hidden { display: none; }
.ok { color: #3fb950; }
.err { color: #f85149; }
.ev { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ev:last-child { border-bottom: 0; }
.mag {
  min-width: 52px; text-align: center; font-weight: 700; padding: 7px 0;
  border-radius: 8px; background: #21430f; color: #a5d97a;
}
.mag.m5 { background: #4d3608; color: #f0c36d; }
.mag.m6 { background: #58150f; color: #ff9b8a; }
.ev .place { font-size: .92rem; }
.ev .when { font-size: .8rem; color: var(--muted); }
footer { text-align: center; padding: 18px 10px; }
.head-main { flex: 1; }
.langs { display: flex; gap: 4px; }
.langs a {
  padding: 5px 9px; border-radius: 7px; font-size: .78rem; font-weight: 700;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
}
.langs a.active { color: var(--fg); background: #21262d; border-color: var(--border); }
.install-banner { border-color: var(--accent2); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto;
}
.modal h2 { margin-top: 0; }
.modal p { font-size: .92rem; line-height: 1.5; color: var(--fg); }
.modal-overlay.hidden { display: none; }
/* Install-Banner als Bottom-Sheet */
.install-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  margin: 0; max-width: 640px; margin-inline: auto;
  border-radius: 16px 16px 0 0; border-bottom: 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,.6);
  animation: sheet-up .35s ease-out;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-close {
  position: absolute; top: 10px; right: 12px; width: auto; margin: 0;
  padding: 4px 10px; font-size: 1rem; background: #21262d;
  border: 1px solid var(--border); border-radius: 8px;
}
