/* Theme: Light (Standard) + Dark. Wird nach format.css geladen. */
:root {
  --font-display: "Barlow Condensed", "Archivo Narrow", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --bg: #eef0fc; --surface: #ffffff; --surface-2: #eceffb; --text: #14163a; --muted: #5d6288; --border: #dde1f3;
  --primary: #2447f5; --primary-strong: #1633c9; --primary-soft: #e0e6ff; --on-primary: #ffffff;
  --primary-glow: rgba(36, 71, 245, .30);
  --accent: #9d4dff;
  --ok: #138a4b; --ok-soft: #dcf5e7; --warn: #a35a00; --warn-soft: #fff1d6; --danger: #c62828; --danger-soft: #fde3e3;
  --past: #8b90ad; --past-soft: #e4e6f3;
  --future: #e5a800; --future-soft: #ffdf5e; --future-ink: #1b1a3a; --future-text: #8a6100;
  --cancelled: #8a2be2; --cancelled-soft: #ecdcff; --today: #2447f5;
  --card-bg: rgba(255, 255, 255, .92); --card-border: rgba(120, 130, 200, .18);
  --shadow: 0 8px 30px rgba(60, 70, 160, .12);
  --input-bg: #ffffff;
  --ghost-bg: #eef0fb; --ghost-border: #dde1f3;
  --howto-bg: #e6e4fb; --howto-border: transparent;
  --topbar-bg: rgba(255, 255, 255, .85); --topbar-fg: #14163a; --nav-hover: rgba(20, 22, 58, .07);
  --nav-active-bg: linear-gradient(135deg, #2f55ff, #1633c9); --nav-active-fg: #ffffff;
  --stripe-a: #ffd84a; --stripe-b: #9d4dff;
  --swoosh: linear-gradient(to bottom, rgba(157, 77, 255, 0), rgba(157, 77, 255, .45));
  --bg-glow: radial-gradient(60% 45% at 0% 20%, rgba(150, 170, 255, .35), transparent 70%), radial-gradient(50% 40% at 100% 100%, rgba(180, 170, 255, .35), transparent 70%);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #08080d; --surface: #13131d; --surface-2: #1b1b2a; --text: #f5f5fb; --muted: #9b9bb8; --border: #2b2b42;
  --primary: #ffe600; --primary-strong: #fff25a; --primary-soft: rgba(255, 230, 0, .14); --on-primary: #0a0a10;
  --primary-glow: rgba(255, 230, 0, .25);
  --accent: #ff2bd6;
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .14); --warn: #ffb84d; --warn-soft: rgba(255, 184, 77, .14);
  --danger: #ff5a7a; --danger-soft: rgba(255, 90, 122, .14);
  --past: #8a8aa6; --past-soft: #1f1f2e;
  --future: #ffe600; --future-soft: #ffe600; --future-ink: #0a0a10; --future-text: #ffe600;
  --cancelled: #ff2bd6; --cancelled-soft: rgba(255, 43, 214, .18); --today: #ff2bd6;
  --card-bg: linear-gradient(160deg, #181826 0%, #10101a 100%); --card-border: rgba(255, 255, 255, .08);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --input-bg: #0d0d15;
  --ghost-bg: transparent; --ghost-border: rgba(255, 43, 214, .7);
  --howto-bg: linear-gradient(90deg, rgba(255, 43, 214, .20), rgba(255, 43, 214, .06)); --howto-border: rgba(255, 43, 214, .35);
  --topbar-bg: rgba(10, 10, 16, .85); --topbar-fg: #ffffff; --nav-hover: rgba(255, 255, 255, .10);
  --nav-active-bg: #ffe600; --nav-active-fg: #0a0a10;
  --stripe-a: #ffe600; --stripe-b: #ff2bd6;
  --swoosh: linear-gradient(to bottom, rgba(255, 43, 214, 0), rgba(214, 0, 192, .9));
  --bg-glow: radial-gradient(60% 40% at 85% 0%, rgba(255, 43, 214, .12), transparent 70%), radial-gradient(50% 35% at 10% 0%, rgba(255, 230, 0, .06), transparent 70%);
  color-scheme: dark;
}

/* ---------- Hintergrund + Akzentformen */
html { background: var(--bg-glow), var(--bg); background-attachment: fixed; min-height: 100%; }
body { background: transparent; }
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
body::before { left: 0; top: 40vh; width: min(30vw, 420px); height: 60vh; background: var(--swoosh); clip-path: polygon(0 0, 100% 40%, 25% 100%, 0 100%); }
body::after { left: 0; bottom: 0; width: min(9vw, 130px); height: min(22vh, 220px); background: var(--stripe-a); clip-path: polygon(100% 0, 55% 100%, 0 100%, 0 45%); }
@media (max-width: 720px) { body::before, body::after { opacity: .45; } }

/* ---------- Kopfzeile */
.topbar { background: var(--topbar-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); box-shadow: none; overflow: hidden; }
.topbar::before, .topbar::after { content: ""; position: absolute; top: 0; height: 100%; transform: skewX(-30deg); pointer-events: none; }
.topbar::before { left: 36%; width: 80px; background: var(--stripe-a); }
.topbar::after { left: calc(36% + 100px); width: 34px; background: var(--stripe-b); }
@media (max-width: 900px) { .topbar::before, .topbar::after { display: none; } }
.topbar-inner { position: relative; z-index: 1; }
.brand { color: var(--topbar-fg); font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.4rem; }
.brand-icon { width: 34px; height: 34px; color: var(--primary); }
.mainnav a, .navbtn { color: var(--topbar-fg); }
.mainnav a:hover, .navbtn:hover { background: var(--nav-hover); }
.mainnav a.active { background: var(--nav-active-bg); color: var(--nav-active-fg); box-shadow: 0 4px 16px var(--primary-glow); }
.theme-toggle { padding: 9px; }
html[data-theme="dark"] .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

/* ---------- Typografie */
h1, h2, h3 { font-family: var(--font-display); }
h1 { font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 5vw, 2.4rem); }
h2 { font-weight: 800; font-size: 1.35rem; letter-spacing: .01em; }
.hero h1 { font-weight: 900; font-size: clamp(2.8rem, 9vw, 4.8rem); line-height: .95; margin: 0 0 .3em; }
.h1-accent { color: var(--primary); }
.slashes { color: var(--accent); font-style: italic; margin-left: .12em; }
.hero p { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; }
.month-title { justify-content: flex-start; font-style: italic; font-size: 1.55rem; padding-left: 4px; }
.month-title::before { content: "//"; color: var(--accent); font-style: italic; margin-right: .15em; }

/* ---------- Karten, Buttons, Formulare */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: var(--shadow); }
.btn-primary, .skip-link, .tabs a.active { color: var(--on-primary); }
.btn-primary { box-shadow: 0 6px 20px var(--primary-glow); }
html[data-theme="dark"] .btn-success, html[data-theme="dark"] .btn-danger { color: #0a0a10; }
.btn-ghost { background: var(--ghost-bg); color: var(--text); border-color: var(--ghost-border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
html[data-theme="dark"] .btn-ghost:hover { color: var(--text); background: rgba(255, 43, 214, .15); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea { background: var(--input-bg); }
.copy-field input { border-radius: 999px; padding-left: 18px; }
.howto { background: var(--howto-bg); border: 1px solid var(--howto-border); border-radius: 14px; }
.footer { background: transparent; }

/* ---------- Kalender */
.month-grid th { letter-spacing: .1em; }
.month-grid td { border-radius: 12px; }
.day-num { font-weight: 700; }
td.state-future .day-num { color: var(--future-ink); }
td.state-future .day-dots .dot-future { background: var(--future-ink); }
td.today .day-num { color: var(--today); }
td.today.state-future .day-num { color: var(--future-ink); }
.dot-future { background: var(--future); }
.dot-cancelled { background: var(--cancelled); }

/* ---------- Badges */
.badge-event-planned, .badge-attendance-unknown { background: color-mix(in srgb, var(--future) 20%, transparent); color: var(--future-text); }
