/* =====================================================================
   Riperto – Gestaltung
   Uniform-Blau und Messing, Studierzeichen-Kästchen als Leitmotiv.
   ===================================================================== */

:root {
  --paper: #EEF1F5;
  --card: #FFFFFF;
  --ink: #18202D;
  --muted: #5A6576;
  --line: #D3DAE3;
  --line-soft: #E3E8EE;
  --navy: #1E2D48;
  --navy-2: #2B3F63;
  --primary: #1E2D48;
  --primary-ink: #FFFFFF;
  --brass: #B8862B;
  --brass-ink: #5A3F0C;
  --brass-soft: #F5E9CD;
  --ok: #2F8A57;   --ok-soft: #DCEFE3;
  --warn: #D9A21C; --warn-soft: #FBF0D2;
  --bad: #C0403A;  --bad-soft: #F8E1DF;
  --none: #C5CCD6;
  --focus: #3B6FD8;
  --shadow: 0 1px 2px rgba(24, 32, 45, .06), 0 6px 24px rgba(24, 32, 45, .08);
  --f-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --tabbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10151E;
    --card: #19202C;
    --ink: #E7EBF1;
    --muted: #9CA7B7;
    --line: #2E3848;
    --line-soft: #242D3A;
    --navy: #141D2E;
    --navy-2: #22304A;
    --primary: #D4A74C;
    --primary-ink: #1C1406;
    --brass: #D4A74C;
    --brass-ink: #F1D9A3;
    --brass-soft: #3A2E15;
    --ok: #47B077;   --ok-soft: #173426;
    --warn: #E5B53A; --warn-soft: #3A3014;
    --bad: #E0645D;  --bad-soft: #3D1D1C;
    --none: #4A5566;
    --focus: #7EA2F0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1.25em; height: 1.25em; flex: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 .5rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.boot { min-height: 100vh; display: grid; place-items: center; background: var(--navy); }

/* ---------- Kopfzeile ------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: calc(env(safe-area-inset-top) + .55rem) 1rem .55rem;
  background: var(--navy); color: #fff;
}
.club-switch {
  display: flex; align-items: center; gap: .6rem; min-width: 0;
  background: none; border: 0; color: inherit; padding: .25rem 0; cursor: pointer;
}
.club-name { font: 600 1.15rem/1.1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.club-switch svg { opacity: .7; }
.avatar {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none;
  font: 700 .8rem/1 var(--f-body); background: var(--navy-2); color: #fff;
}
.rows .avatar, .demo-people .avatar { background: var(--brass-soft); color: var(--brass-ink); }
.avatar.big { width: 3rem; height: 3rem; font-size: 1rem; }

.demo-bar { background: var(--brass-soft); color: var(--brass-ink); font-size: .85rem; padding: .45rem 1rem; text-align: center; }
.offline {
  display: grid; gap: .35rem; justify-items: start;
  background: var(--bad-soft); color: var(--ink);
  border-left: 4px solid var(--bad);
  padding: .75rem 1rem; font-size: .92rem;
}

/* ---------- Seite ------------------------------------------------ */

.main { max-width: 42rem; margin: 0 auto; padding: 1.1rem 1rem calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 2rem); }
.page.narrow { max-width: 30rem; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .9rem; }
.page-title { font: 700 2.1rem/1 var(--f-display); letter-spacing: -.005em; margin-bottom: .8rem; }
.page-head .page-title { margin: 0; }
.lead { color: var(--muted); max-width: 34rem; }
.muted { color: var(--muted); }
.fine { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
.center { text-align: center; }
.back { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); text-decoration: none; font-size: .92rem; margin: 0 0 .6rem -.3rem; padding: .3rem; }
.hint { background: var(--brass-soft); color: var(--brass-ink); padding: .65rem .85rem; border-radius: 8px; font-size: .92rem; }
.hint.warn { margin: 1rem 0; }
.archive-link { margin-top: 2rem; text-align: center; }
.archive-link a { color: var(--muted); }

.block { padding-top: 1.1rem; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.block-head h2 { font: 600 1.4rem/1.1 var(--f-display); letter-spacing: .005em; }
.count { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.group-title { font: 600 1.05rem/1.2 var(--f-display); color: var(--muted); margin: 1rem 0 .35rem; }

.card { background: var(--card); border-radius: 12px; padding: 1.1rem; box-shadow: var(--shadow); }
.card-title { font: 600 1.35rem/1.15 var(--f-display); margin-bottom: .4rem; }
.form-card { display: grid; gap: .85rem; }

.empty { text-align: center; padding: 2.5rem 1rem; display: grid; gap: .6rem; justify-items: center; }
.empty h3 { font: 600 1.5rem/1.1 var(--f-display); }
.empty p { color: var(--muted); max-width: 26rem; margin: 0; }

/* ---------- Konzertkopf ------------------------------------------ */

.concert-head { padding: .4rem 0 .2rem; }
.concert-title { font: 700 clamp(2.5rem, 11vw, 3.7rem)/.92 var(--f-display); letter-spacing: -.012em; text-wrap: balance; }
.countdown {
  display: inline-block; margin: .6rem 0 0;
  font: 600 1rem/1 var(--f-display); letter-spacing: .02em;
  padding: .35rem .6rem .3rem; border: 2px solid var(--line); border-radius: 4px; color: var(--muted);
}
.countdown.soon { border-color: var(--brass); color: var(--brass-ink); background: var(--brass-soft); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--line-soft); border-radius: 10px; margin-bottom: 1rem; }
.seg > * {
  border: 0; background: none; padding: .45rem .9rem; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: .92rem; color: var(--muted); text-decoration: none; min-height: 36px;
  display: inline-flex; align-items: center;
}
.seg > .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.small { margin-bottom: 0; }
.seg.small > * { padding: .35rem .65rem; font-size: .85rem; min-height: 32px; }

/* ---------- Probe ------------------------------------------------ */



/* ---------- Programm --------------------------------------------- */

.prog { list-style: none; margin: 0; padding: 0; }
.mark {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border: 2.5px solid var(--ink); border-radius: 3px;
  font: 700 1.45rem/1 var(--f-display); text-decoration: none; color: var(--ink);
  background: var(--card);
}
.mark.small { width: 1.9rem; height: 1.9rem; font-size: 1.05rem; border-width: 2px; flex: none; }
.prog-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; align-items: center; }
.prog-tools.big { margin: .5rem 0 1rem; }
.own { display: grid; gap: .3rem; margin-top: .75rem; }
.listen-note { font-size: .9rem; color: var(--muted); margin: .4rem 0 0; padding-left: .7rem; border-left: 2px solid var(--brass); }

/* ---------- Chips, Punkte, Links --------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700;
  background: var(--line-soft); color: var(--muted); white-space: nowrap; margin: 0;
}

.roles { display: flex; gap: .35rem; flex-wrap: wrap; margin: 0; }

.dot { width: .62rem; height: .62rem; border-radius: 50%; display: inline-block; flex: none; background: var(--none); }

.listen, .tempo {
  display: inline-flex; align-items: center; gap: .35rem; text-decoration: none;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 8px;
  padding: .32rem .65rem; font-weight: 700; font-size: .88rem; min-height: 36px;
}
.listen:hover, .tempo:hover { border-color: var(--ink); }
.tempo svg { color: var(--brass); width: 1em; height: 1em; }
.listen.big { font-size: 1rem; padding: .5rem .85rem; min-height: 44px; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.reg { font-size: .8rem; font-weight: 700; color: var(--brass-ink); background: var(--brass-soft); border-radius: 4px; padding: .1rem .4rem; }
.reg.all { background: var(--line-soft); color: var(--muted); }
.quote { border-left: 3px solid var(--brass); padding: .2rem 0 .2rem .8rem; margin: .4rem 0 0; }

/* ---------- Statusauswahl ---------------------------------------- */


.st {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .4rem .3rem; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 8px;
  font-weight: 700; font-size: .9rem; color: var(--ink);
  transition: background-color .12s, border-color .12s;
}
.st i { width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.st:hover { border-color: var(--muted); }
.st.on i { background: currentColor; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

/* ---------- Zusammenfassung -------------------------------------- */


.sumbar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--line-soft); }
.sumbar span { display: block; height: 100%; }
.sumbar .g { background: var(--ok); } .sumbar .y { background: var(--warn); } .sumbar .r { background: var(--bad); }

/* ---------- Übeaufträge ------------------------------------------ */

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.task { display: flex; gap: .75rem; background: var(--card); border-radius: 10px; padding: .8rem .85rem; box-shadow: var(--shadow); }
.tick {
  flex: none; width: 1.8rem; height: 1.8rem; margin-top: .05rem; cursor: pointer;
  border: 2px solid var(--muted); border-radius: 6px; background: transparent; display: grid; place-items: center; padding: 0;
}
.tick span { width: .55rem; height: .95rem; border: solid transparent; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -2px); }
.tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.tick[aria-pressed="true"] span { border-color: #fff; }
.task-main { flex: 1; min-width: 0; }
.task-foot { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: .5rem; font-size: .88rem; }
.due { color: var(--muted); }

/* ---------- Listen ----------------------------------------------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--line-soft); }
.rows > li:last-child { border-bottom: 0; }
.row {
  display: flex; align-items: center; gap: .8rem; width: 100%; padding: .8rem 0;
  text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; color: inherit;
}
div.row { cursor: default; }
.rows.compact .row { padding: .6rem 0; }
.row-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.row-main strong { font-weight: 700; }
.row-main small { color: var(--muted); font-size: .86rem; }
.row-side { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .86rem; flex: none; }
.mini { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 700; }
.todo { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--brass-ink); }
.search {
  width: 100%; padding: .7rem .9rem; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); margin-bottom: .7rem;
}
.chips-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.chips-filter button { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .8rem; font-size: .86rem; font-weight: 700; cursor: pointer; min-height: 36px; }
.chips-filter button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.others { margin-top: 1.2rem; }
.others summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: .5rem 0; }

/* ---------- Stück ------------------------------------------------ */

.piece-head { margin-bottom: .4rem; }
.piece-title { font: 700 clamp(2.1rem, 9vw, 3rem)/.95 var(--f-display); letter-spacing: -.01em; text-wrap: balance; margin-bottom: .6rem; }
.facts { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .4rem 0 .6rem; }
.facts div { display: grid; }
.facts dt { font-size: .76rem; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.note { background: var(--card); border-radius: 10px; padding: .75rem .85rem; box-shadow: var(--shadow); }
.note-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.note-meta span { font-weight: 400; }
.note p { margin: 0; }
.scores { display: grid; gap: .45rem; margin: 0; }
.scores div { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.scores dt { color: var(--muted); }
.scores dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: .4rem; }

/* ---------- Musikkommission -------------------------------------- */

.ranking { list-style: none; margin: 0; padding: 0; }
.ranking > li { border-bottom: 1px solid var(--line-soft); }
.rank-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 0; text-decoration: none; }
.rank-row .row-main strong { font: 600 1.25rem/1.1 var(--f-display); }
.rating { display: grid; justify-items: end; gap: .1rem; text-align: right; }
.stars { color: var(--line); letter-spacing: .02em; white-space: nowrap; }
.star.full { color: var(--brass); }
.star.half { background: linear-gradient(90deg, var(--brass) 50%, var(--line) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-input { border: 0; padding: 0; margin: 0; }
.star-input legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: .2rem; }
.star-input legend small { color: var(--muted); font-weight: 400; }
.star-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.star-row label { cursor: pointer; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row span { font-size: 2rem; line-height: 1; color: var(--line); display: block; padding: 0 .1rem; }
.star-row label:hover span, .star-row label:hover ~ label span, .star-row input:checked + span, .star-row label.lit span { color: var(--brass); }
.star-row label:has(input:checked) ~ label span { color: var(--brass); }
.star-row input:focus-visible + span { outline: 3px solid var(--focus); border-radius: 4px; }

/* ---------- Konzert bearbeiten ----------------------------------- */

.two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
.pick { list-style: none; margin: 0 0 1rem; padding: 0; max-height: 22rem; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.pick li { border-bottom: 1px solid var(--line-soft); padding: 0 .75rem; }
.pick li:last-child { border-bottom: 0; }
.pick .check { padding: .6rem 0; }
.sticky-save { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + .6rem); margin-top: 1.5rem; z-index: 5; }
.sticky-save .btn { box-shadow: var(--shadow); }

/* ---------- Formulare -------------------------------------------- */

.field { display: grid; gap: .3rem; min-width: 0; }
.field > input, .field > select { min-width: 0; max-width: 100%; }
/* iPhone: Datumsfelder haben sonst eine eigene Mindestbreite und ragen über die Spalte hinaus */
input[type=date], input[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
.field-label { font-weight: 700; font-size: .9rem; }
.field-hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=number], input[type=date], input[type=datetime-local], select, textarea, .copy-field {
  width: 100%; min-height: 44px; padding: .55rem .75rem;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--card);
}
textarea { resize: vertical; min-height: 4.5rem; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(59, 111, 216, .25); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.check { display: flex; gap: .65rem; align-items: flex-start; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; accent-color: var(--primary); flex: none; }
.check span { display: grid; }
.check small { color: var(--muted); font-size: .84rem; }
.check strong { font-weight: 700; }
.check.inline { align-items: center; margin-top: .3rem; }
.check.inline span { display: inline; font-size: .9rem; }
.roles-set { border: 0; padding: 0; margin: 0; display: grid; gap: .7rem; }
.roles-set legend { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; padding: 0; }

/* ---------- Knöpfe ----------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .5rem 1rem; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--line-soft); }
.btn.ghost.danger { color: var(--bad); background: transparent; }
.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .86rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
.linkish { background: none; border: 0; padding: .2rem 0; color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); cursor: pointer; }
.linkish:hover { text-decoration-color: currentColor; }
.linkish.danger { color: var(--bad); }
.demo-bar .linkish, .offline .linkish { font-size: inherit; }
.icon-btn { background: none; border: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover:not(:disabled) { background: var(--line-soft); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.actions-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.actions-row.tight { margin-top: .4rem; }

/* ---------- Werkzeuge -------------------------------------------- */

.tools .seg { display: flex; width: 100%; }
.tools .seg > * { flex: 1; justify-content: center; }
.metro, .tuner { display: grid; justify-items: center; gap: .9rem; text-align: center; }
.metro-ctx { font: 600 1.25rem/1.2 var(--f-display); display: grid; gap: .5rem; justify-items: center; margin: 0; }
.metro-quick { display: flex; gap: .4rem; }
.beats { display: flex; gap: .6rem; min-height: 1.4rem; align-items: center; }
.beats span { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--line); transition: background-color .04s; }
.beats span.acc { width: 1.25rem; height: 1.25rem; border-color: var(--muted); }
.beats span.hit { background: var(--brass); border-color: var(--brass); }
.bpm-wrap { display: flex; align-items: center; gap: 1rem; }
.bpm { font: 700 clamp(5.5rem, 26vw, 8.5rem)/.9 var(--f-display); font-variant-numeric: tabular-nums; min-width: 3ch; letter-spacing: -.02em; }
.bpm-unit { color: var(--muted); margin: -.6rem 0 0; font-size: .9rem; }
.round {
  width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card);
  font-size: 1.6rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; line-height: 1;
}
.round.small { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
.round:hover { border-color: var(--ink); }
.bpm-slider { width: min(100%, 26rem); accent-color: var(--brass); }
.metro-main { display: flex; align-items: center; gap: 1.2rem; margin: .3rem 0; }
.play-btn {
  width: 5rem; height: 5rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.play-btn svg { width: 2.2rem; height: 2.2rem; }
.play-btn.on { background: var(--bad); color: #fff; }
.btn.tap { min-width: 4.2rem; }
.btn.tap-wide { width: min(100%, 16rem); min-height: 52px; }
.metro-opts { display: grid; gap: 1rem; width: 100%; justify-items: center; margin-top: .4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.opt { display: grid; gap: .4rem; justify-items: center; }
.opt-label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.seg.wrap { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 22rem); }
.seg.wrap > * { justify-content: center; }
.stepper { display: flex; align-items: center; gap: .8rem; }
.stepper output { font: 600 1.3rem/1 var(--f-display); min-width: 5ch; }

.tuner-display { width: 100%; padding: 1.2rem 1rem 1rem; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); display: grid; justify-items: center; gap: .35rem; transition: background-color .15s; }
.tuner-display.in-tune { background: var(--ok-soft); }
.tuner-note { font: 700 clamp(5rem, 24vw, 7.5rem)/.9 var(--f-display); min-height: 1em; }
.tuner-display.in-tune .tuner-note { color: var(--ok); }
.tuner-sounding { color: var(--muted); font-size: .9rem; min-height: 1.3em; }
.tuner-cents { font-weight: 700; min-height: 1.5em; }
.needle { position: absolute; left: 50%; bottom: 1.3rem; width: 3px; height: 3.7rem; background: var(--ink); border-radius: 2px; transform-origin: 50% 100%; transform: translateX(-50%) rotate(0deg); transition: transform .12s ease-out; }
.tuner-display.in-tune .needle { background: var(--ok); }
.tuner-display.off .needle { background: var(--bad); }

.metro-pill {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 25;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + .7rem);
  display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; border-radius: 999px; padding: .55rem 1rem; font-weight: 700; box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) { .metro-pill { background: var(--brass); color: var(--primary-ink); } }

/* ---------- Navigation unten ------------------------------------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; max-width: 8.5rem; height: var(--tabbar-h);
  display: grid; justify-items: center; align-content: center; gap: .2rem;
  text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 700; position: relative;
}
.tabbar a svg { width: 1.55rem; height: 1.55rem; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--brass); border-radius: 0 0 3px 3px; }

/* ---------- Blatt (Dialog) --------------------------------------- */

.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 34rem; max-height: 92vh;
  border-radius: 18px 18px 0 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(10, 16, 28, .5); }
.sheet[open] { animation: sheet-in .2s ease-out; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 16px; } }
.sheet-form { display: flex; flex-direction: column; max-height: 92vh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1rem .4rem 1.2rem; }
.sheet-head h2 { font: 600 1.5rem/1.1 var(--f-display); }
.sheet-body { padding: .4rem 1.2rem 1rem; overflow: auto; display: grid; gap: .9rem; }
.sheet-body > .btn { justify-self: start; }
.sheet-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.2rem calc(.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.confirm-text { font-size: 1.02rem; }
.copy-field { font-size: .85rem; }

/* ---------- Anmeldung -------------------------------------------- */

.auth { max-width: 26rem; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 3rem) 1.2rem 3rem; display: grid; gap: 1.1rem; }
.auth-hero { display: grid; gap: .8rem; justify-items: start; margin-bottom: .6rem; }
.auth-hero p { font: 600 1.5rem/1.15 var(--f-display); margin: 0; max-width: 20rem; }
.auth-form { display: grid; gap: .9rem; }
.auth-switch { text-align: center; color: var(--muted); margin: 0; }
.invite-banner { background: var(--brass-soft); color: var(--brass-ink); padding: .8rem 1rem; border-radius: 10px; }
.demo-people { display: grid; gap: .6rem; }
.person { display: flex; align-items: center; gap: .9rem; text-align: left; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.person:hover { border-color: var(--ink); }
.person span:last-child { display: grid; }
.person small { color: var(--muted); }
code { font-size: .9em; background: var(--line-soft); padding: .05em .3em; border-radius: 4px; }

/* ---------- Toast ------------------------------------------------ */

.toast {
  position: fixed; left: 50%; z-index: 100; width: max-content; max-width: min(92vw, 30rem);
  top: calc(env(safe-area-inset-top) + 4.2rem);
  transform: translate(-50%, -.6rem); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: .7rem 1rem; border-radius: 10px;
  font-weight: 700; font-size: .92rem; box-shadow: var(--shadow); transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bad); color: #fff; }

@media (min-width: 900px) {
  .main { padding-top: 2rem; }
  .concert-title { font-size: 4.2rem; }
}

/* ---------- Ergänzungen ------------------------------------------ */
.block.first { border-top: 0; margin-top: 1rem; padding-top: 0; }


/* ---------- Übersicht: Konzertkarten ----------------------------- */
.concert-cards { display: grid; gap: .8rem; }
.concert-card { display: grid; gap: .6rem; padding: 1rem 1.1rem; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); text-decoration: none; border-left: 5px solid var(--brass); }
.concert-card:hover { box-shadow: 0 0 0 1.5px var(--line), var(--shadow); }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.cc-head h3 { font: 700 1.75rem/1 var(--f-display); letter-spacing: -.005em; }
.cc-head .countdown { margin: 0; flex: none; }
.cc-more { font-size: .88rem; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.concert-info-text { margin-top: .8rem; padding: .7rem .85rem; background: var(--card); border-radius: 8px; }

/* ---------- Formatierter Text ------------------------------------ */
.rich { line-height: 1.5; overflow-wrap: anywhere; }
.rich p, .rich div { margin: 0; }
.rich ul, .rich ol { margin: .3rem 0; padding-left: 1.3rem; }
@media (prefers-color-scheme: dark) { .rich span[style*="color"] { filter: brightness(1.45) saturate(1.1); } }
.rte-wrap { border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.rte-wrap:focus-within { border-color: var(--focus); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; padding: .35rem; border-bottom: 1px solid var(--line); background: var(--line-soft); }
.rte-bar button { min-width: 2.2rem; height: 2.4rem; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 1.05rem; display: grid; place-items: center; color: var(--ink); }
.rte-bar button:hover { background: var(--card); }
.rte-color span { width: 1.2rem; height: 1.2rem; border-radius: 50%; display: block; }
.rte-sep { width: 1px; height: 1.5rem; background: var(--line); margin: 0 .1rem; }
.rte { min-height: 9rem; padding: .75rem .85rem; outline: none; line-height: 1.5; }
.rte:empty::before { content: attr(data-placeholder); color: var(--muted); }
@media (prefers-color-scheme: dark) { .rte span[style*="color"], .rte font { filter: brightness(1.45); } }

/* ---------- Konzert: Programm ------------------------------------ */
.plan-row .dur { margin-left: .5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.prog-bar {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  margin: .2rem 0; padding: .55rem .9rem; border-radius: 6px;
  background: var(--brass-soft); color: var(--brass-ink); font-weight: 700;
}
.bar-dur { font-variant-numeric: tabular-nums; font-weight: 400; }
.plan-total { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; margin: 0 0 .7rem; }
.plan-total span { color: var(--muted); font-size: .88rem; }
.eval-title { font: 600 1.15rem/1.2 var(--f-display); margin: 1rem 0 0; }
.eval-title a { text-decoration: none; }
.eval-title:first-of-type { margin-top: 0; }
.note-box { width: 100%; min-height: 7rem; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); resize: vertical; line-height: 1.5; }
.note-box:focus { border-color: var(--focus); outline: none; }

/* ---------- Planer ----------------------------------------------- */
.plan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.plan-row, .plan-bar { display: flex; align-items: center; gap: .55rem; border-radius: 8px; padding: .45rem .4rem .45rem .2rem; }
.plan-row { background: var(--card); box-shadow: var(--shadow); }
.plan-bar { background: var(--brass-soft); color: var(--brass-ink); }
.plan-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.plan-main strong { overflow-wrap: anywhere; line-height: 1.25; }
.plan-main small { color: var(--muted); font-size: .82rem; }
.handle { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; font-size: 1.35rem; line-height: 1; color: var(--muted); padding: .45rem .35rem; flex: none; }
.plan-bar .handle { color: var(--brass-ink); }
.handle:active { cursor: grabbing; }
.drag-ghost { opacity: .4; }
.sortable-chosen { box-shadow: 0 0 0 2px var(--brass), var(--shadow); }
.plan-bar input { border: 0; background: transparent; min-height: 36px; padding: .2rem .4rem; font-weight: 700; color: inherit; border-radius: 6px; }
.plan-bar input:focus { background: var(--card); box-shadow: none; outline: 2px solid var(--brass); }
.plan-bar input.bar-label { flex: 1; min-width: 0; }
.plan-bar input.bar-dur { width: 4.6rem; text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; }
.plan-bar .bar-label:not(input) { flex: 1; padding-left: .4rem; }
.plan-row .dur { margin: 0; min-width: 2.8rem; text-align: right; }
.bar-chips { display: grid; gap: .45rem; margin-top: .9rem; }
.bar-chips > div { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- MuKo ------------------------------------------------- */
.eyebrow-line { display: flex; gap: .6rem; align-items: baseline; margin: 0 0 .2rem; font-size: .9rem; }
.muko .rank-row, .rank-row.ranked { align-items: flex-start; gap: .75rem; }
.ranking .rank-row > .row-main { text-decoration: none; }
.rank-main { flex: 1; min-width: 0; display: grid; gap: .45rem; }
.rank-main .row-main { text-decoration: none; }
.rank-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .8rem; margin: 0; }
.rank-scores div { display: grid; }
.rank-scores dt { font-size: .72rem; font-weight: 700; color: var(--muted); }
.rank-scores dd { margin: 0; display: flex; align-items: center; gap: .3rem; font-size: .92rem; }
.rank-row.picked { background: linear-gradient(90deg, var(--ok-soft), transparent 70%); border-radius: 8px; }
.rank-row.ranked { padding: .8rem .4rem; }
.listen-ico { color: var(--ink); border: 1.5px solid var(--line); background: var(--card); }
.pick-box { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pick-box input { width: 1.3rem; height: 1.3rem; accent-color: var(--ok); margin: 0; }
.pick-box.big { font-size: 1rem; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); margin: .4rem 0; }
.diff { display: inline-flex; align-items: flex-end; gap: 2px; }
.diff i { width: 5px; height: 6px; background: var(--line); border-radius: 1px; }
.diff i:nth-child(2) { height: 8px; } .diff i:nth-child(3) { height: 10px; } .diff i:nth-child(4) { height: 12px; } .diff i:nth-child(5) { height: 14px; }
.diff i.on { background: var(--navy-2); }
@media (prefers-color-scheme: dark) { .diff i.on { background: var(--brass); } }
.diff b { margin-left: .35rem; font-weight: 700; }
.diff-input { border: 0; padding: 0; margin: 0; }
.diff-input legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: .3rem; }
.diff-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.diff-row label { cursor: pointer; }
.diff-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.diff-row span { display: grid; place-items: center; min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 700; background: var(--card); }
.diff-row input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.diff-row input:focus-visible + span { outline: 3px solid var(--focus); }
.diff-legend { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: .2rem; }

/* =====================================================================
   Stufen 1–5 und schlankere Darstellung
   ===================================================================== */
:root { --l1: #D23F3A; --l2: #E8772E; --l3: #E2B23A; --l4: #2F9E5B; --l5: #157347; --gold: #E0A800; }
@media (prefers-color-scheme: dark) { :root { --l1: #E5625C; --l2: #F08C46; --l3: #EAC254; --l4: #46B574; --l5: #2E9A63; --gold: #F2C230; } }

.dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; flex: none; background: var(--none); }
.dot.lv-1 { background: var(--l1); } .dot.lv-2 { background: var(--l2); } .dot.lv-3 { background: var(--l3); } .dot.lv-4 { background: var(--l4); }
.dot.star { background: none; width: auto; height: auto; color: var(--gold); font-style: normal; font-size: .95rem; line-height: 1; }

.lv-ctl { display: inline-flex; gap: .4rem; align-items: center; }
.lv {
  --c: var(--none);
  width: 1.95rem; height: 1.95rem; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--c); background: var(--card); background: color-mix(in srgb, var(--c) 18%, transparent);
  display: grid; place-items: center; font-size: 1rem; line-height: 1; color: var(--c);
  transition: transform .08s, background-color .12s;
}
.lv-1 { --c: var(--l1); } .lv-2 { --c: var(--l2); } .lv-3 { --c: var(--l3); } .lv-4 { --c: var(--l4); }
.lv.lv-5 { --c: var(--gold); }
.lv:hover { transform: scale(1.08); }
.lv.on { background: var(--c); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--c); }
.lv.lv-5.on { color: #3A2A00; }
.lv:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.lvchip { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700; }
.lvchip.none { color: var(--muted); font-weight: 400; }

.sumbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--line-soft); }
.sumbar span { display: block; height: 100%; }
.sumbar .lv-1 { background: var(--l1); } .sumbar .lv-2 { background: var(--l2); } .sumbar .lv-3 { background: var(--l3); }
.sumbar .lv-4 { background: var(--l4); } .sumbar .lv-5 { background: var(--l5); }
.row .sumbar { margin-top: .35rem; max-width: 11rem; }

.tend { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: .88rem; }
.tend small { color: var(--muted); font-size: .78rem; }

.ev { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .35rem .5rem; align-items: center; margin-top: .45rem; }
.ev-k { font-size: .74rem; font-weight: 700; color: var(--muted); }
.ev-v { min-width: 0; }
.ev-tend { display: grid; gap: .25rem; }

.legend { margin: 0 0 .5rem; }
.legend summary { cursor: pointer; font-size: .82rem; color: var(--muted); }
.legend ul { list-style: none; margin: .4rem 0 0; padding: .55rem .7rem; display: grid; gap: .35rem; background: var(--card); border-radius: 8px; font-size: .82rem; }
.legend li { display: flex; gap: .5rem; align-items: baseline; }
.legend li .dot { position: relative; top: .1rem; }

/* Konzert-Infos */
.cf { display: grid; gap: .15rem; margin: 0; font-size: .92rem; }
.cf div { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .5rem; }
.cf dt { color: var(--muted); font-size: .8rem; font-weight: 700; padding-top: .1rem; }
.cf dd { margin: 0; }
.maplink { display: inline-flex; align-items: flex-start; gap: .25rem; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brass); }
.maplink svg { color: var(--brass); width: 1rem; height: 1rem; margin-top: .15rem; }
.concert-head .cf { margin-top: .6rem; }

/* Programm kompakt */

.ico { display: inline-flex; align-items: center; gap: .2rem; height: 1.8rem; padding: 0 .45rem; border: 1.5px solid var(--line); border-radius: 6px; background: var(--card); font-size: .78rem; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--ink); }
.ico svg { width: 1rem; height: 1rem; }
.ico:hover { border-color: var(--ink); }
.prog-bar { padding: .35rem .7rem; font-size: .88rem; margin: .3rem 0; }

/* Allgemein schlanker */
.topbar { padding-top: calc(env(safe-area-inset-top) + .4rem); padding-bottom: .4rem; }
.main { padding-top: .8rem; }
:root { --tabbar-h: 58px; }
.page-title { font-size: 1.8rem; margin-bottom: .5rem; }
.block { margin-top: 1rem; padding-top: .75rem; }
.block-head { margin-bottom: .5rem; }
.block-head h2 { font-size: 1.28rem; }
.concert-title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
.piece-title { font-size: clamp(1.7rem, 7vw, 2.3rem); margin-bottom: .4rem; }
.countdown { font-size: .85rem; padding: .25rem .45rem .2rem; margin-top: .4rem; }
.tasks { gap: .45rem; }
.task { padding: .6rem .7rem; gap: .6rem; }
.tick { width: 1.55rem; height: 1.55rem; }
.task .rich { font-size: .95rem; }
.task-foot { margin-top: .3rem; font-size: .8rem; }
.concert-cards { gap: .55rem; }
.concert-card { padding: .7rem .85rem; gap: .45rem; cursor: pointer; }
.cc-head h3 { font-size: 1.4rem; }
.cc-head h3 a { text-decoration: none; }
.cc-more { font-size: .8rem; }
.row { padding: .6rem 0; }
.rows.compact .row { padding: .45rem 0; }
.prog-tools.big { margin: .3rem 0 .6rem; }
.eval-title { font-size: 1.05rem; margin-top: .8rem; }
.facts { margin: .2rem 0 .4rem; gap: .3rem 1.1rem; }
.rank-row.ranked { padding: .6rem .3rem; }
.rank-row .row-main strong { font-size: 1.1rem; }
.rank-scores { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.rank-scores div { display: flex; align-items: center; gap: .3rem; }
.rank-scores dd { font-size: .86rem; }
.ranking .rank-row { padding: .6rem 0; }
.lead { font-size: .94rem; margin-bottom: .4rem; }
.empty { padding: 1.6rem 1rem; }

.rank-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.rank-top .row-main { flex: 1; min-width: 0; }
.rank-main .pick-box { justify-self: start; }
.chips-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
.chips-filter::-webkit-scrollbar { display: none; }
.chips-filter button { flex: none; }

/* ---------- Nächste Probe ---------------------------------------- */
.next-event { display: grid; gap: .25rem; padding: .7rem .85rem; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); border-left: 5px solid var(--navy-2); }
@media (prefers-color-scheme: dark) { .next-event { border-left-color: var(--brass); } }
.ne-when { font: 700 1.35rem/1.15 var(--f-display); margin: .15rem 0 0; }
.ne-where, .ne-note { margin: 0; font-size: .92rem; }
.ne-note { color: var(--muted); }
.cat-tag { display: inline-flex; align-items: center; gap: .3rem; justify-self: start; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
  color: var(--cc); background: var(--line-soft); background: color-mix(in srgb, var(--cc) 14%, transparent); }
@media (prefers-color-scheme: dark) { .cat-tag { color: var(--ink); color: color-mix(in srgb, var(--cc) 55%, white); background: color-mix(in srgb, var(--cc) 28%, transparent); } }
.head-actions { display: inline-flex; gap: .9rem; }

/* ---------- Terminliste ------------------------------------------ */
.month-title { font: 600 1rem/1.2 var(--f-display); color: var(--muted); margin: .8rem 0 .3rem; }
.evlist { list-style: none; margin: 0; padding: 0; }
.evi { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.evi[data-act] { cursor: pointer; }
.evi.past { opacity: .55; }
.evi.today .evi-date { background: var(--brass-soft); color: var(--brass-ink); }
.evi-date { flex: none; width: 3.1rem; text-align: center; padding: .2rem 0; border-radius: 6px; background: var(--line-soft); font-size: .82rem; line-height: 1.2; display: grid; }
.evi-date b { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.evi-main { flex: 1; min-width: 0; display: grid; gap: .1rem; font-size: .9rem; }
.evi-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.evi-place { font-size: .86rem; }
.evi-note { color: var(--muted); font-size: .82rem; }

/* ---------- Probeplan-Editor ------------------------------------- */
.pd-step { display: grid; gap: .5rem; margin-bottom: 1rem; }
.cat-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-chip { border: 2px solid var(--cc); color: var(--ink); background: var(--card); border-radius: 999px; padding: .35rem .8rem; font-weight: 700; font-size: .88rem; cursor: pointer; min-height: 36px; }
.cat-chip.on { background: var(--cc); color: #fff; }
.newcat { display: flex; gap: .4rem; }
.newcat input { flex: 1; min-width: 0; min-height: 36px; padding: .35rem .65rem; border: 1.5px dashed var(--line); border-radius: 8px; background: var(--card); }
.cal { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 .2rem .3rem; }
.cal-head strong { font: 600 1.15rem/1 var(--f-display); }
.icon-btn.flip svg { transform: scaleX(-1); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd { border: 0; background: none; font-size: .74rem; font-weight: 700; color: var(--muted); padding: .35rem 0; cursor: pointer; border-radius: 6px; }
.cal-wd:hover { background: var(--line-soft); color: var(--ink); }
.cal-day { position: relative; aspect-ratio: 1 / 1; min-height: 38px; border: 0; border-radius: 8px; background: var(--paper); cursor: pointer; font-weight: 700; font-size: .92rem; display: grid; place-items: center; color: var(--ink); padding: 0; }
.cal-day.past { color: var(--muted); font-weight: 400; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--brass); }
.cal-day.sel { background: var(--primary); color: var(--primary-ink); }
.cal-dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.cal-dots b { width: 5px; height: 5px; border-radius: 50%; }
.cal-day.sel .cal-dots b { box-shadow: 0 0 0 1px var(--primary-ink); }

/* ---------- Rückmeldung Konzert ---------------------------------- */
.fb { display: grid; gap: .4rem; }
.fb-q { font-size: .8rem; font-weight: 700; color: var(--muted); }
.fb-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; }
.fb-btn { --c: var(--none); min-height: 36px; border-radius: 8px; border: 1.5px solid var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 60%, var(--line)); background: var(--card); background: color-mix(in srgb, var(--c) 10%, var(--card)); font-weight: 700; font-size: .84rem; cursor: pointer; color: var(--ink); padding: 0 .2rem; }
.fb-1 { --c: var(--l1); } .fb-2 { --c: var(--l2); } .fb-3 { --c: var(--l4); } .fb-4 { --c: var(--l5); }
.fb-btn.on { background: var(--c); border-color: var(--c); color: #fff; }
.fb-result { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .88rem; align-items: center; }
.fb-r { display: inline-flex; align-items: center; gap: .3rem; }
.fb-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--c); display: inline-block; }

/* ---------- Aushilfen -------------------------------------------- */
.helpers { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.helper { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .65rem .8rem; display: grid; gap: .35rem; cursor: pointer; }
.helper:hover { box-shadow: 0 0 0 1.5px var(--line), var(--shadow); }
.helper-top { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.helper-concerts { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip-on { background: var(--brass-soft); color: var(--brass-ink); }
.helper-notes { margin: 0; font-size: .86rem; color: var(--muted); }

/* sechs Reiter unten */
.tabbar a { font-size: .66rem; }
.tabbar a svg { width: 1.4rem; height: 1.4rem; }
.fb-overall { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: .95rem; }
.fb-overall small { color: var(--muted); font-size: .8rem; }
.fb-overall .fb-dot { width: .8rem; height: .8rem; }
.ev-v .muted { font-size: .86rem; }

/* ---------- Ersatz für Browser ohne <dialog> (iOS vor 15.4) ---------- */
dialog.no-dialog { display: none; }
dialog.no-dialog[open] {
  display: flex; align-items: flex-end; justify-content: center;
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90;
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border-radius: 0; background: rgba(10, 16, 28, .5); box-shadow: none;
}
dialog.no-dialog[open] > .sheet-form { width: 100%; max-width: 34rem; max-height: 92vh; background: var(--paper); border-radius: 18px 18px 0 0; }
@media (min-width: 640px) { dialog.no-dialog[open] { align-items: center; } dialog.no-dialog[open] > .sheet-form { border-radius: 16px; } }
body.dlg-open { overflow: hidden; }

/* ---------- Logo ---------- */
.brand-logo { display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo img { display: block; }
.topbar .brand-icon { width: 30px; height: 30px; }
.boot .brand-logo { flex-direction: column; gap: .8rem; }
.boot .brand-logo img, .auth-hero .brand-logo img { width: 84px; height: 84px; }
.brand-word { font: 700 2.2rem/1 var(--f-display); color: var(--ink); letter-spacing: .01em; }
.boot .brand-word { color: #F5EFE3; }
.old-browser { max-width: 26rem; margin: 15vh auto 0; padding: 1.4rem; text-align: center; font: 1rem/1.5 system-ui, -apple-system, Arial, sans-serif; color: #18202D; }
.old-browser h1 { font-size: 1.4rem; margin-bottom: .6rem; }

/* ---------- Programm: eine Zeile pro Stück ---------------------- */
.pi2-caption { font-size: .8rem; color: var(--muted); margin: 0 0 .1rem; }
.prog2 .prog-bar { margin: .2rem 0; padding: .3rem .7rem; }
.pi2 { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); gap: .55rem; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.pi2 .mark.small { width: 1.7rem; height: 1.7rem; font-size: .95rem; margin-top: .1rem; }
.pi2-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.9rem; }
.pi2-title { font: 600 1.12rem/1.15 var(--f-display); text-decoration: none; min-width: 0; }
.pi2-right { flex: none; }
.pi2-right .lv-ctl { gap: .3rem; }
.pi2-right .lv, .pi-own .lv { width: 1.6rem; height: 1.6rem; font-size: .85rem; }
.pi2-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem; margin-top: .05rem; }
.pi2-comp { color: var(--muted); font-size: .82rem; }
.pi2-comp .dur { margin-left: .45rem; font-variant-numeric: tabular-nums; }
.ico.sm { height: 1.5rem; padding: 0 .35rem; font-size: .72rem; border-width: 1px; }
.ico.sm svg { width: .85rem; height: .85rem; }
.pi2-info { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .15rem; font-size: .8rem; }
.pi-kv { display: inline-flex; align-items: center; gap: .3rem; }
.pi-kv > span:first-child { color: var(--muted); font-weight: 700; font-size: .72rem; }
.pi-kv em { font-style: normal; color: var(--muted); margin-left: .25rem; }
.pi-kv .dot { width: .6rem; height: .6rem; }
.pi-own { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; font-size: .72rem; font-weight: 700; color: var(--muted); }
@media (max-width: 380px) { .pi2-right .lv, .pi-own .lv { width: 1.45rem; height: 1.45rem; } .pi2-right .lv-ctl { gap: .22rem; } }

/* ---------- Hinweis: neue Version ------------------------------- */
.update-bar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 95;
  top: calc(env(safe-area-inset-top) + 3.4rem);
  width: max-content; max-width: min(94vw, 30rem);
  display: flex; align-items: center; gap: .8rem;
  background: var(--navy); color: #fff; padding: .55rem .6rem .55rem .95rem; border-radius: 12px;
  box-shadow: var(--shadow); font-weight: 700; font-size: .9rem;
}
@media (prefers-color-scheme: dark) { .update-bar { background: var(--card); color: var(--ink); border: 1.5px solid var(--brass); } }
.update-bar .btn { flex: none; }
.update-bar .btn.primary { background: var(--brass); border-color: var(--brass); color: #1C1406; }

/* ---------- Register --------------------------------------------- */
.reg-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: var(--card); border: 1.5px solid var(--rc, var(--line)); }
.reg-chip i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--rc, var(--none)); flex: none; }
.reg-chip b { color: var(--muted); font-weight: 700; margin-left: .15rem; }
.helper-chip { --rc: var(--muted); border-style: dashed; }
.reg-list { list-style: none; margin: .4rem 0 .6rem; padding: 0; }
.reg-list li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--line-soft); }
.reg-swatch { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 0; cursor: pointer; flex: none; }
.reg-name { flex: 1; text-align: left; background: none; border: 0; padding: .4rem 0; font-weight: 700; cursor: pointer; color: var(--ink); }
.reg-count { font-size: .82rem; min-width: 1.5rem; text-align: right; }
.reg-add { display: flex; gap: .4rem; }
.reg-add input { flex: 1; min-width: 0; min-height: 40px; }
.color-set { border: 0; padding: 0; margin: 0; }
.color-set legend { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; padding: 0; }
.color-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.color-row label { cursor: pointer; }
.color-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-row span { display: block; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 3px solid transparent; }
.color-row input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--card); }
.color-row input:focus-visible + span { outline: 3px solid var(--focus); }

/* ---------- Sitzordnung ------------------------------------------ */
.seating-wrap { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: .4rem; margin-top: .6rem; overflow-x: auto; }
.seating-svg { display: block; width: 100%; height: auto; }
.row-band { fill: none; stroke: var(--line-soft); stroke-linecap: round; }
.row-band-rect { fill: var(--line-soft); }
.seat > circle:first-of-type { fill: var(--card); fill: color-mix(in srgb, var(--sc) 22%, var(--card)); stroke: var(--sc); stroke-width: 3; }
.seat-empty > circle:first-of-type { fill: var(--card); stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 5; }
.seat-vacant > circle:first-of-type { fill: var(--line-soft); stroke: var(--muted); stroke-width: 2; stroke-dasharray: 3 4; }
.seat-helper > circle:first-of-type { stroke-dasharray: 8 4; }
.seat text { font-family: var(--f-body); text-anchor: middle; }
.seat-ini { font-weight: 700; fill: var(--ink); }
.seat-empty .seat-ini { fill: var(--muted); font-weight: 400; }
.seat-name { fill: var(--muted); font-weight: 700; }
.seat-badge { fill: var(--ink); }
.seat-badge-t { fill: var(--card); font-weight: 700; }
.seat.editable { cursor: pointer; }
.seat.editable:hover > circle:first-of-type, .seat.editable:focus > circle:first-of-type { stroke-width: 5; }
.seat.editable:focus { outline: none; }
.conductor rect { fill: var(--navy); }
.conductor text { fill: #fff; text-anchor: middle; font-family: var(--f-body); font-weight: 700; }
.seat-empty-hint { fill: var(--muted); text-anchor: middle; font-family: var(--f-body); }
.reg-legend { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.row-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.row-list li { display: flex; align-items: center; gap: .8rem; padding: .4rem 0; border-bottom: 1px solid var(--line-soft); }
.row-title { flex: 1; font-weight: 700; }
.row-stepper { display: inline-flex; align-items: center; gap: .5rem; }
.row-stepper b { min-width: 1.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.unseated { display: flex; flex-wrap: wrap; gap: .35rem; }
.seat-quick { display: flex; gap: .4rem; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.pick-seat { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .5rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; color: var(--ink); }
.pick-seat:hover { border-color: var(--ink); }
.pick-seat.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pick-seat i { width: .85rem; height: .85rem; border-radius: 50%; flex: none; }
.pick-seat span { display: grid; }
.pick-seat small { color: var(--muted); font-size: .8rem; }
.seating-mini { display: block; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: .3rem; }
.seating-mini .seating-svg { min-width: 0; }

/* ---------- Form-Umschalter und Besetzungsliste ----------------- */
.shape-seg { margin: .6rem 0 0; }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.cast-col { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .55rem .7rem; border-top: 4px solid var(--rc); }
.cast-col h3 { display: flex; align-items: center; gap: .4rem; font: 600 1.05rem/1.2 var(--f-display); margin-bottom: .3rem; }
.cast-col h3 i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--rc); flex: none; }
.cast-col h3 b { margin-left: auto; color: var(--muted); font: 700 .8rem/1 var(--f-body); }
.cast-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; font-size: .88rem; }
.cast-col em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: 0 .25rem; margin-left: .2rem; }
@media print { .tabbar, .topbar, .demo-bar, .actions-row, .row-list, .shape-seg { display: none !important; } .main { padding: 0; } }
/* Sitzordnung darf am Computer breiter sein */
@media (min-width: 900px) { .main:has(.seating-page) { max-width: 68rem; } }

/* Zoom der Sitzordnung */
.zoom-bar { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin-top: .6rem; }
.zoom-bar .fine { margin: 0 .2rem 0 0; }
.seating-wrap.zoomable { overflow: auto; max-height: 75vh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.seating-wrap.zoomable .seating-svg { max-width: none; }

/* ---------- Stimmgerät: Zeigerinstrument -------------------------- */
.tuner-display { gap: 0; padding: .9rem 1rem .7rem; }
.tuner-head { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; gap: 1rem; min-height: 4.6rem; }
.tuner-head .tuner-note { font-size: 4.4rem; line-height: .9; min-height: 0; min-width: 2ch; text-align: left; }
.tuner-meta { display: grid; justify-items: end; text-align: right; gap: .15rem; padding-top: .3rem; }
.tuner-meta .tuner-cents { font-weight: 700; font-size: 1rem; min-height: 0; }
.tuner-meta .tuner-sounding { font-size: .85rem; min-height: 0; }
.tuner-gauge { display: block; width: 100%; max-width: 30rem; height: auto; margin: 0 auto; overflow: visible; }
.tuner-gauge .zone-near { fill: none; stroke: var(--warn-soft); stroke-width: 18; }
.tuner-gauge .zone-ok { fill: none; stroke: var(--ok-soft); stroke-width: 18; }
.tuner-display.in-tune .tuner-gauge .zone-ok { stroke: var(--ok); opacity: .35; }
.tuner-gauge .tick { stroke: var(--muted); stroke-width: 1.5; }
.tuner-gauge .tick-major { stroke: var(--ink); stroke-width: 2.5; }
.tuner-gauge .tick-label { fill: var(--muted); font: 700 11px var(--f-body); text-anchor: middle; }
.tuner-gauge .gauge-side { fill: var(--muted); font: 11px var(--f-body); text-anchor: middle; }
.needle-g { transform-origin: 160px 178px; transform-box: view-box; transition: transform .12s ease-out; }
.needle-line { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.needle-tip { fill: var(--ink); }
.needle-pivot { fill: var(--ink); }
.tuner-display.in-tune .needle-line, .tuner-display.in-tune .needle-tip { stroke: var(--ok); fill: var(--ok); }
.tuner-display.off .needle-line, .tuner-display.off .needle-tip { stroke: var(--bad); fill: var(--bad); }
.tuner-display.in-tune .tuner-note, .tuner-display.in-tune .tuner-cents { color: var(--ok); }
.tuner-display.off .tuner-cents { color: var(--bad); }
.tuner-display.in-tune { background: var(--card); }

/* ---------- Helferliste ------------------------------------------ */
.duties { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.duty { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .55rem .7rem; border-left: 4px solid var(--brass); }
.duty.full { border-left-color: var(--ok); }
.duty-count { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 700; }
.duty.full .duty-count { color: var(--ok); }
.icon-btn.sm { width: 2rem; height: 2rem; }
.icon-btn.sm svg { width: 1rem; height: 1rem; }
.duty-people { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .1rem; font-size: .9rem; }
.duty-people li { display: flex; align-items: center; gap: .5rem; }
.duty-people em { font-style: normal; color: var(--muted); font-size: .84rem; }
.duty-people em::before { content: '· '; }
.duty-people .icon-btn { margin-left: auto; }
.duty-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .4rem; }
.duty-me { font-size: .82rem; font-weight: 700; color: var(--ok); }

/* ---------- Umfragen --------------------------------------------- */
.polls { display: grid; gap: .55rem; }
.poll { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: .7rem .8rem; border-top: 4px solid var(--navy-2); }
@media (prefers-color-scheme: dark) { .poll { border-top-color: var(--brass); } }
.poll.closed { opacity: .85; border-top-color: var(--line); }
.poll-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.poll-head h3 { font: 600 1.2rem/1.2 var(--f-display); }
.poll-head .fine { margin: 0; flex: none; }
.poll-desc { margin: .2rem 0 .1rem; font-size: .92rem; }
.poll-opts, .poll-dates { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .3rem; }
.po-btn { position: relative; overflow: hidden; display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; padding: .5rem .65rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; color: var(--ink); font-weight: 700; }
.po-btn:disabled { cursor: default; }
.po-btn.on { border-color: var(--primary); }
.po-mark { width: 1.1rem; text-align: center; color: var(--primary); flex: none; position: relative; z-index: 1; }
.po-label { flex: 1; position: relative; z-index: 1; }
.po-n { font-variant-numeric: tabular-nums; color: var(--muted); position: relative; z-index: 1; }
.po-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brass-soft); z-index: 0; transition: width .25s; }
.poll-dates li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line-soft); }
.pd-label { font-weight: 700; font-size: .92rem; }
.pd-btns { display: inline-flex; gap: .3rem; }
.pd-btn { min-width: 3.4rem; min-height: 36px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; color: var(--ink); }
.pd-btn b { font-weight: 400; color: var(--muted); margin-left: .15rem; }
.pd-2.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.pd-1.on { background: var(--warn); border-color: var(--warn); color: #2A1E02; }
.pd-0.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.pd-btn.on b { color: inherit; }
.pd-btn:disabled { cursor: default; }
.poll-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem .8rem; margin-top: .45rem; }
.poll-foot .fine { margin: 0; }
.poll-admin { display: inline-flex; gap: .8rem; }
.poll-rows { display: grid; gap: .4rem; margin-bottom: .3rem; }
.poll-rows input { width: 100%; }
.poll-kind { display: grid; gap: .4rem; }
.poll-kind > .btn { justify-self: start; }

/* ---------- Repertoire mit Nummern ------------------------------- */
.rep-tools { display: flex; justify-content: flex-end; margin: -.2rem 0 .5rem; }
.rep-list > li { display: flex; align-items: center; gap: .2rem; }
.rep-list > li > .row { flex: 1; min-width: 0; }
.rep-nr { flex: none; }
.rep-list .handle { padding: .5rem .3rem .5rem 0; }
.rep-list.sortable .sortable-chosen { background: var(--card); box-shadow: 0 0 0 2px var(--brass), var(--shadow); border-radius: 8px; }
.nr { font-weight: 700; color: var(--ink); }
.nr-line { margin: -.2rem 0 .4rem; font-weight: 700; color: var(--brass-ink); }

/* ---------- Helferliste kompakt ---------------------------------- */
.duty-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.duty-list li + li { border-top: 1px solid var(--line-soft); }
.duty-row { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .7rem .85rem; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink); }
.duty-row:hover { background: var(--line-soft); }
.duty-name { font-weight: 700; flex: 1; min-width: 0; }
.duty-me-badge { font-size: .75rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: .1rem .5rem; }
.duty-row .duty-count { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); min-width: 2.6rem; text-align: right; }
.duty-row.full .duty-count { color: var(--ok); }
.duty-chev svg { transform: rotate(-90deg); color: var(--muted); width: 1rem; height: 1rem; }
.duty-info { background: var(--brass-soft); color: var(--brass-ink); border-radius: 10px; padding: .65rem .8rem; font-size: .95rem; }
.duty-status { font-weight: 700; color: var(--muted); margin: 0; }
.duty-status.full { color: var(--ok); }

/* ---------- MuKo: Projektliste ----------------------------------- */
.project-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.project-list li + li { border-top: 1px solid var(--line-soft); }
.project-row { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; text-decoration: none; color: var(--ink); }
.project-row:hover { background: var(--line-soft); }
.project-row .row-main strong { font: 600 1.2rem/1.2 var(--f-display); }
.todo-badge { flex: none; font-size: .75rem; font-weight: 700; color: var(--brass-ink); background: var(--brass-soft); border-radius: 999px; padding: .15rem .55rem; }

/* ---------- Übersicht: Zeilen «Mitmachen» ------------------------- */
.todo-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; border-left: 4px solid var(--brass); }
.todo-list li + li { border-top: 1px solid var(--line-soft); }
.todo-row { display: flex; align-items: center; gap: .65rem; padding: .65rem .8rem; text-decoration: none; color: var(--ink); }
.todo-row:hover { background: var(--line-soft); }
.todo-ico svg { width: 1.3rem; height: 1.3rem; color: var(--brass-ink); display: block; }
.todo-main { flex: 1; min-width: 0; display: grid; }
.todo-main small { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.todo-main strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-cta { flex: none; font-size: .8rem; font-weight: 700; color: #fff; background: var(--primary); border-radius: 999px; padding: .2rem .65rem; }
.todo-done { flex: none; font-size: .8rem; font-weight: 700; color: var(--ok); }

/* ---------- Verein: Menü und Unterseiten -------------------------- */
.menu-list { list-style: none; margin: 0 0 .9rem; padding: 0; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.menu-list li + li { border-top: 1px solid var(--line-soft); }
.menu-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; text-decoration: none; color: var(--ink); }
.menu-row:hover { background: var(--line-soft); }
.menu-row .row-main strong { font-weight: 700; }
.menu-ico svg { width: 1.35rem; height: 1.35rem; display: block; color: var(--muted); }
.actions-col { display: grid; gap: .5rem; max-width: 22rem; }
.roles-help { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: .6rem .85rem; margin-bottom: .8rem; }
.roles-help summary { cursor: pointer; font-weight: 700; }
.roles-help dl { margin: .6rem 0 .3rem; display: grid; grid-template-columns: max-content 1fr; gap: .45rem .8rem; font-size: .9rem; }
.roles-help dt { font-weight: 700; }
.roles-help dd { margin: 0; color: var(--ink); }
@media (max-width: 420px) { .roles-help dl { grid-template-columns: 1fr; gap: .1rem; } .roles-help dd { margin-bottom: .4rem; } }
.prose { max-width: 40rem; }
.prose h2 { font: 600 1.25rem/1.2 var(--f-display); margin: 1.1rem 0 .3rem; }
.prose ul { padding-left: 1.1rem; display: grid; gap: .3rem; }
.prose p { margin: .4rem 0; }
.file-btn { position: relative; cursor: pointer; }

/* ---------- Kontraste (Barrierefreiheit) -------------------------- */
.cat-tag { color: var(--ink); color: color-mix(in srgb, var(--cc) 62%, #000); }
@media (prefers-color-scheme: dark) { .cat-tag { color: var(--ink); color: color-mix(in srgb, var(--cc) 55%, white); } .todo-cta { color: #1C1406; } }
/* Textfarben aus dem Editor im dunklen Modus aufhellen (gespeicherter Text bleibt unverändert) */
@media (prefers-color-scheme: dark) {
  .rich span[style*="c0392b" i], .rich span[style*="192, 57, 43"] { color: #FF8A80 !important; }
  .rich span[style*="2e6fd8" i], .rich span[style*="46, 111, 216"] { color: #8DB6FF !important; }
  .rich span[style*="2f8a57" i], .rich span[style*="47, 138, 87"] { color: #7BD69B !important; }
  .rich span[style*="c77700" i], .rich span[style*="199, 119, 0"] { color: #FFB74D !important; }
}

/* ---------- Probenpräsenz ----------------------------------------- */
.evi { align-items: center; }
.evi-link { display: flex; gap: .7rem; align-items: flex-start; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.evi-link:hover .evi-top { text-decoration: underline; }
.evi-att { flex: none; }
.evi.cancelled .evi-top, .evi.cancelled .evi-place, .evi.cancelled .evi-date { text-decoration: line-through; opacity: .6; }
.evi-status { display: block; font-size: .8rem; font-weight: 700; }
.evi-status.cancel { color: var(--bad); }
.evi-status.moved { color: var(--brass-ink); }
.evi-regs, .evi-mine { display: block; font-size: .78rem; color: var(--muted); }
.att-pct { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--line-soft); border-radius: 999px; padding: .05rem .45rem; margin-left: .2rem; }
.att-pct.good { color: var(--ok); background: var(--ok-soft); }
.att-pct.low { color: var(--bad); background: var(--bad-soft, var(--line-soft)); }
.att-btns { display: inline-flex; gap: .25rem; }
.att-btn { min-width: 2.15rem; height: 2.15rem; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: 0 .4rem; }
.att-btn:disabled { opacity: .45; cursor: default; }
.att-btn.att-yes.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-btn.att-maybe.on { background: var(--warn); border-color: var(--warn); color: #2A1E02; }
.att-btn.att-no.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.att-btn.att-open.on { background: var(--line); border-color: var(--line); color: var(--ink); }
.att-btns.big { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; width: 100%; max-width: 26rem; }
.att-btns.big .att-btn { height: 2.8rem; font-size: 1rem; }
.att-btns.big .att-btn span { font-size: .88rem; }
.ne-att { margin-top: .6rem; }
.ne-count { margin: .45rem 0 0; font-size: .85rem; }
.att-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .6rem .8rem; margin-bottom: .8rem; }
.att-bar p { margin: 0; flex: 1 1 14rem; font-size: .9rem; }
.att-bar .linkish { margin-left: auto; }
.page-title.struck { text-decoration: line-through; opacity: .7; }
.att-regs { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .35rem; }
.att-regs li { display: flex; align-items: center; gap: .45rem; background: var(--card); border-radius: 8px; box-shadow: var(--shadow); padding: .4rem .6rem; border-left: 4px solid var(--rc); }
.att-regs i { display: none; }
.ar-name { flex: 1; font-weight: 700; font-size: .9rem; }
.ar-val { font-size: .9rem; }
.ar-val small { color: var(--muted); }
.pres-list { list-style: none; margin: 0 0 .4rem; padding: 0; }
.pres-list li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line-soft); }
.pres-list li.gap-row { background: var(--brass-soft); border-radius: 6px; padding-left: .4rem; padding-right: .4rem; }
.pres-name { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; display: grid; }
.pres-name small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.att-state { font-size: .85rem; font-weight: 700; color: var(--muted); }
.att-state.att-yes { color: var(--ok); } .att-state.att-no { color: var(--bad); }
.reason-set { border: 0; margin: 0; padding: 0; display: grid; gap: .35rem; }
.reason-set legend { font-weight: 700; margin-bottom: .3rem; padding: 0; }
.radio { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }
.radio input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .3rem .6rem; }
.reg-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.stat-period .two { gap: .6rem; }
.stat-period input[type=date] { width: 100%; }
.hint.ok { background: var(--ok-soft); color: var(--ok); margin: .8rem 0; }
.stat-gaps { display: grid; gap: .4rem; }
.stat-wrap { overflow-x: auto; margin-top: .6rem; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.stat-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.stat-table th { text-align: left; font-size: .75rem; color: var(--muted); padding: .5rem .55rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.stat-table td { padding: .45rem .55rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.stat-table td small { display: block; color: var(--muted); font-size: .76rem; }
.stat-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-table tbody tr { cursor: pointer; }
.stat-table tbody tr:hover { background: var(--line-soft); }
.stat-table .gap { background: var(--brass-soft); color: var(--brass-ink); border-radius: 999px; padding: .05rem .45rem; font-weight: 700; }
@media print { .stat-period, .seg, .stat-gaps label, .back { display: none !important; } .stat-wrap { box-shadow: none; } }
.ar-help { color: var(--brass-ink); font-weight: 700; font-size: .8rem; }
/* Kontraste Probenpräsenz */
.att-pct.low { color: #9E2A23; }
.att-pct.good { color: #1F6B40; }
@media (prefers-color-scheme: dark) { .att-pct.low { color: #FF9A92; } .att-pct.good { color: #8FE0AE; } }
.evi.cancelled .evi-top, .evi.cancelled .evi-place, .evi.cancelled .evi-date { opacity: 1; color: var(--muted); }
.evi.cancelled .evi-date b { color: var(--muted); }

/* ---------- Übersicht: Antwort neben dem Datum -------------------- */
.ne-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.ne-head .ne-when { margin: 0; flex: 1 1 12rem; }
.ne-head .att-btns { flex: none; }

/* ---------- Probe-Detail: Präsenzliste aufklappbar --------------- */
.pres-details > summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; list-style: none; padding: .2rem 0; }
.pres-details > summary::-webkit-details-marker { display: none; }
.pres-details > summary .pd-sum-title { font: 600 1.35rem/1.2 var(--f-display); }
.pres-details > summary .pd-sum-title::before { content: '▸ '; color: var(--muted); }
.pres-details[open] > summary .pd-sum-title::before { content: '▾ '; }

/* ---------- Sitzordnung mit Präsenzfarben ------------------------- */
.seat.pa > circle:first-of-type { stroke-width: 3; stroke-dasharray: none; }
.seat.pa-yes > circle:first-of-type { fill: #CDEFD9; stroke: #1F7A45; }
.seat.pa-no > circle:first-of-type { fill: #F8CFCB; stroke: #B3261E; }
.seat.pa-maybe > circle:first-of-type { fill: #FBE7B0; stroke: #A87400; }
.seat.pa-none > circle:first-of-type { fill: #FFFFFF; stroke: #9AA3AF; }
.seat.pa-na > circle:first-of-type { fill: #E9ECF0; stroke: #C5CBD3; }
.seat.pa .seat-ini { fill: #18202D; }
.seat.pa-na .seat-ini, .seat.pa-na .seat-name { opacity: .55; }
.pa-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .5rem; font-size: .82rem; color: var(--muted); }
.pa-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.pa-legend i { width: .85rem; height: .85rem; border-radius: 50%; border: 2px solid; display: inline-block; }
.pa-legend .pa-yes { background: #CDEFD9; border-color: #1F7A45; }
.pa-legend .pa-no { background: #F8CFCB; border-color: #B3261E; }
.pa-legend .pa-maybe { background: #FBE7B0; border-color: #A87400; }
.pa-legend .pa-none { background: #FFFFFF; border-color: #9AA3AF; }
.pa-legend .pa-na { background: #E9ECF0; border-color: #C5CBD3; }

/* ---------- Auswertung: Spaltentitel über den Zahlen ------------- */
.stat-table th.num { text-align: right; }

/* ---------- Dirigent bei der Probe -------------------------------- */
.cond-line { margin: .1rem 0 .5rem; font-size: .9rem; }
.cond-line b { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: .35rem; }
.cond-att { font-weight: 700; }
.cond-att.cond-yes { color: var(--ok); }
.cond-att.cond-no { color: #9E2A23; }
.cond-att.cond-maybe { color: #8A5E00; }
.cond-att.cond-open { color: var(--muted); font-weight: 400; }
@media (prefers-color-scheme: dark) { .cond-att.cond-no { color: #FF9A92; } .cond-att.cond-maybe { color: #FFD27A; } .cond-att.cond-yes { color: #8FE0AE; } }
.cond-no-text { color: var(--bad); }

/* ---------- Terminliste kompakt: Knöpfe oben, Text darunter breit -- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evi.evi2 { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr) auto; grid-template-areas: "date top att" "date body body"; column-gap: .65rem; row-gap: .2rem; align-items: center; }
.evi2 .evi-date { grid-area: date; align-self: start; color: inherit; text-decoration: none; }
.evi2 .evi-top { grid-area: top; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; color: var(--ink); text-decoration: none; min-width: 0; }
.evi2 .evi-att { grid-area: att; }
.evi2 .evi-body { grid-area: body; display: grid; gap: .05rem; color: var(--ink); text-decoration: none; font-size: .9rem; min-width: 0; }
.evi2 .evi-body .evi-place { color: var(--ink); }
.evi2 .evi-body .evi-note { color: var(--muted); }
.evi2 .att-pct { margin-left: 0; }
@media (max-width: 420px) { .evi2 .att-btn { min-width: 2rem; height: 2rem; } .evi2 .att-btns { gap: .2rem; } }
.evi.evi2.cancelled .evi-top { text-decoration: line-through; color: var(--muted); }
.evi2 .evi-place .att-pct { margin-right: .3rem; vertical-align: 1px; }
/* Aushilfen mit App */
.app-badge { font-size: .68rem; font-weight: 700; color: #fff; background: var(--navy-2, #3B5B92); border-radius: 999px; padding: .05rem .45rem; margin-left: .35rem; vertical-align: 2px; }
.radio span { display: grid; }
.radio span small { color: var(--muted); font-size: .8rem; }
.group-title small { font-weight: 400; color: var(--muted); font-size: .78rem; margin-left: .3rem; }
/* Inaktive */
.app-badge.off { background: var(--line); color: var(--ink); }
.inactive-list li { display: grid; gap: .3rem; padding-bottom: .5rem; }
.inactive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding-left: 3rem; }
.muted-av { background: var(--line-soft); color: var(--muted); }

/* ---------- Vakanz pro Register --------------------------------- */
.seat-vacant > circle:first-of-type { fill: var(--line-soft); fill: color-mix(in srgb, var(--sc) 12%, var(--card)); stroke: var(--sc); stroke-width: 2.5; stroke-dasharray: 4 4; }
.seat-vacant .seat-name { fill: var(--muted); font-style: italic; }
.cast-col li.cast-vac { color: var(--muted); font-style: italic; }
.vac-tag { color: var(--brass-ink); font-weight: 700; }
.pick-vac { border-style: dashed; }

/* ---------- Einführung ------------------------------------------- */
#tour { position: fixed; inset: 0; z-index: 2000; overflow: hidden; }
.tour-mask { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; }
.tour-dim { fill: rgba(10, 16, 28, .58); }
.tour-tab { fill: none; stroke: var(--brass); stroke-width: 3; animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tour-tab { animation: none; } }
.tour-arrow { fill: none; stroke: var(--brass); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; }
.tour-ah { fill: var(--brass); }
.tour-spot { position: absolute; border-radius: 12px; outline: 3px solid var(--brass); outline-offset: 2px; pointer-events: none; }
.tour-here { position: absolute; background: var(--brass); color: #1C1406; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .55rem; white-space: nowrap; pointer-events: none; }
.tour-bubble { position: absolute; background: var(--card); color: var(--ink); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); padding: .8rem .95rem .85rem; max-width: calc(100vw - 24px); }
.tour-bubble h3 { font: 600 1.3rem/1.2 var(--f-display); margin: .1rem 0 .35rem; }
.tour-bubble p { margin: 0 0 .7rem; font-size: .95rem; line-height: 1.45; }
.tour-head { display: flex; justify-content: space-between; align-items: center; }
.tour-count { font-size: .75rem; font-weight: 700; color: var(--muted); }
.tour-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: .2rem; }
.tour-x svg { width: 1.1rem; height: 1.1rem; display: block; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tour-right { display: flex; align-items: center; gap: .9rem; }
button.menu-row { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }

/* ---------- Hilfe & Support ------------------------------------- */
.faq-search { width: 100%; margin: .2rem 0 .6rem; }
.faq-list { display: grid; gap: .4rem; }
.faq { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .55rem .8rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: .5rem 0; }
.faq .btn { margin-top: .1rem; }
.sup-inbox-link { display: block; text-decoration: none; margin-bottom: .6rem; }
.sup-row .row-main { flex: 1; }
.sup-row.unread { border-left: 4px solid var(--brass); padding-left: .55rem; }
.sup-row.unread strong { font-weight: 800; }
.sup-status { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .1rem .5rem; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.sup-status.st-neu { background: var(--brass-soft); color: var(--brass-ink); }
.sup-status.st-erledigt { background: var(--ok-soft); color: #1F6B40; }
@media (prefers-color-scheme: dark) { .sup-status.st-erledigt { color: #8FE0AE; } }
.sup-badge { color: var(--brass-ink); }
.chat { display: grid; gap: .55rem; margin: .8rem 0 1rem; }
.msg { max-width: 85%; border-radius: 14px; padding: .55rem .75rem; box-shadow: var(--shadow); background: var(--card); }
.msg.mine { justify-self: end; background: var(--primary); color: var(--primary-ink); }
.msg.mine .msg-head { color: var(--primary-ink); opacity: .8; }
.msg-head { font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: .2rem; }
.msg-body { white-space: normal; overflow-wrap: anywhere; }
.msg-img { display: block; max-width: 100%; max-height: 18rem; border-radius: 8px; margin-top: .4rem; }
.chat-form { display: grid; gap: .5rem; }
.sup-img-pick { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sup-img-pick img { max-height: 5rem; border-radius: 6px; box-shadow: var(--shadow); }

/* ---------- App installieren ------------------------------------ */
.install-card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: .75rem .9rem; border-left: 4px solid var(--primary); }
.install-in { display: flex; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.install-ico { width: 2.6rem; height: 2.6rem; border-radius: 10px; flex: none; }
.install-txt { display: grid; }
.install-txt small { color: var(--muted); font-size: .85rem; }
.install-steps { display: grid; gap: .6rem; padding-left: 1.2rem; margin: .4rem 0 .8rem; }
.install-steps small { display: block; color: var(--muted); font-size: .8rem; }
.inline-ico { width: 1.2em; height: 1.2em; vertical-align: -.2em; color: var(--primary); }

/* ---------- Land & Begriffe, Rechtliches ------------------------ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.terms-preview { margin: .4rem 0 .8rem; font-size: .8rem; color: var(--muted); }
.tp-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin-top: .3rem; max-width: 24rem; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .45rem .2rem; }
.tp-bar span { text-align: center; font-size: .68rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.tp-bar span.on { color: var(--ink); }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legal h3 { font-size: 1rem; margin: 1rem 0 .3rem; font-family: inherit; font-weight: 800; }
.legal p, .legal li { line-height: 1.5; }

/* ---------- Einrichtung und Import ------------------------------- */
.setup-steps { display: flex; gap: .3rem; list-style: none; padding: 0; margin: .2rem 0 .9rem; counter-reset: st; flex-wrap: wrap; }
.setup-steps li { counter-increment: st; font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--line-soft); border-radius: 999px; padding: .2rem .65rem; }
.setup-steps li::before { content: counter(st) ". "; }
.setup-steps li.on { background: var(--primary); color: var(--primary-ink); }
.setup-steps li.done { background: var(--ok-soft); color: #1F6B40; }
.setup-nav { margin-top: .8rem; align-items: center; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .2rem .8rem; margin: .4rem 0 .6rem; }
.setup-card { border-left-color: var(--brass); }
.imp-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.imp-table th, .imp-table td { text-align: left; padding: .3rem .45rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.imp-table tr.bad td { background: var(--bad-soft); }
.imp-table tr.dup td { color: var(--muted); }
.warn-text { color: var(--bad); }

/* ---------- Fehlerprotokoll, Verein löschen ---------------------- */
.err-list { display: grid; gap: .5rem; }
.err-item { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .6rem .8rem; display: grid; gap: .25rem; }
.err-item.unread { border-left: 4px solid var(--bad); }
.err-head { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; }
.err-head strong { overflow-wrap: anywhere; }
.err-item small { color: var(--muted); }
.err-stack { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; background: var(--line-soft); padding: .5rem; border-radius: 6px; }
.danger-zone { border-top: 1px solid var(--line); margin-top: 1.5rem; }

/* ---------- Verzeichnis und Ausleihe ----------------------------- */
.dir-row { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.dir-row .row-main small { display: block; }
.loan-list { display: grid; gap: .5rem; }
.loan-item { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: .6rem .8rem; display: grid; gap: .4rem; }
.loan-item .row-main small { display: block; color: var(--muted); }
.loan-item.overdue { border-left: 4px solid var(--bad); }

/* Adresse: PLZ schmal, Ort breit */
.addr-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0 .75rem; }

/* ---------- Registerfarben: 30er-Raster ------------------------- */
fieldset.color-set { min-width: 0; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .4rem; max-width: min(28rem, 100%); }
.color-grid label { cursor: pointer; display: flex; justify-content: center; }
.color-grid input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-grid span { position: relative; display: block; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 3px solid transparent; }
.color-grid input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--card); }
.color-grid input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.color-grid span i { position: absolute; right: -2px; bottom: -2px; width: .8rem; height: .8rem; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
