/* Bühnenaufbau als Leitidee: dunkle Bühne mit messingfarbenen Pultfronten oben, darunter ruhige Notenblatt-Flächen. */
:root {
  --bg: #f1f2f6;
  --surface: #ffffff;
  --fg: #171a2b;
  --muted: #545a70;
  --line: #d6d9e3;
  --brass: #8a661c;          /* Text-Messing, kontraststark auf hellem Grund */
  --brass-deco: #c9a24a;     /* Deko-Messing */
  --stage: #121528;          /* Bühne, in beiden Modi dunkel */
  --stage-2: #1d2140;
  --stage-fg: #efe9da;
  --stage-muted: #b4b2c4;
  --curtain: #7b2333;
  --ok: #1f6b45;
  --danger: #a3242f;
  --focus: #2457d6;
  --cal-probe: #1f7a4d; --cal-probe-fg: #ffffff;      /* Jahresübersicht: Probe grün */
  --cal-ausfall: #b3261e; --cal-ausfall-fg: #ffffff;  /* Probe fällt aus: rot */

  --font-display: 'Limelight', 'Poiret One', Georgia, serif;
  --font-body: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-4: clamp(3rem, 2rem + 6vw, 6.5rem);
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1020; --surface: #171a2e; --fg: #ebe7dc; --muted: #a7aabd; --line: #2b2f48;
    --brass: #dcb865; --brass-deco: #c9a24a; --stage: #0a0c19; --stage-2: #161a35;
    --ok: #6fcf97; --danger: #ff8a8a; --focus: #8fb0ff; color-scheme: dark;
    --cal-probe: #4cc38a; --cal-probe-fg: #0b1a12; --cal-ausfall: #ff7a72; --cal-ausfall-fg: #2a0707;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1020; --surface: #171a2e; --fg: #ebe7dc; --muted: #a7aabd; --line: #2b2f48;
  --brass: #dcb865; --brass-deco: #c9a24a; --stage: #0a0c19; --stage-2: #161a35;
  --ok: #6fcf97; --danger: #ff8a8a; --focus: #8fb0ff; color-scheme: dark;
    --cal-probe: #4cc38a; --cal-probe-fg: #0b1a12; --cal-ausfall: #ff7a72; --cal-ausfall-fg: #2a0707;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--step-0)/1.6 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--brass); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--fg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.eyebrow { font: 500 var(--step--1)/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); }
.ph { background: color-mix(in srgb, var(--brass-deco) 18%, transparent); outline: 1px dashed var(--brass); padding: 0 4px; border-radius: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 20px; border: 2px solid var(--brass-deco); border-radius: 999px;
  background: var(--brass-deco); color: #16130a; font: 600 var(--step-0)/1 var(--font-body);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: color-mix(in srgb, var(--brass-deco) 85%, white); }
.btn-ghost { background: transparent; color: var(--stage-fg); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brass-deco) 20%, transparent); }
.btn-quiet { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-quiet:hover { background: var(--bg); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { min-height: 32px; padding: 4px 12px; font-size: var(--step--1); }
.linkish { background: none; border: 0; padding: 4px 0; color: var(--brass); font: inherit; font-size: var(--step--1); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: var(--danger); }

/* ---------- Öffentliche Seite ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--stage) 94%, transparent); backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--brass-deco) 35%, transparent);
}
.site-head .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 10px var(--gutter); max-width: 1180px; margin: 0 auto; }
.brand { font: 400 1.5rem/1 var(--font-display); color: var(--stage-fg); text-decoration: none; letter-spacing: 0.02em; }
.brand span { color: var(--brass-deco); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.site-nav a { color: var(--stage-fg); text-decoration: none; font-size: var(--step--1); font-weight: 600; padding: 8px 0; }
.site-nav a:hover { color: var(--brass-deco); }
.site-nav .btn { min-height: 36px; padding: 6px 16px; color: #16130a; }

.stage {
  position: relative; overflow: hidden; color: var(--stage-fg);
  background:
    radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--brass-deco) 26%, transparent), transparent 70%),
    linear-gradient(180deg, var(--stage-2), var(--stage));
  padding-block: clamp(48px, 8vw, 96px) 0;
}
.stage::before, .stage::after { /* Vorhang links und rechts */
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(18px, 5vw, 70px);
  background: repeating-linear-gradient(90deg, var(--curtain) 0 10px, color-mix(in srgb, var(--curtain) 70%, black) 10px 18px);
  opacity: 0.85;
}
.stage::before { left: 0; } .stage::after { right: 0; }
.stage-copy { position: relative; max-width: 900px; margin: 0 auto; padding-inline: calc(var(--gutter) + clamp(18px, 5vw, 70px)); text-align: center; display: grid; gap: 18px; justify-items: center; }
.stage .eyebrow { color: var(--brass-deco); }
.stage h1 { font: 400 var(--step-4)/0.95 var(--font-display); letter-spacing: 0.01em; }
.stage h1 span { color: var(--brass-deco); }
.stage .lead { font-size: var(--step-1); line-height: 1.45; max-width: 36ch; color: var(--stage-fg); }
.stage-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }

/* Pultfronten: drei Reihen wie im klassischen Bigband-Aufbau */
.bandstand { position: relative; margin: clamp(40px, 6vw, 64px) auto 0; padding-inline: calc(var(--gutter) + clamp(18px, 5vw, 70px)); max-width: 980px; display: grid; gap: 0; }
.riser { display: flex; justify-content: center; gap: clamp(4px, 1.2vw, 14px); align-items: flex-end; position: relative; }
.riser::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -6px; height: 6px; background: color-mix(in srgb, var(--brass-deco) 25%, var(--stage)); }
.riser + .riser { margin-top: 10px; }
.riser-label { position: absolute; left: 0; bottom: 4px; font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--stage-muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.pult {
  --w: clamp(44px, 11vw, 120px);
  width: var(--w); aspect-ratio: 1 / 0.9; max-width: 100%;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brass-deco) 90%, white), var(--brass-deco) 40%, color-mix(in srgb, var(--brass-deco) 60%, black));
  display: grid; place-items: center; position: relative;
  color: var(--stage);
}
.pult::before { content: ""; position: absolute; inset: 9% 14% 12%; border: 2px solid color-mix(in srgb, var(--stage) 75%, transparent); clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%); }
.pult b { font: 400 calc(var(--w) * 0.36)/1 var(--font-display); letter-spacing: -0.02em; }
.riser.back .pult { --w: clamp(34px, 8vw, 86px); filter: brightness(0.72); }
.riser.mid .pult { --w: clamp(38px, 9.4vw, 100px); filter: brightness(0.86); }
@media (prefers-reduced-motion: no-preference) {
  .pult { animation: rise 700ms cubic-bezier(.2,.7,.2,1) both; }
  .riser.back .pult { animation-delay: 80ms; } .riser.mid .pult { animation-delay: 160ms; } .riser.front .pult { animation-delay: 240ms; }
}
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }

.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section > .inner { max-width: 1180px; margin: 0 auto; display: grid; gap: 28px; }
.section h2 { font: 400 var(--step-2)/1.1 var(--font-display); }
.prose { max-width: 62ch; display: grid; gap: 14px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 5vw, 64px); align-items: start; }
.two-col > * { min-width: 0; }

.history-facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.history-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.history-facts dt { font: 500 var(--step--1)/1.5 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.history-facts dd { margin: 0; }

/* Repertoire als Setliste */
.alt { background: var(--surface); border-block: 1px solid var(--line); }
.setlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 32px; }
.setlist section { padding: 18px 0; border-top: 2px solid var(--fg); display: grid; gap: 8px; align-content: start; }
.setlist h3 { font: 700 var(--step-0)/1.3 var(--font-body); }
.setlist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.setlist li { font-style: italic; }
.setlist p { color: var(--muted); font-size: var(--step--1); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; align-content: start; }
.facts { display: grid; gap: 10px; margin: 0; }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 12px; }
.facts dt { color: var(--muted); font-size: var(--step--1); padding-top: 2px; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.03em; }
address { font-style: normal; }

.donate { background: var(--stage); color: var(--stage-fg); }
.donate h2 { color: var(--stage-fg); }
.donate .card { background: var(--stage-2); border-color: color-mix(in srgb, var(--brass-deco) 40%, transparent); color: var(--stage-fg); }
.donate .facts dt, .donate .muted { color: var(--stage-muted); }
.donate .ph { outline-color: var(--brass-deco); }

.site-foot { padding: 32px var(--gutter); border-top: 1px solid var(--line); }
.site-foot .inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; color: var(--muted); font-size: var(--step--1); }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

@media (max-width: 640px) {
  .history-facts div, .facts div { grid-template-columns: 1fr; gap: 2px; }
  .site-nav { gap: 2px 14px; }
}

/* ---------- Mitgliederbereich ---------- */
.members .m-head { background: var(--stage); color: var(--stage-fg); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding: 12px var(--gutter); }
.m-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; flex: 1; }
.m-nav a { color: var(--stage-fg); text-decoration: none; font-weight: 600; font-size: var(--step--1); padding: 8px 0; border-bottom: 2px solid transparent; }
.m-nav a[aria-current="page"] { border-color: var(--brass-deco); color: var(--brass-deco); }
.m-user { display: flex; gap: 14px; align-items: center; font-size: var(--step--1); }
.m-user a, .m-head .linkish { color: var(--stage-fg); }
.m-main { max-width: 1100px; margin: 0 auto; padding: 32px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.m-main h1 { font: 400 var(--step-2)/1.1 var(--font-display); }
.m-main h2 { font-size: var(--step-1); }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px; }
.m-grid > section { display: grid; gap: 14px; align-content: start; min-width: 0; }
.login { max-width: 420px; display: grid; gap: 16px; }
.stack { display: grid; gap: 8px; }
.stack button { margin-top: 8px; justify-self: start; }
.form-grid { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 10px 16px; align-items: center; margin-top: 14px; }
.form-grid button { justify-self: start; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid > span { display: none; } }
label { font-weight: 600; font-size: var(--step--1); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--muted); border-radius: var(--radius); padding: 10px 12px; min-height: 44px; width: 100%; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.panel summary { cursor: pointer; font-weight: 600; color: var(--brass); min-height: 32px; display: flex; align-items: center; }
.flash { padding: 12px 16px; border-radius: var(--radius); border: 1px solid; }
.flash-ok { border-color: var(--ok); color: var(--ok); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.notices { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.notices li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.events { list-style: none; padding: 0; margin: 0; display: grid; }
.event { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 6px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.event-date { display: grid; font-variant-numeric: tabular-nums; font-weight: 600; }
.event-body { display: grid; gap: 4px; }
.event-title { font-weight: 600; }
.tag { font: 500 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 6px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); vertical-align: 2px; }
.kind-auftritt .tag { border-color: var(--brass); color: var(--brass); }
.is-cancelled .event-title, .is-cancelled .event-date span:first-child { text-decoration: line-through; color: var(--muted); }
.cancel-note { color: var(--danger); }
.event-actions { display: grid; gap: 6px; justify-items: end; align-content: start; }
.event-actions details[open] { grid-column: 1 / -1; }
@media (max-width: 640px) { .event { grid-template-columns: 1fr; } .event-actions { justify-items: start; } }
.month h2 { text-transform: capitalize; margin-top: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td audio { display: block; margin-top: 6px; max-width: 280px; height: 36px; }
.row-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--line); }
code.copy { font-family: var(--font-mono); background: var(--bg); border: 1px solid var(--line); padding: 4px 8px; border-radius: 4px; overflow-wrap: anywhere; }
.donate code.copy { background: var(--stage); color: var(--stage-fg); border-color: color-mix(in srgb, var(--brass-deco) 40%, transparent); }
.donate .btn-quiet { color: var(--stage-fg); border-color: color-mix(in srgb, var(--brass-deco) 50%, transparent); }
.donate .btn-quiet:hover { background: var(--stage); }
@media (max-width: 640px) { .riser-label { display: none; } }
.donate .eyebrow { color: var(--brass-deco); }
.site-nav a, .m-nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Jahresübersicht */
.ycal-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.ycal-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 600; }
.ycal-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.ycal-legend { list-style: none; padding: 0; margin: 12px 0 4px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--step--1); }
.ycal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ycal-swatch { display: inline-block; width: 1.1em; height: 1.1em; border-radius: 3px; border: 1px solid var(--line); }
.ycal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 18px; margin-top: 18px; }
.ycal-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 8px; }
.ycal-month h2 { font: 600 var(--step-0)/1.2 var(--font-body); margin-bottom: 6px; color: var(--brass); }
.ycal table { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.ycal th { font: 500 0.7rem/1 var(--font-mono); color: var(--muted); padding: 4px 0; }
.ycal td { text-align: center; font-size: var(--step--1); padding: 5px 0; border-radius: 4px; }
.d-ferien { background: color-mix(in srgb, var(--muted) 20%, transparent); }
.d-auftritt { background: var(--brass-deco); color: #171a2b; font-weight: 700; }
.d-probe { background: var(--cal-probe); color: var(--cal-probe-fg); font-weight: 700; }
.d-termin { box-shadow: inset 0 0 0 2px var(--brass); font-weight: 700; }
.d-abgesagt { background: var(--cal-ausfall); color: var(--cal-ausfall-fg); font-weight: 700; text-decoration: line-through 2px; }
.d-heute { outline: 3px solid var(--focus); outline-offset: -1px; }
.ycal td a, .ycal td > span { display: block; color: inherit; text-decoration: none; border-radius: 4px; }
.ycal td a:hover { text-decoration: underline; }
.event:target { background: color-mix(in srgb, var(--brass-deco) 14%, transparent); }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; color: #000; font-size: 9pt; }
  .m-main { padding: 0; gap: 6px; max-width: none; }
  .m-head, .m-nav, .m-user, .ycal-nav, .ycal-hint, .site-foot, .skip { display: none !important; }
  .ycal { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
  .ycal-month { padding: 4px; break-inside: avoid; border-color: #999; }
  .ycal td { padding: 1px 0; font-size: 7.5pt; }
  .ycal-legend { margin: 4px 0; }
  .ycal td, .ycal-swatch { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
