/* Farben kommen aus verein.json ("farben"); der Bauschritt setzt sie hier ein. */
:root{--olive:#19233c;--olive-deep:#111b32;--green:#c4d7ff;--gold:#d2ad58;--bg:#f1f3f9;--surface:#ffffff;--surface-2:#eaf0fb;--text:#1a2540;--muted:#66728c;--line:#e2e7f1;--accent:#405f99;--accent-text:#ffffff;--focus:#b4934f;--warn-bg:#fff3d6;--warn:#6b4e00;--missing:#8a94aa;--bar:linear-gradient(90deg,#405f99,#7695cc 55%,#d2ad58);--bar-partial:#d2ad58;--bar-track:#e2e7f1;--bar-line:#aebfdf;--grad:linear-gradient(90deg,var(--green),var(--gold));--radius:8px;--shadow:0 1px 2px rgba(26,37,64,.08),0 6px 20px rgba(36,55,88,.08);color-scheme:light;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--olive:#111b32;--bg:#0b1220;--surface:#172237;--surface-2:#1f2d48;--text:#e8edf5;--muted:#acbad2;--line:#354460;--accent:#7695cc;--accent-text:#0b1220;--focus:#d7b66d;--warn-bg:#3b3418;--warn:#e4c887;--missing:#8592ab;--bar:linear-gradient(90deg,#5076ba,#7695cc 55%,#e4c887);--bar-partial:#e4c887;--bar-track:#121d35;--bar-line:#516786;--shadow:0 1px 2px rgba(0,0,0,.45);color-scheme:dark;}}
:root[data-theme="dark"]{--olive:#111b32;--bg:#0b1220;--surface:#172237;--surface-2:#1f2d48;--text:#e8edf5;--muted:#acbad2;--line:#354460;--accent:#7695cc;--accent-text:#0b1220;--focus:#d7b66d;--warn-bg:#3b3418;--warn:#e4c887;--missing:#8592ab;--bar:linear-gradient(90deg,#5076ba,#7695cc 55%,#e4c887);--bar-partial:#e4c887;--bar-track:#121d35;--bar-line:#516786;--shadow:0 1px 2px rgba(0,0,0,.45);color-scheme:dark;}
* {
  box-sizing: border-box;
}
/* "hidden" must always win, also over button/link display rules below (e.g. the admin-only buttons). */
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}
p {
  margin: 0.3em 0;
}
a {
  color: var(--accent);
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.muted {
  color: var(--muted);
}
.eyebrow,
.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}

/* Kopf */
.header {
  background: var(--olive);
  color: #f4f2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px max(16px, calc((100vw - 1200px) / 2));
  flex-wrap: wrap;
  border-bottom: 4px solid transparent;
  border-image: var(--grad) 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand img {
  width: 96px;
  height: auto;
  display: block;
}
.brand .kicker {
  color: var(--green);
}
.brand h1 {
  font-size: 1.9rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.motto {
  color: #d8dcc6;
  font-size: 0.95rem;
}
.user {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 2px 0;
  max-width: 360px;
  font-size: 0.9rem;
  text-align: right;
}
/* Three lines: name / role and instruments / sign-out; role and instruments share a line and wrap when long. */
#user-name,
.user-fuss {
  flex: 1 0 100%;
}
/* Sign-out with the version next to it */
.user-fuss {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 10px;
}
.kopf-version {
  font-size: 0.75rem;
  color: #d8dcc6;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
#user-role {
  flex: 0 1 auto;
}
#user-role:not(:empty) + #user-instrument:not([hidden])::before {
  content: '·';
  margin: 0 0.35em;
  color: #d8dcc6;
}
.user span {
  color: #d8dcc6;
}
#user-instrument {
  font-size: 0.85rem;
  flex: 0 1 auto;
  text-align: right;
}
#user-instrument.mehr {
  cursor: pointer;
  text-decoration: underline dotted;
}
.user a {
  color: var(--gold);
}

/* Aktionen */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  max-width: 1232px;
  margin: 0 auto;
}
button,
.button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
button:hover:not(:disabled),
.button:hover {
  border-color: var(--accent);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}
select,
input[type='search'],
input[type='text'],
input:not([type]),
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

/* Fortschritt */
.progress-card {
  max-width: 1200px;
  margin: 0 auto 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr minmax(160px, 320px);
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow);
}
@media (max-width: 760px) {
  .progress-card {
    margin: 0 16px 8px;
    grid-template-columns: 1fr;
  }
}
.progress-card h2 {
  font-size: 1.25rem;
  margin: 0.2em 0;
}
.meter {
  height: 16px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
  border: 1px solid var(--bar-line);
}
.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--bar);
  transition: width 0.6s;
}

/* Aufteilung */
.layout {
  max-width: 1232px;
  margin: 0 auto;
  padding: 8px 16px 120px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 24px;
}
@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
aside {
  align-self: start;
  position: sticky;
  top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 860px) {
  aside {
    position: static;
  }
}
/* Desktop: the sticky sidebar scrolls on its own when it is taller than the window (room left for the download bar). */
@media (min-width: 861px) {
  aside {
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
  }
}
.aside-heading {
  font-weight: 700;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}
.field select,
.field input,
.field textarea {
  font-weight: 400;
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.95rem;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--olive);
}
.piece-einordnung {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 12px 0 0;
}
.piece-einordnung summary {
  cursor: pointer;
}
.piece-einordnung[open] summary {
  margin-bottom: 8px;
}
.piece-einordnung-liste {
  max-height: 300px;
  overflow-y: auto;
}
.piece-einordnung-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}
.piece-einordnung-gruppe {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}
.piece-einordnung .unten {
  padding-left: 24px;
  font-size: 0.88rem;
}
.piece-ablage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 10px;
}
.views {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.views .group {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 10px 0 2px;
}
.views button {
  border: 0;
  border-radius: 6px;
  justify-content: space-between;
  text-align: left;
  padding: 7px 10px;
  min-height: 36px;
  background: transparent;
  width: 100%;
}
.views button.sub {
  padding-left: 26px;
  font-size: 0.93rem;
}
.views button.sub span:first-child::before {
  content: '↳ ';
  color: var(--muted);
}
.views button[aria-checked='true'] {
  background: var(--olive);
  color: #f4f2e6;
}
.views button[aria-checked='true'] .n {
  color: var(--gold);
}
/* Unselected entries (Noten, Einordnung): a subtle hover */
.views button[aria-checked='false']:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.views button.prog-farbe[aria-checked='false']:hover:not(:disabled) {
  background: color-mix(in srgb, var(--prog) 20%, transparent);
}
.views .n {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 860px) {
  .views {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .views .group {
    width: 100%;
  }
  .views button,
  .views button.sub {
    width: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
  }
  .views button.sub span:first-child::before {
    content: '';
  }
}

/* Liste */
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.heading h2 {
  font-size: 1.6rem;
}
/* A37 (Runde 20): Text mittig, auch wenn der Knopf höher ist als der Text (Mindesthöhe 44 bei Touch). */
.document {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 600;
  background: var(--surface);
}
input[type='search'] {
  width: 100%;
  margin: 4px 0 10px;
  padding: 11px 12px;
  font-size: 1rem;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}
/* Filterleiste über der Liste: alle Filter an einer Stelle, als Schaltflächen mit Anzahl */
.filterbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 0 0 10px;
}
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.filter-label {
  flex: none;
  width: 58px;
  padding-top: 7px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--accent);
}
.chip .n {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chip.on {
  background: var(--olive);
  border-color: var(--olive);
  color: #f4f2e6;
}
.chip.on .n {
  color: var(--gold);
}
.chip input[type='checkbox'] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--gold);
}
.chip-select select {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 2px 0;
  font: inherit;
  max-width: 200px;
  cursor: pointer;
}
.chip-select.on select option {
  color: initial;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.active-filters .filter-label {
  padding-top: 0;
  width: auto;
  margin-right: 4px;
}
.chip.remove {
  font-size: 0.82rem;
  min-height: 28px;
  padding: 2px 10px;
}
.chip.remove span:last-child {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.8;
}
.link-button {
  border: 0;
  background: none;
  min-height: 28px;
  padding: 2px 6px;
  color: var(--accent);
  text-decoration: underline;
  font-size: 0.85rem;
}
main,
.filterbar,
.filter-row {
  min-width: 0;
}
.filter-row > .chips {
  min-width: 0;
}
@media (max-width: 600px) {
  .filter-row {
    flex-direction: column;
    gap: 4px;
  }
  .filter-label {
    padding-top: 0;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
}
.status {
  color: var(--muted);
}
.status:empty {
  display: none;
}
.sync-status {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 6px 0;
}
.scores {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.score {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 2.4rem 1fr;
  gap: 4px 10px;
  align-items: start;
  box-shadow: var(--shadow);
}
.score.missing {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
}
.score .pick {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  accent-color: var(--olive);
}
.score .nr {
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-top: 1px;
}
.score h3 {
  font-size: 1.08rem;
}
.score.missing h3 {
  color: var(--missing);
}
.meta {
  font-size: 0.9rem;
  color: var(--muted);
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.tag {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 1px 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tag.missing {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: transparent;
}
.parts {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.part {
  font-size: 0.82rem;
  padding: 3px 10px;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.part:hover {
  border-color: var(--accent);
}
.part.mine {
  background: var(--olive);
  color: #f4f2e6;
  border-color: var(--olive);
}
.part::before {
  content: '↓';
  font-weight: 700;
}
.parts.eingeklappt {
  max-height: 30px;
  overflow: hidden;
}
.parts-toggle {
  grid-column: 3;
  justify-self: start;
  margin-top: 4px;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: var(--link, var(--accent));
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.parts-toggle:hover {
  text-decoration: underline;
}
.more-parts summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--link, var(--accent));
  margin-top: 6px;
}
.views-mehr {
  display: block;
  width: 100%;
  text-align: left;
  margin: 2px 0 4px;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: var(--link, var(--accent));
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.views-mehr:hover {
  text-decoration: underline;
}
.voice-group.eigene > .voice-head .voice > span:not(.n) {
  font-weight: 700;
}
.voice-group.eigene > .voice-head .voice > span:not(.n)::after {
  content: ' ★';
  color: var(--accent);
}
.voices {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.voices legend {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.voice {
  justify-content: space-between;
  padding: 3px 4px;
  border-radius: 8px;
}
.voice span:first-of-type {
  flex: 1;
}
.voice .n {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.voice.none span {
  color: var(--missing);
}
.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.voice-actions button {
  min-height: 30px;
  padding: 2px 12px;
  font-size: 0.85rem;
}
.part.missing {
  background: transparent;
  border-style: dashed;
  color: var(--missing);
  cursor: default;
}
.part.missing::before {
  content: '–';
}
.upload-missing {
  grid-column: 3;
  justify-self: start;
  margin-top: 6px;
  font-size: 0.88rem;
  min-height: 34px;
  padding: 4px 12px;
}
.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* Download-Leiste */
.download-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 3px solid transparent;
  border-image: var(--grad) 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px max(16px, calc((100vw - 1200px) / 2));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.download-bar p {
  margin: 0;
  font-size: 0.85rem;
}
.check.download-watermark {
  min-height: 44px;
  font-size: 0.85rem;
}
.download-watermark input {
  flex-shrink: 0;
}
#download-options-title {
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .download-bar:has(.download-watermark:not([hidden])) {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
}
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 100px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Dialoge */
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
dialog::backdrop {
  background: rgba(30, 34, 24, 0.55);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
/* V-A7: ✕ in every window the same size and round – a long title no longer squeezes it (was 35–40 wide). */
.dialog-heading button {
  flex: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  justify-content: center;
  padding: 0;
  font-size: 1.3rem;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}
/* Speichern/Hochladen bleiben beim Blättern in langen Fenstern unten sichtbar. */
dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--surface);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 12px -8px rgba(0, 0, 0, 0.18);
}
dialog .dialog-actions.oben {
  position: static;
  border-top: 0;
  box-shadow: none;
  justify-content: space-between;
  flex-wrap: wrap;
}
.dialog-actions.wrap {
  flex-wrap: wrap;
}
.pdf-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 6px;
}
.pdf-actions > * {
  justify-content: center;
  min-height: 48px;
}
#pdf-name {
  word-break: break-word;
}
.note {
  font-size: 0.85rem;
  color: var(--muted);
}
.steps {
  padding-left: 1.2em;
}
.steps li {
  margin-bottom: 8px;
}
.steps p {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tabs [aria-selected='true'] {
  background: var(--olive);
  color: #f4f2e6;
  border-color: var(--olive);
}
#submission-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#submission-optional {
  display: flex;
  flex-direction: column;
}
#submission-optional .field {
  margin-top: 8px;
}
#submission-files {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
}
#submission-files li.current {
  font-weight: 700;
}
/* V-A9: ✕ je Datei, um sie vor dem Senden wieder herauszunehmen. A35: alle ✕ bündig rechts untereinander – der Name
   nimmt die Breite bis davor ein (die Zeile bleibt ein Listenpunkt, damit ✓ und ▸ beim Senden davor stehen). */
#submission-files li:has(.datei-weg) > span {
  display: inline-block;
  width: calc(100% - 56px);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
#submission-files .datei-weg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin-left: 6px;
  padding: 0;
  border-radius: 50%;
  vertical-align: middle;
  font-size: 0.9rem;
}
#submission-files li.done {
  color: var(--muted);
}
#submission-files li.done::marker {
  content: '✓  ';
}
#submission-files li.current::marker {
  content: '▸  ';
}
.upload-progress {
  display: grid;
  gap: 6px;
}
.upload-progress p {
  margin: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.upload-progress .meter span {
  transition: width 0.2s;
}
.upload-progress.saving .meter span {
  animation: upload-pulse 1.2s ease-in-out infinite;
}
@keyframes upload-pulse {
  50% {
    opacity: 0.55;
  }
}
@media (prefers-reduced-motion: reduce) {
  .upload-progress.saving .meter span {
    animation: none;
  }
}

.jobs-heading {
  font-size: 1rem;
  margin-top: 8px;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: var(--olive);
}
.backup-packages {
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.backup-packages li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .actions {
    flex-wrap: wrap;
    padding-bottom: 6px;
  }
  .actions > * {
    flex: none;
    font-size: 0.9rem;
    min-height: 38px;
    padding: 6px 12px;
  }
  .header {
    padding: 10px 16px;
  }
  .user {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 10px;
    width: 100%;
  }
  .brand img {
    width: 70px;
  }
  .brand h1 {
    font-size: 1.5rem;
  }
  .motto {
    display: none;
  }
  .user {
    align-items: flex-start;
  }
  .score {
    grid-template-columns: auto 1fr;
  }
  .score .nr {
    display: none;
  }
  .parts,
  .parts-toggle,
  .parts-one,
  .upload-missing {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* Fortschritt: vollständig (Verlauf) und teilweise (gestreift), darunter pro Instrument */
.meter {
  display: flex;
}
/* A18: the gaps between the stripes are tinted (not see-through), so „teilweise“ stands out on a light track too. */
.meter .partial {
  background: repeating-linear-gradient(
    45deg,
    var(--bar-partial) 0 6px,
    color-mix(in srgb, var(--bar-partial) 40%, transparent) 6px 12px
  );
  box-shadow: inset 0 0 0 1px var(--bar-line);
  transition: width 0.6s;
}
.instrument-progress {
  grid-column: 1 / -1;
  font-size: 0.92rem;
}
.instrument-progress > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
.progress-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr 4.5rem;
  gap: 10px;
  align-items: center;
  padding: 3px 0;
}
.progress-row .n {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.mini-meter {
  height: 10px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
  border: 1px solid var(--bar-line);
}
.mini-meter span {
  display: block;
  height: 100%;
  background: var(--bar);
}
.progress-group > summary {
  list-style: none;
  cursor: pointer;
}
.progress-group > summary::-webkit-details-marker {
  display: none;
}
.progress-group > summary .progress-row > span:first-child::before {
  content: '▸ ';
  color: var(--muted);
}
.progress-group[open] > summary .progress-row > span:first-child::before {
  content: '▾ ';
}
.progress-group > .progress-row {
  padding-left: 18px;
  font-size: 0.88rem;
}
.voice-group {
  display: flex;
  flex-direction: column;
}
.voice.sub {
  padding-left: 26px;
  font-size: 0.88rem;
}
/* Vollständige Stücke: Band oben rechts im Verlauf der Vereinsfarben, Rahmen in Gold */
.score {
  position: relative;
  overflow: hidden;
}
.score.complete {
  border: 2px solid var(--gold);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--green) 18%, var(--surface)),
    var(--surface) 55%
  );
}
.ribbon {
  position: absolute;
  top: 14px;
  right: -38px;
  transform: rotate(35deg);
  background: var(--grad);
  color: #2c3123;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 4px 44px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
/* Fehlende Hauptstimmen: rot gestrichelt; die eigene fehlende Stimme gold hervorgehoben */
.missing-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.missing-label {
  font-size: 0.85rem;
  color: var(--muted);
}
.fehlt {
  font: inherit;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px dashed #c62828;
  background: #fdecea;
  color: #a61b1b;
  cursor: default;
}
button.fehlt {
  cursor: pointer;
}
button.fehlt:hover {
  border-style: solid;
}
.fehlt.fehlt-meine {
  border: 2px solid #b8860b;
  background: var(--gold);
  color: #3b2a00;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .fehlt:not(.fehlt-meine) {
    background: #3a1716;
    color: #ff9e97;
    border-color: #e57373;
  }
}
:root[data-theme='dark'] .fehlt:not(.fehlt-meine) {
  background: #3a1716;
  color: #ff9e97;
  border-color: #e57373;
}
.tag.partial {
  background: color-mix(in srgb, var(--gold) 35%, var(--surface));
  border-color: transparent;
}
.submission-summary {
  font-weight: 700;
  margin: 2px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-2);
}
.submission-summary.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
/* Unvollständige Stücke: Anteil der Hauptstimmen rechts oben */
/* Probenbedarf für Mitglieder: schräges Band wie „Komplett“, darunter; ohne Komplett-Band unter der Prozentanzeige */
.probe-band {
  position: absolute;
  top: 40px;
  right: -22px;
  transform: rotate(35deg);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 3px 40px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  white-space: nowrap;
}
.probe-band.allein {
  top: 66px;
  right: -36px;
}
.probe-band.oben {
  top: 14px;
  right: -38px;
  padding: 4px 44px;
}
.probe-laeuft {
  background: #2e7d32;
  color: #fff;
}
.probe-gering {
  background: #c8e6c9;
  color: #1b5e20;
}
.probe-mittel {
  background: #ffe9a3;
  color: #6b4e00;
}
.probe-hoch {
  background: #c62828;
  color: #fff;
}
.percent {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid var(--gold);
  background: var(--surface);
  line-height: 1.1;
}
.percent strong {
  font-size: 1.15rem;
  color: var(--accent);
}
.percent small {
  font-size: 0.7rem;
  color: var(--muted);
}
@media (max-width: 600px) {
  .percent {
    top: 8px;
    right: 8px;
    min-width: 54px;
    padding: 3px 8px;
  }
  .percent strong {
    font-size: 1rem;
  }
}
/* Handy: Auswahlbereich einklappbar, auf dem Computer immer offen */
.aside-toggle,
.aside-done {
  display: none;
}
@media (max-width: 860px) {
  .aside-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: var(--surface-2);
    padding: 10px 12px;
    text-align: left;
  }
  .aside-toggle > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .aside-toggle small {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aside-toggle .chevron {
    font-size: 1.2rem;
    transition: transform 0.2s;
  }
  aside:not(.collapsed) .chevron {
    transform: rotate(180deg);
  }
  aside.collapsed .aside-body {
    display: none;
  }
  aside:not(.collapsed) .aside-toggle small {
    display: none;
  }
  .aside-body > .aside-heading {
    display: none;
  }
  .aside-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .aside-done {
    display: inline-flex;
    justify-content: center;
  }
}
@media (min-width: 861px) {
  .aside-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}
/* "Noten hochladen" soll auffallen: Blau mit schrägem Glanzstreifen, passt zum Oliv als Kontrast */
#submit-score {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  background:
    linear-gradient(
      115deg,
      transparent 0 38%,
      rgba(255, 255, 255, 0.28) 38% 46%,
      transparent 46% 54%,
      rgba(255, 255, 255, 0.14) 54% 58%,
      transparent 58%
    ),
    linear-gradient(135deg, #1f5fa8, #3b8ee0);
  box-shadow: 0 2px 10px rgba(31, 95, 168, 0.35);
}
#submit-score:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(31, 95, 168, 0.45);
}
#submit-score:focus-visible {
  outline-color: #ffdc94;
}
.upload-missing {
  border-color: #3b8ee0;
  color: #1f5fa8;
  font-weight: 600;
}
:root[data-theme='dark'] .upload-missing {
  color: #8cc2f5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .upload-missing {
    color: #8cc2f5;
  }
}
/* Meine Einreichungen */
#history-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-entry {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-entry .note {
  margin: 0;
  overflow-wrap: anywhere;
}
.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.history-when {
  font-size: 0.85rem;
  color: var(--muted);
}
.history-state {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid var(--line);
}
.history-state.state-geprüft {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: transparent;
}
.history-state.state-bearbeitet,
.history-state.state-einsortiert {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
.history-state.state-abgelehnt {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: transparent;
}
.history-pieces {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}
.history-pieces li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.tag.rel-nachreichung {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
.tag.rel-neu,
.tag.rel-unklar {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: transparent;
}
#submission-files li.not-pdf {
  color: var(--warn);
}
.sort {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.9rem;
}
.sort select {
  padding: 5px 8px;
}
/* Upload-Dialog in Blau, passend zum Knopf "Noten hochladen". Die Farben gelten nur hier, alle anderen Dialoge bleiben grün/creme. */
.dialog--upload {
  --upload-accent: #1f5fa8;
  --upload-accent-hover: #174a85;
  --upload-surface: #eef4ff;
  --upload-surface-2: #dde8fb;
  --upload-border: #6f8cbf;
  --upload-text: #10203a;
  --upload-muted: #3f5478;
  --upload-on-accent: #fff;
  --upload-heading: #1f5fa8;
  --upload-focus: #1f5fa8;
  --surface: var(--upload-surface);
  --surface-2: var(--upload-surface-2);
  --line: var(--upload-border);
  --text: var(--upload-text);
  --muted: var(--upload-muted);
  --accent: var(--upload-accent);
  --accent-text: var(--upload-on-accent);
  --focus: var(--upload-focus);
  --bar: linear-gradient(90deg, #1f5fa8, #3b8ee0);
  --bar-track: #cfdcf3;
  --bar-line: #6f8cbf;
  border-color: var(--upload-border);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .dialog--upload {
    --upload-accent: #4c8dff;
    --upload-accent-hover: #6ea3ff;
    --upload-surface: #0f1e36;
    --upload-surface-2: #172a4a;
    --upload-border: #5878aa;
    --upload-text: #e6eeff;
    --upload-muted: #a9bbdd;
    --upload-on-accent: #081326;
    --upload-heading: #8cc2f5;
    --upload-focus: #8cc2f5;
    --bar: linear-gradient(90deg, #4c8dff, #8cc2f5);
    --bar-track: #0a1528;
    --bar-line: #5878aa;
  }
}
:root[data-theme='dark'] .dialog--upload {
  --upload-accent: #4c8dff;
  --upload-accent-hover: #6ea3ff;
  --upload-surface: #0f1e36;
  --upload-surface-2: #172a4a;
  --upload-border: #5878aa;
  --upload-text: #e6eeff;
  --upload-muted: #a9bbdd;
  --upload-on-accent: #081326;
  --upload-heading: #8cc2f5;
  --upload-focus: #8cc2f5;
  --bar: linear-gradient(90deg, #4c8dff, #8cc2f5);
  --bar-track: #0a1528;
  --bar-line: #5878aa;
}
/* A35 (Runde 20): Titel und ✕ wie in allen anderen Fenstern (V-A7), nicht blau. */
.dialog--upload h2 {
  color: var(--text);
}
.dialog--upload .primary {
  background: var(--upload-accent);
  border-color: var(--upload-accent);
  color: var(--upload-on-accent);
}
.dialog--upload .primary:hover:not(:disabled) {
  background: var(--upload-accent-hover);
  border-color: var(--upload-accent-hover);
}
.dialog--upload button:not(.primary) {
  border-color: var(--upload-accent);
  background: transparent;
}
.dialog--upload .dialog-heading button {
  border-color: var(--line);
}
.dialog--upload summary {
  color: var(--upload-heading);
  cursor: pointer;
  font-weight: 600;
}
.dialog--upload input,
.dialog--upload textarea {
  background: var(--upload-surface-2);
  border-color: var(--upload-border);
}
.dialog--upload #submission-result {
  font-weight: 600;
}
/* Großer Knopf statt des kleinen Browser-Dateifelds; das Feld selbst bleibt für Tastatur und Pflichtprüfung erreichbar. */
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 2px dashed var(--upload-accent);
  border-radius: 14px;
  background: var(--upload-surface-2);
  color: var(--upload-heading);
  font-weight: 700;
  cursor: pointer;
}
.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.file-pick:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.file-pick:hover {
  border-style: solid;
}
/* Lange Texte: normale Ecken statt Pillenform, damit nichts abgeschnitten wird. */
.history-pieces .tag {
  border-radius: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#download-file {
  overflow-wrap: anywhere;
  margin: 6px 0 0;
}
/* Badge rechts oben: der ganze Textblock hält Abstand, nicht nur der Titel. */
.score:has(.percent) .score-body {
  padding-right: 84px;
}
.score.complete .score-body {
  padding-right: 90px;
}
@media (max-width: 600px) {
  .score:has(.percent) .score-body {
    padding-right: 68px;
  }
}
/* Probenbedarf-Band: die oberen Zeilen der Karte (Titel, Arrangeur, Hinweis) bleiben frei davon */
.score:has(.probe-band) .score-body > :nth-child(-n + 3) {
  padding-right: 96px;
}
@media (max-width: 600px) {
  .score:has(.probe-band) .score-body > :nth-child(-n + 3) {
    padding-right: 84px;
  }
}
/* Auswählen: Tippfläche mindestens 44 × 44 px */
.pick-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -10px -8px -10px -10px;
  cursor: pointer;
}
.pick-area .pick {
  margin: 0;
}
.pick-area:has(.pick:disabled) {
  cursor: default;
}
/* "Gemeinsam digitalisieren" gehört zum Hochladen: gleiches Blau wie der Knopf "Noten hochladen". */
.progress-card {
  border: 2px solid #3b8ee0;
  box-shadow: none;
}
.progress-card .eyebrow {
  color: #1f5fa8;
}
:root[data-theme='dark'] .progress-card .eyebrow {
  color: #8cc2f5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .progress-card .eyebrow {
    color: #8cc2f5;
  }
}
/* Kontakt */
#contact-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
#contact-message {
  width: 100%;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
}
#contact-dialog .field {
  margin-top: 10px;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  min-height: 0;
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
  display: inline;
}
/* "Mehr"-Menü für selten genutzte Aktionen */
.more-menu > summary {
  list-style: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.more-menu > summary::-webkit-details-marker {
  display: none;
}
.more-menu > summary:hover,
.more-menu[open] > summary {
  border-color: var(--accent);
}
/* „Mehr“ farbig, damit man sieht: Da gibt es noch etwas. */
.more-menu > summary {
  background: var(--gold);
  border-color: #c08a12;
  color: #3a2a00;
  font-weight: 700;
}
.more-menu > summary:hover,
.more-menu[open] > summary {
  background: #ffc94d;
  border-color: #8a6d12;
}
/* V-A4: wartende Einreichungen als kleine Zahl am „Mehr“-Knopf (nur Notenwart und Verwaltung). */
.mehr-zahl {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #3a2a00;
  color: #fff;
  font-size: 0.75rem;
  line-height: 20px;
  text-align: center;
}
.mehr-zahl[hidden] {
  display: none;
}
/* A48: in dark mode the dark badge vanished on the dark page – light badge, dark number (about 13 : 1) */
:root[data-theme='dark'] .mehr-zahl {
  background: #ffdc94;
  color: #3a2a00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .mehr-zahl {
    background: #ffdc94;
    color: #3a2a00;
  }
}
.more-items {
  position: fixed;
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 0 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.22);
}
/* Gruppen mit Trennlinie; die Linie der obersten sichtbaren Gruppe liegt außerhalb und wird abgeschnitten. Leere Gruppen (Rechte) verschwinden. */
.more-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0 2px;
  border-top: 1px solid var(--line);
  margin-top: -1px;
}
.more-group:not(:has(> button:not([hidden]))) {
  display: none;
}
.more-group-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 8px 10px 4px;
}
.more-items button {
  justify-content: flex-start;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  width: 100%;
  min-height: 42px;
  padding: 6px 10px;
  background: transparent;
  text-align: left;
  font-weight: 500;
}
.more-items button:hover:not(:disabled),
.more-items button:focus-visible {
  background: var(--surface-2);
}
.more-items .ico {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    background 0.15s,
    color 0.15s;
}
.more-items button:hover:not(:disabled) .ico,
.more-items button:focus-visible .ico {
  background: var(--accent);
  color: var(--accent-text);
}
.more-items button:disabled {
  opacity: 0.55;
}
@media (max-width: 600px) {
  .actions > .more-menu {
    padding: 0;
  }
  .more-menu > summary {
    font-size: 0.9rem;
    min-height: 38px;
    padding: 6px 12px;
  }
}
/* Fortschritt kompakt: nur Überschrift und Balken, Umschalter oben rechts */
.progress-card {
  position: relative;
  padding-right: 140px;
}
.progress-toggle {
  position: absolute;
  top: 10px;
  right: 12px;
  min-height: 32px;
  padding: 3px 12px;
  font-size: 0.85rem;
}
.progress-card.compact {
  padding-top: 10px;
  padding-bottom: 10px;
}
.progress-card.compact :is(#progress-partial, .progress-intro, .instrument-progress) {
  display: none;
}
.progress-card.compact h2 {
  font-size: 1.05rem;
}
@media (max-width: 760px) {
  .progress-card {
    padding-right: 20px;
  }
  .progress-card .eyebrow {
    padding-right: 130px;
  }
}
/* Gesperrter Download-Knopf im dunklen Design deutlich grau */
#download:disabled {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

/* Anmeldeseite (eigene Anmeldung) */
.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.login-card {
  width: min(440px, calc(100vw - 32px));
  margin: 32px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  flex: 0 0 auto;
}
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-card input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.login-card .primary {
  justify-content: center;
}
.login-page footer {
  margin-top: auto;
  padding-bottom: 24px;
}
.login-status {
  min-height: 1.5em;
  font-weight: 600;
  color: var(--warn);
}

/* Admin-Bereich Mitglieder */
.dialog--wide {
  max-width: min(960px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Portal-Einstellungen: so breit wie das Portal (große Bildschirme), am Handy wie jedes Fenster */
#settings-dialog {
  max-width: min(1200px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.members-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.members-toolbar select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  max-width: 100%;
}
.members-toolbar input {
  flex: 1 1 220px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.members-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
}
.member-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.member-main .muted {
  overflow-wrap: anywhere;
}
.member-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.member-actions button {
  min-height: 36px;
  padding: 4px 12px;
  font-size: 0.9rem;
  white-space: nowrap;
}
/* A3: on narrow screens the buttons wrap one below the other – then all equally wide, not by word length. */
@media (max-width: 600px) {
  .member-actions > button {
    flex: 1 1 auto;
  }
}
/* Platz sparen (Runde 13, K11): on the phone the buttons sit in one row under the member (full width, equally wide) instead of
   one below the other beside the name – nothing moved away. */
@media (max-width: 600px) {
  .member-actions {
    grid-column: 1/-1;
  }
  .member-actions > button {
    flex: 1 1 28%;
  }
  /* K11 (Volker 16.11.2026): on the phone Sperren and Löschen are in the „Bearbeiten“ form, not on every card. */
  .member-actions > .karte-selten {
    display: none;
  }
}
.member-form-selten {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--a2);
}
@media (min-width: 601px) {
  .member-form-selten {
    display: none;
  }
}
.member-form-selten[hidden] {
  display: none;
}
.member-badge {
  font-size: 0.82rem;
  color: var(--muted);
}
.member-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.rollen-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rolle-badge {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}
.rolle-badge.rolle-notenwart {
  border-color: #2a6fb0;
  color: #2a6fb0;
}
.rolle-badge.rolle-verwaltung {
  border-color: #c62828;
  color: #c62828;
}
.rolle-badge.rolle-leitung {
  border-color: #3f8a2a;
  color: #3f8a2a;
}
.rolle-badge.rolle-aushilfe {
  border-color: #c08a12;
  color: #9a6d00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .rolle-badge.rolle-notenwart {
    border-color: #7fb2e5;
    color: #7fb2e5;
  }
  :root:not([data-theme='light']) .rolle-badge.rolle-verwaltung {
    border-color: #ef8a8a;
    color: #ef8a8a;
  }
  :root:not([data-theme='light']) .rolle-badge.rolle-leitung {
    border-color: #8fcf7a;
    color: #8fcf7a;
  }
  :root:not([data-theme='light']) .rolle-badge.rolle-aushilfe {
    border-color: #e0b24a;
    color: #e0b24a;
  }
}
:root[data-theme='dark'] .rolle-badge.rolle-notenwart {
  border-color: #7fb2e5;
  color: #7fb2e5;
}
:root[data-theme='dark'] .rolle-badge.rolle-verwaltung {
  border-color: #ef8a8a;
  color: #ef8a8a;
}
:root[data-theme='dark'] .rolle-badge.rolle-leitung {
  border-color: #8fcf7a;
  color: #8fcf7a;
}
:root[data-theme='dark'] .rolle-badge.rolle-aushilfe {
  border-color: #e0b24a;
  color: #e0b24a;
}
.member.status-gesperrt {
  opacity: 0.7;
}
.member.status-gesperrt .member-badge {
  color: var(--warn);
  font-weight: 700;
}
.member.status-eingeladen .member-badge {
  color: var(--accent);
  font-weight: 600;
}
button.danger {
  border-color: #b3261e;
  color: #b3261e;
}
.member-invite {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 16px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
}
.member-invite input {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.85rem;
}
.member-qr .qr {
  width: 180px;
  height: 180px;
  display: block;
}
.member-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.member-form input,
.member-form select,
.member-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.member-voices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 4px 12px;
}
.members-log {
  font-size: 0.85rem;
  max-height: 240px;
  overflow-y: auto;
}
@media (max-width: 640px) {
  .member-invite {
    grid-template-columns: 1fr;
  }
  .member-qr .qr {
    width: 160px;
    height: 160px;
  }
}
.invite-sheet {
  display: none;
}
@media print {
  body.printing-invites > *:not(.invite-sheet) {
    display: none !important;
  }
  body.printing-invites .invite-sheet {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12mm;
    padding: 8mm;
  }
  .invite-card {
    break-inside: avoid;
    border: 1px dashed #555;
    border-radius: 4mm;
    padding: 6mm;
    text-align: center;
    color: #000;
  }
  .invite-card .qr {
    width: 45mm;
    height: 45mm;
  }
  .invite-card h3 {
    font-size: 12pt;
  }
  .invite-card p {
    font-size: 10pt;
  }
}
/* Mitgliederverwaltung komplett mit leichtem Rotschimmer, damit man sofort sieht: hier werden Zugänge geändert. */
.dialog--admin {
  background: linear-gradient(180deg, rgba(200, 40, 40, 0.13), rgba(200, 40, 40, 0.06)), var(--surface);
  border-color: rgba(190, 50, 50, 0.5);
}
.dialog--admin .member,
.dialog--admin .member-form,
.dialog--admin .member-invite {
  background: rgba(200, 40, 40, 0.06);
}
.dialog--admin .eyebrow {
  color: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .dialog--admin {
    background: linear-gradient(180deg, rgba(230, 80, 80, 0.18), rgba(230, 80, 80, 0.08)), var(--surface);
  }
  :root:not([data-theme='light']) .dialog--admin .eyebrow {
    color: #f2a3a3;
  }
}
:root[data-theme='dark'] .dialog--admin {
  background: linear-gradient(180deg, rgba(230, 80, 80, 0.18), rgba(230, 80, 80, 0.08)), var(--surface);
}
:root[data-theme='dark'] .dialog--admin .eyebrow {
  color: #f2a3a3;
}
.members-sync {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 0.9rem;
}
.members-sync p {
  margin: 0;
  flex: 1 1 260px;
}
.members-sync.sync-fehler {
  border-color: #b3261e;
  color: var(--warn);
  font-weight: 600;
}
/* Einreichungen bearbeiten */
/* Meldungen: läuft (blau), fertig (grün), Fehler (rot) – fett und farbig, im Fenster und groß unten (meldung.js) */
.status--laeuft,
.status--ok,
.status--fehler,
[data-art='ok'],
[data-art='fehler'] {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.02rem;
  margin: 8px 0;
}
.status--laeuft {
  background: #e3efff;
  color: #0d3c78;
  border: 2px solid #2a6fb0;
}
.status--ok,
[data-art='ok'] {
  background: #e4f4dc;
  color: #1f5a12;
  border: 2px solid #3f8a2a;
}
.status--fehler,
[data-art='fehler'] {
  background: #fde3e1;
  color: #8c1d14;
  border: 2px solid #c62828;
}
/* K20: a button inside a red message (e.g. „Neu laden“) – light in both modes, like the message itself */
.status--fehler button {
  background: #fff;
  color: #8c1d14;
  border: 2px solid #c62828;
  font-weight: 700;
  margin-left: 4px;
}
[data-art]:empty {
  display: none;
}
.meldung {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  width: max-content;
  max-width: min(600px, calc(100vw - 32px));
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.meldung--laeuft {
  color: #fff;
  background: #1d5fa8
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 12px, transparent 12px 24px);
  background-size: 34px 34px;
  animation: meldung-lauf 1s linear infinite;
}
.meldung--ok {
  background: #2e7d32;
  color: #fff;
}
.meldung--fehler {
  background: #c62828;
  color: #fff;
}
@keyframes meldung-lauf {
  to {
    background-position: 34px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .meldung--laeuft {
    animation: none;
  }
}
.inbox-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inbox-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(200, 40, 40, 0.06);
}
.inbox-item p {
  margin: 2px 0;
}
/* A47: the button keeps its full width („Bearbeiten“ never cut), the text beside it wraps instead */
.inbox-item > div {
  min-width: 0;
  overflow-wrap: break-word;
}
.inbox-item > button {
  flex: none;
}
.inbox-meta {
  margin: 10px 0;
}
.inbox-meta p {
  margin: 2px 0;
}
.inbox-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
}
.inbox-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.inbox-parts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-part {
  display: grid;
  grid-template-columns: auto minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 2px solid transparent;
  border-left: 8px solid var(--farbe);
  border-radius: 10px;
  padding: 4px 8px;
  background: var(--surface);
}
.inbox-part.aktiv {
  border-color: var(--farbe);
}
.inbox-part input[type='text'] {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.inbox-part input[type='radio'] {
  width: 18px;
  height: 18px;
  accent-color: var(--farbe);
}
.inbox-remove {
  padding: 4px 10px;
}
.inbox-pages {
  margin: 8px 0;
}
.inbox-file {
  font-weight: 600;
  margin: 10px 0 4px;
}
.inbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.inbox-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #222;
  cursor: pointer;
}
.inbox-page canvas {
  width: 100%;
  height: auto;
  display: block;
}
.inbox-page.zugeordnet {
  border-color: var(--farbe);
}
.inbox-page-nr {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 0.8rem;
}
.inbox-page-voice {
  font-size: 0.8rem;
  min-height: 1.2em;
  text-align: center;
  font-weight: 600;
  color: #222;
}
.inbox-check {
  margin: 10px 0;
}
.inbox-check:empty {
  display: none;
}
.inbox-check-list {
  padding-left: 18px;
  margin: 6px 0;
}
.inbox-check-list li {
  margin: 4px 0;
}
.inbox-check-list li.warnung {
  color: var(--warn);
}
.inbox-reject {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
/* Reported problems below the open submissions (kern/meldungen.mjs). */
.inbox-meldungen {
  margin-top: 14px;
}
.inbox-meldungen summary {
  cursor: pointer;
  font-weight: 600;
}
.inbox-item.inbox-erledigt {
  background: none;
  opacity: 0.75;
}
.inbox-multi {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn);
}
.inbox-multi p {
  margin: 0 0 4px;
  font-weight: 600;
}
.inbox-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}
.inbox-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 4px 12px;
  align-items: end;
  border-left: 8px solid var(--farbe);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--surface);
}
.inbox-file-row .inbox-file,
.inbox-file-row .note {
  grid-column: 1/-1;
  margin: 0;
}
.inbox-file-row .note.warnung {
  color: var(--warn);
}
#inbox-work.einzeln
  :is(#inbox-title-field, #inbox-piece-hint, #inbox-parts-heading, .inbox-manual, #inbox-parts),
#inbox-work.einzeln .inbox-page-quick,
#inbox-viewer.einzeln .viewer-foot {
  display: none;
}
@media (max-width: 600px) {
  .inbox-file-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .inbox-part {
    grid-template-columns: auto 1fr auto;
  }
  .inbox-part .inbox-range {
    grid-column: 2/3;
  }
}
/* Stück bearbeiten */
.edit-piece {
  margin-top: 8px;
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px dashed rgba(190, 50, 50, 0.6);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.piece-parts {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.piece-part {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(200, 40, 40, 0.05);
}
.piece-part input,
.piece-add input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.piece-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.piece-add input {
  flex: 1 1 220px;
}
button.danger {
  color: #b3261e;
  border-color: rgba(179, 38, 30, 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) button.danger {
    color: #ff8a80;
    border-color: rgba(255, 138, 128, 0.6);
  }
}
:root[data-theme='dark'] button.danger {
  color: #ff8a80;
  border-color: rgba(255, 138, 128, 0.6);
}
@media (max-width: 600px) {
  .piece-part {
    grid-template-columns: 1fr 1fr;
  }
  .piece-part .stimmwahl {
    grid-column: 1/-1;
  }
}
.piece-part-label {
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.piece-part {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.4fr) auto auto auto auto;
}
.piece-pending {
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 8px 0;
}
.piece-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.piece-preview-head {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.piece-preview-page {
  width: 100%;
  max-width: 700px;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
}
.piece-danger {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(190, 50, 50, 0.5);
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .piece-part {
    grid-template-columns: 1fr 1fr;
  }
  .piece-part .piece-part-label {
    grid-column: 1/-1;
  }
}
/* Speicheranzeige (nur Verwaltung) */
.storage-use {
  grid-column: 1 / -1;
  margin-top: 8px;
  font-size: 0.9rem;
  border: 1px dashed rgba(190, 50, 50, 0.5);
  border-radius: 10px;
  padding: 6px 10px;
}
.storage-use summary {
  cursor: pointer;
}
.storage-use ul {
  margin: 6px 0;
  padding-left: 18px;
}
.storage-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 8px 0;
}
.storage-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.storage-use.storage-warn {
  border-style: solid;
  border-color: #b3261e;
}
.storage-use.storage-warn .storage-meter span {
  background: #c62828;
}
/* Stimmenauswahl: Instrument, Nr., Stimmung, Zusatz */
.stimmwahl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.stimmwahl select,
.stimmwahl input {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.stimmwahl select:first-child {
  flex: 1 1 130px;
}
.stimmwahl input {
  flex: 1 1 120px;
}
.inbox-part {
  grid-template-columns: auto minmax(0, 3fr) minmax(0, 1fr) auto;
}
/* Seitenkacheln: groß ansehen, Eckknopf ordnet direkt zu */
.inbox-page {
  padding: 0;
  cursor: default;
}
.inbox-page-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}
.inbox-page-quick {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-weight: 700;
  cursor: pointer;
}
/* Große Seitenansicht */
.dialog--viewer {
  max-width: min(1200px, calc(100vw - 16px));
  width: 100%;
  height: calc(100dvh - 16px);
  max-height: none;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.dialog--viewer[open] {
  display: flex;
}
.viewer-head {
  display: flex;
  gap: 8px;
  align-items: center;
}
.viewer-head strong {
  flex: 1;
  text-align: center;
}
.viewer-head button {
  min-width: 44px;
  min-height: 40px;
  font-size: 1.3rem;
}
.viewer-page {
  flex: 1;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.viewer-page canvas {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
}
.viewer-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.viewer-label {
  margin: 0;
  font-weight: 600;
}
.viewer-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.inbox-viewer-part {
  border: 2px solid var(--farbe);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.inbox-viewer-part.an {
  background: var(--farbe);
  color: #fff;
  font-weight: 700;
}
.viewer-new {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.viewer-new .stimmwahl {
  flex: 1 1 420px;
}
@media (max-width: 600px) {
  .inbox-part {
    grid-template-columns: auto 1fr auto;
  }
  .inbox-part .inbox-range {
    grid-column: 2/3;
  }
}
.member-roles {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.member-roles legend {
  font-size: 0.9rem;
  padding: 0 4px;
}
.member-form .check input {
  padding: 0;
  margin: 0;
  flex: none;
}
#member-freigabe:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 26px;
}
#member-setlists {
  margin-left: 26px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.member-voices > .muted {
  grid-column: 1/-1;
}
/* Fortschritt der KI direkt unter dem Knopf, gut sichtbar */
.ki-progress {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 8px 0;
  padding: 10px 14px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.ki-progress .meter {
  height: 14px;
}
.ki-progress p {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}
/* Einreichungen: Aktionen oben, manuelle Zuordnung farblich abgesetzt */
.inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 8px 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.inbox-actions .check {
  margin-left: auto;
}
.inbox-manual {
  margin: 12px 0 8px;
  padding: 8px 12px;
  border: 2px dashed #2a6fb0;
  border-radius: 12px;
  background: rgba(42, 111, 176, 0.08);
}
.inbox-manual-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: #2a6fb0;
}
.inbox-manual .inbox-tools {
  margin: 4px 0;
}
.inbox-manual .note {
  margin: 4px 0 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .inbox-manual {
    border-color: #7fb3e6;
    background: rgba(127, 179, 230, 0.1);
  }
  :root:not([data-theme='light']) .inbox-manual-title {
    color: #9cc6ef;
  }
}
:root[data-theme='dark'] .inbox-manual {
  border-color: #7fb3e6;
  background: rgba(127, 179, 230, 0.1);
}
:root[data-theme='dark'] .inbox-manual-title {
  color: #9cc6ef;
}
/* KI-Einstellungen und Guthaben-Zeile */
.ki-guthaben {
  align-self: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ki-switch {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0;
}
.ki-topup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.ki-topup input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  max-width: 140px;
}
.ki-anleitung {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.ki-anleitung summary {
  cursor: pointer;
  font-weight: 700;
}
.ki-anleitung li {
  margin: 4px 0;
}
.backup-all {
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  font-size: 1.05rem;
}
@media (max-width: 600px) {
  .stimmwahl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .stimmwahl select:first-child,
  .stimmwahl input {
    grid-column: 1 / -1;
  }
}
/* Papierkorb */
.bin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  padding: 6px 0;
}
.bin-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bin-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(200, 40, 40, 0.05);
}
.bin-head {
  gap: 10px;
}
.bin-head .muted {
  margin-left: auto;
  font-size: 0.85rem;
}
.bin-entries {
  list-style: none;
  padding: 0 0 0 26px;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bin-entry .check {
  gap: 8px;
  flex-wrap: wrap;
}
.bin-entry .muted {
  font-size: 0.82rem;
}
.bin-name {
  flex: 1 1 200px;
}
/* Stimmen links: Instrument mit Aufklapp-Pfeil für 1., 2., 3. Stimme */
.voice-head {
  display: flex;
  align-items: center;
  gap: 2px;
}
.voice-head .voice {
  flex: 1;
}
.voice-toggle {
  min-height: 28px;
  min-width: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 8px;
}
.voice-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}
.voice-group.open {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
  border-radius: 8px;
  padding-bottom: 2px;
}
/* Gesamtverzeichnis bearbeiten */
.dialog--full {
  max-width: min(1300px, calc(100vw - 16px));
}
.dir-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: -20px;
  z-index: 2;
  background: var(--surface);
  padding: 6px 0;
}
.dir-tools input[type='search'] {
  flex: 1 1 200px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
}
.dir-tools label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dir-missing {
  border: 2px dashed #2a6fb0;
  border-radius: 10px;
  padding: 6px 12px;
  margin: 8px 0;
}
.dir-missing ul {
  list-style: none;
  padding: 0;
  margin: 4px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dir-missing li {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 4px 2px 12px;
}
.dir-table-wrap {
  overflow-x: auto;
}
.dir-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 860px;
}
.dir-table td:last-child {
  width: 44px;
}
.dir-table th {
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px;
}
.dir-table td {
  padding: 2px;
  vertical-align: top;
}
.dir-zuordnung {
  display: block;
  margin-top: 3px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.dir-table input {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.dir-table input[readonly] {
  opacity: 0.75;
  cursor: help;
}
.dir-table th:nth-child(1) {
  width: 12%;
}
.dir-table th:nth-child(2) {
  width: 5%;
}
.dir-table th:nth-child(3) {
  width: 21%;
}
.dir-table th:nth-child(4) {
  width: 14%;
}
.dir-table th:nth-child(5) {
  width: 14%;
}
.dir-table th:nth-child(6) {
  width: 15%;
}
.dir-table th:nth-child(7) {
  width: 13%;
}
/* A50: the ✕ column as wide as its 44 px button (3 % was 33 px at 1180 – the table got 13 px too wide) */
.dir-table th:last-child {
  width: 48px;
}
.dir-table {
  table-layout: fixed;
}
/* A49: tablet upright (iPad 820) – the table fits the window instead of 860 px (no cut-off „Hinweis“ column), with a
   wider category column („Unterhaltung“ whole) and a little less title width */
@media (min-width: 601px) and (max-width: 900px) {
  .dir-table {
    min-width: 0;
    font-size: 0.82rem;
  }
  .dir-table td {
    padding: 1px;
  }
  .dir-table input {
    padding: 4px 5px;
  }
  /* rest of A49 (768): ✕ column fixed (48 px from above), the rest shared – „Unterhaltung“ whole */
  .dir-table th:nth-child(1) {
    width: 17%;
  }
  .dir-table th:nth-child(3) {
    width: 17%;
  }
  .dir-table th:nth-child(4) {
    width: 12%;
  }
  .dir-table th:nth-child(5) {
    width: 12%;
  }
  .dir-table th:nth-child(6) {
    width: 14%;
  }
  .dir-table th:nth-child(7) {
    width: 14%;
  }
}
/* Druckansicht des Verzeichnisses */
#print-area {
  display: none;
}
@media print {
  body.drucken > *:not(#print-area) {
    display: none !important;
  }
  body.drucken #print-area {
    display: block;
    color: #000;
    background: #fff;
    font-size: 10pt;
  }
  #print-area table {
    width: 100%;
    border-collapse: collapse;
  }
  #print-area th,
  #print-area td {
    border-bottom: 1px solid #999;
    padding: 3px 4px;
    text-align: left;
    vertical-align: top;
  }
  #print-area h1 {
    font-size: 16pt;
    margin: 0 0 4pt;
  }
}
/* Einordnung (Programme & Auftritte) */
.prog-new {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.prog-new input {
  flex: 1 1 260px;
  max-width: 360px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
}
.prog-year {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 8px 0;
}
.prog-year-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.prog-year-head h3 {
  margin: 0;
}
.prog-year-head button {
  margin-left: auto;
}
.prog-gigs {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.prog-gigs li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.prog-gig-actions {
  display: flex;
  gap: 6px;
}
.prog-source {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 8px 0;
}
.prog-source textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.prog-list {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.prog-entry {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 6px;
}
.prog-entry.prog-unbekannt {
  border-color: #c62828;
  border-left: 5px solid #c62828;
  background: rgba(198, 40, 40, 0.14);
}
.prog-entry.prog-unbekannt .prog-entry-main input {
  border-color: #c62828;
}
.prog-griff {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  padding: 8px 4px;
  flex: none;
}
.prog-entry.prog-zieht {
  position: relative;
  z-index: 2;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.prog-entry.prog-zieht .prog-griff {
  cursor: grabbing;
}
.prog-entry-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 0.8rem;
}
.prog-arr {
  color: var(--muted);
}
.prog-fehlt {
  color: #c62828;
  font-weight: 700;
}
.prog-doppelt {
  color: #b26a00;
  font-weight: 600;
}
.prog-nr {
  min-width: 1.6em;
  text-align: right;
  font-weight: 700;
  color: var(--muted);
}
.prog-entry-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prog-entry-main input {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.prog-entry-main .muted {
  font-size: 0.8rem;
}
/* Einreichungen: KI, Fortschritt und Prüfen/Übernehmen bleiben beim Blättern durch die Seiten oben */
.inbox-sticky {
  position: sticky;
  top: -20px;
  z-index: 4;
  background: var(--surface);
  margin: 0 -20px;
  padding: 6px 20px;
  box-shadow: 0 8px 12px -8px rgba(0, 0, 0, 0.18);
}
.inbox-sticky .ki-progress {
  position: static;
  box-shadow: none;
}
.inbox-sticky .inbox-actions {
  margin: 6px 0;
}
/* PDFs verkleinern */
.shrink-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shrink-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shrink-item.shrink-fertig {
  opacity: 0.7;
  border-color: #3f8a2a;
}
.actions > button.flach .ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.simulate-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px max(16px, calc((100vw - 1200px) / 2));
  background: #2a6fb0;
  color: #fff;
  font-size: 0.95rem;
}
.simulate-bar button {
  background: #fff;
  color: #1d4f80;
  border-color: #fff;
  font-weight: 700;
  min-height: 34px;
  padding: 4px 14px;
}
.footer-recht {
  font-size: 0.82rem;
}
.recht-hinweis {
  font-size: 0.82rem;
  color: var(--muted);
}
.piece-delete-box {
  border: 2px solid #c62828;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  background: color-mix(in srgb, #c62828 8%, var(--surface));
}
.terms-check {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.terms-text p {
  margin: 0.5em 0;
  line-height: 1.45;
}
.downloads-box {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.downloads-box summary {
  cursor: pointer;
  font-weight: 600;
}
.downloads-box input[type='search'] {
  width: 100%;
  margin: 6px 0;
}
.downloads-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 40vh;
  overflow-y: auto;
  font-size: 0.88rem;
}
.downloads-list li {
  padding: 3px 0;
  border-bottom: 1px solid var(--line);
}
/* F25 (Runde 20, = F21): im Filter-Fenster endet das Auswahlfeld sonst genau an der Kante des scrollenden Bereichs –
   etwas Luft rechts und links für Rand und Fokus-Rahmen (Ursache des fehlenden Rands am Handy: siehe K10 weiter unten). */
.filter-table td:has(select) {
  padding-inline: 2px;
}
.settings-scroll {
  overflow-x: auto;
  margin: 6px 0;
}
.settings-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}
.settings-table th,
.settings-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  vertical-align: top;
}
.settings-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}
.settings-table thead th:first-child,
.settings-table tbody th {
  text-align: left;
  font-weight: 400;
  min-width: 150px;
}
.settings-table td {
  text-align: center;
}
.settings-table input {
  width: 20px;
  height: 20px;
  accent-color: var(--olive);
}
.settings-kontakt {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 12px 0 4px;
}
.settings-kontakt legend {
  font-weight: 700;
  padding: 0 4px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 12px;
  margin: 6px 0;
}
.besetzung-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
.besetzung-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: left;
  padding: 4px;
}
.besetzung-table td {
  padding: 3px 4px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.besetzung-table input {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  min-width: 60px;
}
.besetzung-table .bs-knoepfe {
  white-space: nowrap;
}
.besetzung-table .bs-knoepfe button {
  min-height: 30px;
  padding: 2px 9px;
  margin-left: 2px;
}
.besetzung-table tr.bs-fest {
  opacity: 0.75;
}
.besetzung-table.ohne-erkennung .bs-erkennung {
  display: none;
}
.erscheinung-bilder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 8px 0;
}
.erscheinung-bilder > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.bild-vorschau {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 6px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--olive);
}
.bild-vorschau img {
  max-height: 80px;
  max-width: 240px;
}
.bild-vorschau .muted {
  color: #ddd;
}
.farb-felder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.farb-gruppe {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px;
}
.farb-gruppe legend {
  font-weight: 700;
  padding: 0 4px;
}
.farb-zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.9rem;
}
.farb-zeile input[type='color'] {
  width: 42px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
}
.farb-zeile input[type='color']:disabled {
  opacity: 0.35;
}
.brand .schriftzug {
  width: auto;
  height: auto;
  max-height: 72px;
  max-width: min(60vw, 520px);
}
.settings-tabs {
  position: sticky;
  top: -20px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px -20px 10px;
  padding: 8px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.settings-tabs button {
  border-radius: 999px;
  min-height: 34px;
  padding: 4px 14px;
  font-weight: 600;
}
.settings-tabs button[aria-selected='true'] {
  background: var(--olive);
  color: #f4f2e6;
  border-color: var(--olive);
}
.settings-panel > details {
  border: 0;
  margin: 0;
  padding: 0;
}
.settings-panel > details > summary {
  display: none;
}
/* Handy: Reiter brechen um, so sind alle fünf ohne Wischen zu sehen */
@media (max-width: 600px) {
  .settings-tabs {
    flex-wrap: wrap;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .settings-tabs button {
    white-space: nowrap;
    padding: 4px 10px;
  }
}
.settings-row {
  align-items: flex-start;
  margin: 10px 0;
  line-height: 1.4;
}
.settings-row input {
  margin-top: 3px;
  flex: none;
}
.shrink-done {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
.shrink-done summary {
  cursor: pointer;
  color: var(--muted);
}
.shrink-done ul {
  max-height: 25vh;
  overflow-y: auto;
  margin: 6px 0;
  padding-left: 18px;
}
.shrink-preview {
  width: 100%;
  max-width: 900px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
/* Stück bearbeiten: Ergebnis der KI-Prüfung je Stimme */
.piece-part .ki-hinweis {
  grid-column: 1/-1;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.piece-part.ki-ok {
  border-color: #3f8a2a;
}
.piece-part.ki-ok .ki-hinweis {
  color: #2e7d32;
}
.piece-part.ki-anders {
  border: 2px solid #c08a12;
  background: rgba(255, 220, 148, 0.35);
}
.piece-part.ki-anders .ki-hinweis {
  color: #6b4e00;
}
.ki-modell {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  max-width: 100%;
}
/* A52 (Runde 65): Aktionen unter dem KI-Vorschlag als Knopfreihe, am Handy sauber umbrechend */
.einordnen-aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
}
.einordnen-aktionen button {
  min-height: 44px;
}
.einordnen-aktionen-hinweis {
  flex-basis: 100%;
  font-size: 0.9em;
}
/* „Genauer prüfen“ (Runde 63): neben der Modellwahl, mit „Rückgängig“; ausgegraut mit Hinweis auf der höchsten Stufe */
.ki-genauer {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.ki-genauer-hinweis {
  font-size: 0.9em;
}
/* KI-Einstellungen: zwei Modelle nebeneinander, Preisfelder für unbekannte Modelle */
.ki-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
  margin: 6px 0;
}
.ki-models select {
  max-width: 100%;
}
.ki-price {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.ki-price .field {
  flex: 1 1 120px;
}
/* Alle Stücke mit KI prüfen: nur Abweichungen */
.kicheck-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kicheck-item > strong {
  flex: 1 1 100%;
}
.kicheck-item .ki-hinweis {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b4e00;
}
.kicheck-item.kicheck-anders {
  border: 2px solid #c08a12;
  background: rgba(255, 220, 148, 0.25);
}
.kicheck-item.kicheck-ok {
  border-color: #3f8a2a;
  background: transparent;
}
.kicheck-item.kicheck-ok .ki-hinweis {
  color: #2e7d32;
}
.kicheck-item.kicheck-fehler {
  border-color: #c62828;
  color: #8c1d14;
}
.kicheck-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.kicheck-select input {
  flex: 1 1 200px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
}
.kicheck-pieces {
  list-style: none;
  padding: 6px 10px;
  margin: 0 0 8px;
  max-height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  column-gap: 16px;
  align-content: start;
  background: var(--surface);
}
.kicheck-pieces li {
  break-inside: avoid;
  padding: 2px 0;
}
/* One piece per line, name left and the numbers right-aligned */
.kicheck-pieces {
  grid-template-columns: 1fr;
  row-gap: 0;
}
.kicheck-pieces li {
  border-bottom: 1px solid var(--line);
  padding: 5px 2px;
}
.kicheck-pieces li:last-child {
  border-bottom: 0;
}
.kicheck-pieces .check {
  align-items: baseline;
}
.kicheck-pieces .check .muted {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.85rem;
  padding-left: 12px;
}
.kicheck-pdf {
  font-size: 0.85rem;
  font-weight: 600;
}
.kicheck-streifen {
  flex: 1 1 100%;
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  object-position: left top;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
/* Programme und ihre Setlists in einer gemeinsamen Farbe */
.views button.prog-farbe {
  border-left: 4px solid var(--prog);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--prog) 10%, transparent);
}
.views button.prog-farbe:not(.sub) {
  margin-top: 6px;
  font-weight: 700;
}
.views button.prog-farbe[aria-checked='true'] {
  background: var(--olive);
}
@media (max-width: 860px) {
  .views button.prog-farbe,
  .views button.prog-farbe.sub {
    border: 1px solid var(--prog);
    border-left-width: 4px;
    border-radius: 999px;
    margin-top: 0;
  }
}

/* Icon in "Meine Einreichungen" */
.ico-btn {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Text fields: focus shown by border colour and an inner ring instead of an outer outline that runs past the layout */
:is(
  select,
  textarea,
  input[type='search'],
  input[type='text'],
  input[type='email'],
  input[type='password'],
  input[type='number'],
  input[type='url'],
  input[type='tel'],
  input[type='date'],
  input:not([type])
):focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: inset 0 0 0 1px var(--focus);
}
/* Lists without any play-order number (e.g. Gesamtverzeichnis): no empty number column */
#scores:not(:has(.nr:not(:empty))) > .score {
  grid-template-columns: auto 1fr;
}
#scores:not(:has(.nr:not(:empty))) > .score > .nr {
  display: none;
}
@media (min-width: 601px) {
  #scores:not(:has(.nr:not(:empty))) > .score > :is(.parts, .parts-toggle, .parts-one, .upload-missing) {
    grid-column: 2;
  }
}
@media (max-width: 600px) {
  .user {
    justify-content: flex-start;
    text-align: left;
    max-width: none;
    column-gap: 0;
  }
  .user-fuss {
    justify-content: flex-start;
  }
  #user-instrument {
    text-align: left;
  }
}
/* Light/dark switch in the header: moon in the light look, sun in the dark look */
.user {
  margin-left: auto;
}
.theme-toggle {
  flex: none;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 242, 230, 0.35);
  background: transparent;
  color: #f4f2e6;
}
.theme-toggle:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .sonne,
.theme-toggle.dunkel .mond {
  display: none;
}
.theme-toggle.dunkel .sonne {
  display: block;
}
#appearance:focus-visible {
  outline-color: var(--gold);
}
@media (max-width: 600px) {
  .header .brand {
    flex: 1 1 0;
    min-width: 0;
  }
  .theme-toggle {
    order: 2;
    align-self: flex-start;
  }
  .user {
    order: 3;
  }
}
/* „Als eine PDF“: in the selection bar next to the ZIP, and below the parts of a piece */
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.parts-one {
  grid-column: 3;
  justify-self: start;
  margin-top: 6px;
  min-height: 32px;
  padding: 3px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  border-color: var(--accent);
}
/* Release of an Aushilfe: each Einordnung with its setlists indented below */
.freigabe-gruppe {
  display: flex;
  flex-direction: column;
  gap: 2px;
  grid-column: 1/-1;
}
.freigabe-gruppe .freigabe-setlist {
  margin-left: 26px;
}
/* Upload: one short line, the tip behind a small „i“ */
.upload-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.upload-intro > p {
  margin: 0;
}
.info-tipp > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font:
    italic 700 0.85rem Georgia,
    serif;
  opacity: 0.75;
}
.info-tipp > summary::-webkit-details-marker {
  display: none;
}
.info-tipp[open] {
  flex: 1 1 100%;
}
.info-tipp[open] > summary {
  opacity: 1;
}
.info-tipp > p {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 7%, transparent);
  font-size: 0.9rem;
}

/* ===== Symbole: ein Satz für das ganze Portal (24er Raster, Strich 1,8), als Maske in der Textfarbe =====
   <span class="sym s-name" aria-hidden="true"></span> im Text, oder Klasse „symv s-name“ an einem Knopf (Symbol davor,
   bleibt auch, wenn ein Skript den Knopftext neu setzt). */
.sym,
.symv::before {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
  background: currentColor;
  -webkit-mask: var(--sym) center/contain no-repeat;
  mask: var(--sym) center/contain no-repeat;
}
.symv::before {
  content: '';
}
.s-hochladen {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E");
}
.s-laden {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E");
}
.s-mail {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 7 8.5 6 8.5-6'/%3E%3C/svg%3E");
}
.s-mehr {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5.5' cy='12' r='1.3'/%3E%3Ccircle cx='12' cy='12' r='1.3'/%3E%3Ccircle cx='18.5' cy='12' r='1.3'/%3E%3C/svg%3E");
}
.s-haken {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.s-stift {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19.5 8.5a2.1 2.1 0 0 0-3-3L5 17z'/%3E%3Cpath d='m14.5 7.5 3 3'/%3E%3C/svg%3E");
}
.s-mappe {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='3' width='12' height='15' rx='2'/%3E%3Cpath d='M5 7v11a3 3 0 0 0 3 3h8'/%3E%3C/svg%3E");
}
.s-info {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M12 7.5h.01'/%3E%3C/svg%3E");
}
.s-zu {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}
.s-ki {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3l1.9 4.6L17.5 9.5l-4.6 1.9L11 16l-1.9-4.6L4.5 9.5l4.6-1.9z'/%3E%3Cpath d='M18.5 14.5l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z'/%3E%3C/svg%3E");
}
.s-auge {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.s-drucker {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V3h10v6'/%3E%3Crect x='3' y='9' width='18' height='8' rx='2'/%3E%3Cpath d='M7 14h10v7H7z'/%3E%3C/svg%3E");
}
.s-neu {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 5.7'/%3E%3Cpath d='M20 4v7h-7'/%3E%3C/svg%3E");
}
.s-plus {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
.s-warnung {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 2.5 20h19z'/%3E%3Cpath d='M12 10v4.5'/%3E%3Cpath d='M12 17.5h.01'/%3E%3C/svg%3E");
}

/* ===== Design-Paket 1: Knopf-Hierarchie, Status als Etikett, weniger Effekte ===== */
/* Gefüllt = Haupthandlung, Rahmen = Nebenhandlung (8 px Ecken), Pille = Chip/Filter, eckiges Etikett = Status */
button,
.button,
.more-menu > summary {
  border-radius: 8px;
  gap: 8px;
}
/* Nebenhandlungen ohne Fläche; alles mit eigener Klasse (primary, ausgewählt, Chips …) behält seine Farbe */
:where(button:not(.primary), .button:not(.primary)) {
  background: transparent;
}
.primary {
  font-weight: 600;
}
/* Hochladen bleibt blau (Erkennungsfarbe), aber flach: kein Glanzstreifen, kein Verlauf, kein Schatten */
#submit-score {
  background: #1f5fa8;
  border: 1px solid #1f5fa8;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0;
}
#submit-score:hover:not(:disabled) {
  filter: none;
  box-shadow: none;
  background: #174a85;
}
/* „Mehr“: Nebenhandlung statt Gold */
.more-menu > summary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  font-weight: 500;
}
.more-menu > summary:hover,
.more-menu[open] > summary {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-color: var(--line);
}
/* Kleine Nebenhandlungen in der Karte: gleiche Form */
.edit-piece,
.parts-one,
.upload-missing {
  border: 1px solid var(--line);
  border-style: solid;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  min-height: 32px;
  padding: 4px 12px;
}
.upload-missing {
  color: #1f5fa8;
  border-color: color-mix(in srgb, #1f5fa8 45%, transparent);
}
/* Stimmen = Downloads: schlichte Kacheln mit Download-Symbol, eigene Stimme getönt statt dunkel gefüllt */
.part {
  border-radius: 6px;
  background: transparent;
  font-weight: 500;
}
.part::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  opacity: 0.7;
  -webkit-mask: var(--sym) center/contain no-repeat;
  mask: var(--sym) center/contain no-repeat;
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E");
}
.part.missing::before {
  content: none;
}
.part:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-color: var(--line);
}
.part.mine {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--text);
}
.part.missing {
  border-style: dashed;
  background: transparent;
}
/* Angehakte Stimmen ohne Datei: durchgestrichen, mit „Fehlen noch:“ davor, damit sie nicht wie ein blasser Download wirken */
.part.missing {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--missing) 70%, transparent);
}
/* Filter „Stimme nicht erkannt“: die betroffene Datei fällt auf */
.part.unerkannt {
  border: 1px solid var(--warn, #b36b00);
  background: color-mix(in srgb, var(--warn, #b36b00) 12%, var(--surface));
}
.part.unerkannt::after {
  content: ' ⚠';
}
.parts-fehlen {
  align-self: center;
  font-size: 0.82rem;
  color: var(--missing);
  padding: 0 2px;
}
.voices-fehlende {
  margin-top: 6px;
  font-size: 0.88rem;
}
/* Fehlende Stimmen: ruhiger Chip */
.fehlt {
  border: 1px solid color-mix(in srgb, #c62828 35%, transparent);
  background: color-mix(in srgb, #c62828 8%, var(--surface));
  color: #a61b1b;
  border-radius: 999px;
}
button.fehlt:hover {
  border-style: solid;
  background: color-mix(in srgb, #c62828 14%, var(--surface));
}
/* Status als flaches Etikett oben rechts statt Band und Goldkasten */
.status-label {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--muted);
}
.status-label .sym {
  width: 14px;
  height: 14px;
}
.status-label.status-ok {
  background: color-mix(in srgb, var(--green) 55%, var(--surface));
  color: var(--text);
}
.digital-status {
  display: inline-block;
  padding: 2px 6px;
  border-inline-start: 3px solid var(--muted);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--s-xs);
  font-weight: 600;
  line-height: 1.4;
}
.digital-status--komplett {
  border-color: var(--green);
}
.digital-status--teilweise,
.digital-status--besetzung-pruefen {
  border-color: #e0a100;
}
.tag {
  border: 0;
  border-radius: 4px;
  font-weight: 600;
}
/* Fertige Stücke: Akzentstreifen links statt Goldrahmen und Verlauf */
.score,
.score.complete {
  background: var(--surface);
  box-shadow: none;
}
.score.complete {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}
/* Room for the label only next to title and arranger, the rest of the card uses the full width */
.score:has(.status-label) .score-body,
.score.complete .score-body {
  padding-right: 0;
}
.score:has(.status-label) .score-body > :is(h3, .meta) {
  padding-right: 96px;
}
.fehlt {
  min-height: 30px;
  padding: 2px 10px;
}
@media (max-width: 600px) {
  .score:has(.status-label) .score-body > :is(h3, .meta) {
    padding-right: 84px;
  }
  .score > .parts-one {
    grid-column: 1/-1;
  }
}
.file-pick {
  border-radius: 8px;
  border-width: 1.5px;
}
.dialog-heading button {
  border-radius: 50%;
}
.info-tipp > summary {
  border: 0;
  width: auto;
  height: auto;
  font: inherit;
  opacity: 0.8;
}
.info-tipp > summary .sym {
  width: 20px;
  height: 20px;
}
.ki-hinweis.symv::before {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

/* ===== Design-Paket 2: festes Raster und fünf Schriftgrößen ===== */
:root {
  --a1: 4px;
  --a2: 8px;
  --a3: 12px;
  --a4: 16px;
  --a5: 24px;
  --a6: 32px;
  --s-xs: 0.75rem;
  --s-s: 0.875rem;
  --s-m: 1rem;
  --s-l: 1.25rem;
  --s-xl: 1.75rem;
}
h2 {
  line-height: 1.3;
}
.heading h2 {
  font-size: var(--s-xl);
}
.score h3,
h3 {
  font-size: var(--s-m);
  font-weight: 650;
  line-height: 1.35;
}
dialog h2,
.dialog-heading h2 {
  font-size: var(--s-l);
}
.note,
.meta,
.missing-label,
.part,
.fehlt,
.edit-piece,
.parts-one,
.upload-missing,
.more-parts summary,
.kicheck-pieces .check,
.status {
  font-size: var(--s-s);
}
.eyebrow,
.kicker,
.tag,
.status-label,
.kicheck-pieces .check .muted {
  font-size: var(--s-xs);
}
.eyebrow {
  letter-spacing: 0.08em;
}
.score {
  padding: var(--a4);
  gap: var(--a2) var(--a3);
}
.score .meta {
  margin: var(--a1) 0 0;
}
.score .tags:not(:empty) {
  margin-top: var(--a2);
}
.edit-piece {
  margin-top: var(--a3);
}
.parts {
  gap: var(--a2);
}
.parts-one {
  margin-top: var(--a2);
}
.missing-parts {
  gap: var(--a2);
}
/* Dialoge: Kopf, ein Satz (+ „i“), Inhalt, Knopfleiste unten über die volle Breite; Haupthandlung ganz rechts */
dialog {
  border-radius: 12px;
  padding: var(--a5);
}
.dialog-heading {
  margin-bottom: var(--a3);
}
dialog .dialog-actions {
  margin: var(--a4) calc(-1 * var(--a5)) calc(-1 * var(--a5));
  padding: var(--a4) var(--a5);
  bottom: calc(-1 * var(--a5));
  background: color-mix(in srgb, var(--surface-2) 50%, var(--surface));
  box-shadow: none;
  flex-wrap: wrap;
}
dialog .dialog-actions .primary {
  order: 2;
}
dialog .dialog-actions.oben {
  margin: 0 0 var(--a3);
  padding: 0;
  background: none;
  bottom: auto;
}
.dialog-satz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a1) var(--a2);
  color: var(--muted);
  margin: 0 0 var(--a3);
}
.dialog-satz > p {
  margin: 0;
}
.bin-actions {
  gap: var(--a2);
}
.status {
  border-radius: 8px;
}
.kicheck-item {
  padding: var(--a3) var(--a4);
  gap: var(--a2) var(--a3);
  border-radius: 8px;
}
.ki-hinweis {
  display: flex;
  align-items: center;
  font-size: var(--s-s);
}

/* ===== Design-Paket 3: ruhigere Karten, Farbe als Streifen statt Fläche ===== */
/* Karten: Titel und Stimmen vorn; „Bearbeiten“ als Stift neben dem Titel, Seltenes in einer Fußzeile */
.titelzeile {
  display: flex;
  align-items: flex-start;
  gap: var(--a2);
}
.titelzeile h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.score:has(.status-label) .score-body > .titelzeile {
  padding-right: 96px;
}
.score:has(.status-label) .score-body > :is(h3, .meta) {
  padding-right: 0;
}
@media (max-width: 600px) {
  .score:has(.status-label) .score-body > .titelzeile {
    padding-right: 84px;
  }
}
.edit-piece.nur-symbol {
  margin: -4px 0 0;
  min-height: 30px;
  width: 30px;
  padding: 0;
  justify-content: center;
  gap: 0;
  border-color: transparent;
  color: var(--muted);
}
.edit-piece.nur-symbol:hover {
  border-color: var(--line);
  color: var(--text);
}
.karten-fuss {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a2) var(--a4);
  margin-top: var(--a2);
}
#scores:not(:has(.nr:not(:empty))) > .score > .karten-fuss {
  grid-column: 2;
}
@media (max-width: 600px) {
  .score > .karten-fuss {
    grid-column: 1/-1;
  }
}
.karten-fuss > .more-parts {
  margin: 0;
}
.karten-fuss > .more-parts[open] {
  flex-basis: 100%;
  order: 2;
}
.karten-fuss .parts-one {
  margin: 0;
  border-color: transparent;
  padding: 2px 6px;
  min-height: 28px;
  color: var(--link, var(--accent));
  font-weight: 600;
}
.karten-fuss .parts-one:hover {
  border-color: var(--line);
}
/* A15: „Als eine PDF“ stays first and in its place when „Weitere Stimmen“ opens; text in line with the voice buttons;
   the arrow of „Weitere Stimmen“ also on touch devices (there the summary is a flex box and loses the list marker). */
.karten-fuss .parts-one {
  order: -1;
  margin-left: -6px;
}
.karten-fuss > .more-parts > summary {
  list-style: none;
}
.karten-fuss > .more-parts > summary::-webkit-details-marker {
  display: none;
}
.karten-fuss > .more-parts > summary::before {
  content: '▸';
  display: inline-block;
  width: 1em;
}
.karten-fuss > .more-parts[open] > summary::before {
  content: '▾';
}
.missing-parts {
  margin-top: var(--a2);
}
/* Verwaltungsfenster: roter Streifen oben, Fläche neutral; die rote Überschrift bleibt */
dialog.dialog--admin.dialog--admin.dialog--admin {
  background: var(--surface);
  border-color: var(--line);
  border-top: 4px solid #b3261e;
}
.dialog--admin.dialog--admin.dialog--admin :is(.member, .member-form, .member-invite) {
  background: var(--surface-2);
}
/* Hochladen: blauer Streifen oben und blaue Knöpfe, Fläche wie das übrige Portal */
:root {
  --grund: var(--surface);
  --grund-2: var(--surface-2);
  --grund-text: var(--text);
  --grund-muted: var(--muted);
  --grund-line: var(--line);
}
.dialog--upload.dialog--upload.dialog--upload {
  --upload-surface: var(--grund);
  --upload-surface-2: var(--grund-2);
  --upload-text: var(--grund-text);
  --upload-muted: var(--grund-muted);
  --upload-border: var(--grund-line);
  border-top: 4px solid var(--upload-accent);
}
.dialog-satz[hidden] {
  display: none;
}
/* Labels in the title line: rehearsal need (dot in the level's colour) and Komplett / „3 von 6“, flat, side by side */
.titelzeile .etiketten {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--a1) var(--a2);
  margin-top: 2px;
}
.titelzeile .etiketten:empty {
  display: none;
}
.titelzeile .status-label {
  position: static;
}
.score:has(.status-label) .score-body > .titelzeile {
  padding-right: 0;
}
.probe-label {
  background: var(--surface-2);
  color: var(--text);
  order: -1;
}
.probe-punkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--punkt);
}
.probe-hoch {
  --punkt: #c62828;
}
.probe-mittel {
  --punkt: #e0a100;
}
.probe-gering {
  --punkt: #43a047;
}
.probe-laeuft {
  --punkt: #9e9e9e;
}
.probe-laeuft {
  color: var(--muted);
}
@media (max-width: 600px) {
  .titelzeile {
    flex-wrap: wrap;
  }
  .titelzeile .etiketten {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    margin: 0;
  }
}
/* „Abmelden“: large enough to tap */
#portal-logout {
  display: inline-block;
  padding: 2px 4px;
  margin: -2px -4px;
  min-height: 24px;
  line-height: 20px;
}
/* „+ 6 weitere“: quiet text button, shows the other missing parts when tapped */
.fehlt-mehr {
  min-height: 30px;
  padding: 2px 8px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--s-s);
  font-weight: 500;
}
.fehlt-mehr:hover {
  border-style: solid;
  color: var(--text);
}
/* KI-Prüfung: aktueller Name und gelesener Name nebeneinander */
.kicheck-vergleich {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--a3);
  margin: 0;
  font-size: var(--s-s);
}
.kicheck-vergleich dt {
  color: var(--muted);
}
.kicheck-vergleich dd {
  margin: 0;
  font-weight: 600;
}
.kicheck-pieces .check .kicheck-geprueft {
  color: var(--accent);
}
#kicheck-filter {
  max-width: 100%;
}
/* Aufteilen: Seiten als Kacheln zum Ankreuzen, darunter die zwei Möglichkeiten */
.teilen-seiten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--a3);
  margin: var(--a3) 0;
}
@media (max-width: 600px) {
  .teilen-seiten {
    grid-template-columns: 1fr;
  }
}
.teilen-seite {
  display: flex;
  flex-direction: column;
  gap: var(--a1);
  align-items: stretch;
  font-size: var(--s-s);
}
.teilen-bild {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
}
.teilen-seite canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.teilen-seite:has(input:checked) canvas {
  outline: 3px solid var(--accent);
  outline-offset: -1px;
}
/* Angetippt: die Seite über die ganze Breite, nur der obere Rand (Kopfzeile mit Stimmenname) */
.teilen-seite.gross {
  grid-column: 1/-1;
}
.teilen-seite.gross .teilen-bild {
  aspect-ratio: 3/1;
  cursor: zoom-out;
}
.teilen-seite.gross canvas {
  width: 100%;
}
.teilen-ki .stimmwahl {
  width: 100%;
}
.teilen-seite.erledigt {
  opacity: 0.45;
}
.ki-aufteilung {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  border: 1px dashed var(--warn, #b36b00);
  border-radius: 8px;
}
.ki-teile {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ki-teil {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ki-teil-seiten {
  min-width: 5.5em;
  font-weight: 600;
}
.ki-teil.erledigt {
  opacity: 0.5;
}
.ki-aufteilung > .primary {
  align-self: flex-start;
}
.teilen-seite.erledigt .teilen-bild {
  cursor: default;
}
.teilen-wahl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a2);
  margin-top: var(--a3);
}
/* KI-Prüfung: vorhandene Stimmen des Stücks */
.kicheck-vorhanden {
  flex: 1 1 100%;
  font-size: var(--s-s);
}
.kicheck-vorhanden summary {
  cursor: pointer;
  color: var(--accent);
}
.kicheck-vorhanden .parts {
  margin-top: var(--a2);
}
/* „Mehr“-Menü: Scrollen bleibt im Menü; am Handy als Blatt von unten über die ganze Breite, dahinter abgedunkelt */
.more-items {
  overscroll-behavior: contain;
}
@media (max-width: 600px), (max-height: 500px) {
  .more-items {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    min-width: 0;
    border-radius: 14px 14px 0 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    max-height: 80dvh;
  }
  .more-menu[open] > summary::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(0, 0, 0, 0.35);
  }
}
.progress-alle {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
  font-size: var(--s-s);
  color: var(--muted);
}
/* Einreichungen: Vorschlag der KI (neu / vorhanden / unklar) oben im Fenster */
.inbox-einordnen {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: var(--a3) var(--a4);
  margin: var(--a3) 0;
  background: var(--surface);
}
.inbox-einordnen .eyebrow {
  margin: 0 0 var(--a2);
}
.einordnen-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--a3);
}
.einordnen-liste > li {
  display: flex;
  flex-direction: column;
  gap: var(--a1);
  align-items: flex-start;
}
.einordnen-liste > li p {
  margin: 0;
}
.einordnen-unklar .status-label {
  color: #8a5a00;
}
.einordnen-liste .status-label {
  display: inline-flex;
  margin-right: 6px;
  vertical-align: middle;
}
/* Noten hochladen nach Erfolg: nur die Meldung, darunter „Fertig“ und „Weitere Noten hochladen“ */
#submission-form.fertig > :not(#submission-result):not(.dialog-actions) {
  display: none;
}
#submission-result .submission-kennung {
  display: block;
  margin-top: var(--a1);
  font-size: var(--s-xs);
  color: var(--muted);
  word-break: break-all;
}
/* iOS-Test 02.11.2026 */
/* F7: Safari colours its bars from the page background – html gets it too, so switching to dark shows at once */
html {
  background: var(--bg);
}
/* F1: Safari zooms into fields with text under 16 px; on touch screens every field gets 16 px */
@media (pointer: coarse) {
  input:not([type='checkbox']):not([type='radio']):not([type='range']),
  select,
  textarea {
    font-size: 16px !important;
  }
}
/* F4: the compact progress card keeps the side margin of the other cards up to the full width */
@media (max-width: 1232px) {
  .progress-card {
    margin-left: 16px;
    margin-right: 16px;
  }
}
/* F6: the tick of the usage notice sits in the footer next to „Einverstanden“, never under it */
#terms-dialog .dialog-actions {
  flex-wrap: wrap;
}
#terms-dialog .dialog-actions .terms-check {
  flex: 1 1 100%;
  margin: 0;
}
#terms-dialog .dialog-actions #terms-status:empty {
  display: none;
}
#terms-dialog .dialog-actions #terms-status {
  flex: 1 1 100%;
  margin: 0;
}
/* F8: touch screens – tap areas of about 40–44 px */
@media (pointer: coarse) {
  button,
  .button,
  .more-menu > summary {
    min-height: 44px;
  }
  .chip {
    min-height: 40px;
  }
  .part {
    min-height: 40px;
  }
  .edit-piece {
    min-width: 44px;
    min-height: 44px;
  }
  .more-parts summary,
  .parts-toggle,
  .link-button,
  #portal-logout,
  .progress-card summary,
  .instrument-progress > summary {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .check input[type='checkbox'],
  .voice input[type='checkbox'] {
    width: 22px;
    height: 22px;
  }
  .check {
    min-height: 40px;
  }
}
/* K1: chip rows that scroll sideways fade out at the right edge, so it is clear there is more */
@media (max-width: 600px) {
  .chips {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    padding-right: 28px;
  }
}
/* K5: on touch screens the „Mehr“ button does not stay grey after closing */
@media (hover: none) {
  .more-menu:not([open]) > summary:hover {
    background: transparent;
    border-color: var(--line);
  }
}
/* Vorschlag der KI: deutlicher Hinweis je Stück, Stimmen mit neu/vorhanden, Empfehlung, Knöpfe */
.einordnen-hinweis {
  margin: 0;
  padding: var(--a2) var(--a3);
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.einordnen-neu .einordnen-hinweis {
  border-color: #b7791f;
  background: color-mix(in srgb, #f6ad55 18%, var(--surface));
}
.einordnen-unklar .einordnen-hinweis {
  border-color: #b7791f;
  background: color-mix(in srgb, #f6ad55 12%, var(--surface));
}
.einordnen-vorhanden .einordnen-hinweis {
  border-color: #2e7d32;
  background: color-mix(in srgb, #2e7d32 12%, var(--surface));
}
.einordnen-verzeichnis .einordnen-hinweis {
  border-color: #2a6fb0;
  background: color-mix(in srgb, #2a6fb0 12%, var(--surface));
}
.einordnen-teile {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--a1);
  font-size: var(--s-s);
}
.einordnen-teile .status-label {
  display: inline-flex;
  min-width: 7.5em;
  justify-content: center;
}
.einordnen-empfehlung {
  margin: 0;
}
.einordnen-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a2);
}
.einordnen-liste > li {
  align-items: stretch;
}
/* Portal-Einstellungen → Mails */
.mail-regeln {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--a3) var(--a4);
  margin: 0 0 var(--a3);
  display: flex;
  flex-direction: column;
  gap: var(--a2);
}
.mail-regeln legend {
  font-weight: 600;
  padding: 0 var(--a1);
}
.mail-regeln .check {
  align-items: flex-start;
}
.mail-empfaenger {
  list-style: none;
  margin: 0 0 0 var(--a5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--a1);
}
.mail-empfaenger .muted {
  font-size: var(--s-s);
}
/* iPad-Test 02.11.2026 */
/* K3: Einordnungen als Chips (schmale Fenster) gleich hoch und auf einer Linie */
@media (max-width: 860px) {
  .views {
    align-items: center;
  }
  .views button.prog-farbe:not(.sub) {
    margin-top: 0;
  }
  .views button.sub {
    font-size: inherit;
  }
}
/* K6: Zeilen ohne Aufklapp-Pfeil halten seinen Platz frei, so stehen die Zahlen in einer Spalte */
.voice-head:not(:has(.voice-toggle))::after {
  content: '';
  flex: none;
  width: 32px;
}
/* K7: „Mehr“ mit Abstand zum Rand und deutlichem Rand, auch im Dunkelmodus */
.more-items {
  border-color: color-mix(in srgb, var(--text) 22%, transparent);
}
/* K8: beim Öffnen eines „i“-Tipps bleibt das (i) stehen, nur der Text kommt in die nächste Zeile */
:is(.dialog-satz, .upload-intro) > .info-tipp[open] {
  display: contents;
}
:is(.dialog-satz, .upload-intro) > .info-tipp[open] > p {
  flex: 1 1 100%;
}
/* K9: die Auswahlleiste verschwindet, solange ein Fenster offen ist (verdeckt sonst Felder über der Tastatur) */
body:has(dialog[open]) #download-bar {
  display: none;
}
.einordnen-teile li.wahrscheinlich .status-label {
  color: #8a5a00;
  border-color: #b7791f;
}
.einordnen-doppelt {
  margin: 0;
  font-weight: 600;
}
/* PDF in der installierten App auf iPhone/iPad: eigenes Vollbild-Fenster mit „Fertig“ */
dialog.pdf-viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}
.pdf-viewer-kopf {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--a3);
  padding: calc(var(--a2) + env(safe-area-inset-top)) calc(var(--a4) + env(safe-area-inset-right)) var(--a2)
    calc(var(--a4) + env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.pdf-viewer-kopf h2 {
  margin: 0;
  font-size: var(--s-m);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-viewer-seiten {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--a2);
  padding: var(--a2) 0 calc(var(--a4) + env(safe-area-inset-bottom));
}
.pdf-viewer-seiten canvas {
  width: 100%;
  max-width: 1400px;
  height: auto;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
/* Nachtest iOS 0.21.0 */
/* F10: Felder in den Mail-Einstellungen bleiben im Kasten */
.mail-regeln {
  min-width: 0;
}
.mail-regeln select {
  max-width: 100%;
}
/* K7: „Mehr“ nie breiter als das Fenster minus Rand */
.more-items {
  max-width: calc(100vw - 32px);
}
/* K10: breite Tabellen in den Einstellungen blenden rechts aus, so ist klar, dass man waagerecht wischen kann */
@media (max-width: 600px) {
  .settings-scroll {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
  /* F25 (Runde 20, = F21): das Filter-Fenster und die Funktionen (Karten, A34) wischt man nicht waagerecht – dort schnitt
     das Ausblenden den rechten Rand der Auswahlfelder bzw. Karten ab. */
  .settings-scroll:has(.filter-table, .funktionen-table) {
    -webkit-mask-image: none;
    mask-image: none;
  }
}
/* K11: restliche kleine Tippflächen auf Touch-Geräten */
@media (pointer: coarse) {
  .edit-piece {
    min-height: 44px;
  }
  .parts-one,
  .chip.remove,
  .progress-toggle,
  .upload-missing,
  #sort,
  select {
    min-height: 44px;
  }
}
/* A1 (Android): „Details zeigen“ liegt am Handy nicht mehr über der Überschrift */
@media (max-width: 600px) {
  .progress-card {
    padding-right: 20px;
  }
  .progress-card .eyebrow,
  .progress-card h2 {
    padding-right: 120px;
  }
}
@media (max-width: 600px), (max-height: 500px) {
  .more-items {
    max-width: none;
  }
}
/* Einreichung mit KI-Vorschlag: nur der Vorschlag, „Selbst zuordnen“ klappt den Rest auf */
#inbox-work.nur-vorschlag
  > :is(
    .inbox-fields,
    #inbox-piece-hint,
    #inbox-multi,
    #inbox-files,
    #inbox-parts-heading,
    .inbox-sticky,
    #inbox-check,
    #inbox-reject-box,
    .inbox-manual,
    #inbox-parts,
    h3,
    #inbox-pages
  ) {
  display: none;
}
.einordnen-ablehnen {
  display: flex;
  flex-direction: column;
  gap: var(--a2);
  padding: var(--a3);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.einordnen-ablehnen[hidden] {
  display: none;
}
.einordnen-ablehnen textarea {
  width: 100%;
  box-sizing: border-box;
}
.einordnen-liste .status-label,
.einordnen-teile .status-label {
  position: static;
}
/* K11: Tippflächen auf Touch, gegen die spezielleren Regeln */
@media (pointer: coarse) {
  .edit-piece.nur-symbol {
    min-height: 44px;
    width: 44px;
    margin: -10px -8px 0 0;
  }
  .karten-fuss .parts-one {
    min-height: 44px;
  }
  .actions > *,
  .actions > .more-menu > summary {
    min-height: 44px;
  }
}
/* Einordnungen von Hand sortieren */
.prog-move {
  display: inline-flex;
  gap: 4px;
}
.prog-move-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  font-size: 1.05rem;
  line-height: 1;
}
.prog-year-head .prog-move-btn {
  margin-left: 0;
}
.prog-move-btn[disabled] {
  opacity: 0.35;
}
.prog-order-note {
  margin: 4px 0 8px;
}
@media (pointer: coarse) {
  .prog-move-btn {
    min-width: 44px;
    min-height: 44px;
  }
}
/* KI-Vorschlag: gelesener Titel je Stück, Eingabe wenn keiner erkannt wurde; mehrere Stücke */
.einordnen-titel {
  margin: 0;
  font-size: 1.02rem;
}
.einordnen-titel-fehlt {
  width: 100%;
  box-sizing: border-box;
}
.einordnen-titel-fehlt > span {
  font-weight: 600;
  color: var(--warn, #b36b00);
}
.einordnen-titel-fehlt input {
  width: 100%;
  box-sizing: border-box;
}
.einordnen-mehrere {
  display: flex;
  flex-direction: column;
  gap: var(--a2);
  align-items: flex-start;
  margin-bottom: var(--a2);
}
.inbox-part-stueck {
  min-width: 0;
  flex: 1 1 140px;
}
/* Einordnung: Nummer im Heft je Zeile */
.prog-heftnr {
  width: 3.4em;
  text-align: right;
  flex: 0 0 auto;
}
/* KI-Vorschlag: Seiten eines Stücks ansehen */
.einordnen-ansicht {
  display: flex;
  flex-direction: column;
  gap: var(--a2);
  width: 100%;
  padding: var(--a3);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  box-sizing: border-box;
}
.einordnen-ansicht[hidden] {
  display: none;
}
.einordnen-seiten {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a2);
}
/* „Vorhandene ansehen“: links die Datei im Archiv, rechts die eingereichten Seiten; am Handy untereinander */
.inbox-vergleich {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--a3);
}
.inbox-vergleich.einzeln {
  grid-template-columns: 1fr;
}
@media (max-width: 600px) {
  .inbox-vergleich {
    grid-template-columns: 1fr;
  }
}
.inbox-vorhanden {
  flex: 1 1 100%;
  font-size: 0.9rem;
}
.inbox-vorhanden ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.einordnen-seite {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 170px;
}
.einordnen-seite figcaption {
  font-size: 0.85rem;
  line-height: 1.3;
}
.einordnen-seite-auf {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: zoom-in;
  min-height: 0;
}
.einordnen-seite-bild {
  display: block;
  width: 170px;
  height: auto;
}
.einordnen-seite.vorhanden .einordnen-seite-auf {
  outline: 2px solid var(--warn, #b36b00);
}
.einordnen-seite.archiv .einordnen-seite-auf {
  outline: 2px dashed var(--line);
}
@media (max-width: 600px) {
  .einordnen-seite,
  .einordnen-seite-bild {
    width: calc(50vw - 40px);
  }
}
/* KI-Vorschlag: Hinweis des Notenwarts */
.einordnen-hinweis-ki {
  width: 100%;
}
.einordnen-hinweis-ki textarea {
  width: 100%;
  box-sizing: border-box;
  margin: var(--a1) 0;
}
.inbox-part-stueck {
  border-left: 4px solid var(--farbe, var(--line));
}
/* Hochladen: Hinweis für die Prüfung (nur Notenwart) */
.submission-pruefung {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--a2) var(--a3);
  margin: var(--a2) 0;
  display: flex;
  flex-direction: column;
  gap: var(--a1);
}
.submission-pruefung[hidden] {
  display: none;
}
.submission-pruefung legend {
  font-weight: 600;
  padding: 0 4px;
}
.submission-pruefung summary {
  font-weight: 600;
  cursor: pointer;
}
.inbox-aehnlich {
  flex: 1 1 100%;
  margin: 0;
}
.inbox-page.zu-gross canvas {
  outline: 2px dashed var(--warn, #b36b00);
  outline-offset: -2px;
}
/* Turn a page (↺ bottom left, ↻ bottom right on the tile); both stand out when the page seems to lie sideways. */
.inbox-page-dreh {
  position: absolute;
  bottom: 26px;
  right: 4px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-weight: 700;
  cursor: pointer;
}
.inbox-page-dreh.an {
  background: var(--warn, #b36b00);
  border-color: var(--warn, #b36b00);
  color: #fff;
}
.inbox-page.quer canvas,
.teilen-seite.quer canvas {
  outline: 2px dashed var(--warn, #b36b00);
  outline-offset: -2px;
}
/* Pages turned upright by themselves (Big Band 13.11.2026): guessed = dashed, confirmed by the KI = thin line. */
.inbox-page.auto-gedreht canvas {
  outline: 2px dashed var(--accent, #2d6cdf);
  outline-offset: -2px;
}
#inbox-viewer-dreh {
  margin-left: 8px;
}
.inbox-page-dreh.links {
  right: auto;
  left: 4px;
}
.inbox-page-dreh:not(.an) {
  opacity: 0.6;
}
.inbox-page-dreh:hover,
.inbox-page-dreh:focus-visible {
  opacity: 1;
}
@media (pointer: coarse) {
  .inbox-page-dreh {
    width: 40px;
    height: 40px;
  }
}
.inbox-part-arr {
  min-width: 0;
  flex: 1 1 120px;
}
.inbox-stuecke-info {
  margin: 0 0 var(--a2);
  font-weight: 600;
}
/* Stück bearbeiten: eine Stimme kompakt – voller Name oben, darunter Felder und kleine Symbol-Knöpfe */
.piece-part {
  grid-template-columns: minmax(0, 1fr) auto;
}
.piece-part .piece-part-label {
  grid-column: 1/-1;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.piece-part .piece-part-info {
  font-weight: 400;
}
.piece-ikons {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-self: end;
}
.piece-ikon {
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
}
.piece-ikon::before {
  margin: 0;
}
@media (pointer: coarse) {
  .piece-ikon {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 600px) {
  .piece-part {
    grid-template-columns: 1fr;
  }
  .piece-part .stimmwahl,
  .piece-ikons {
    grid-column: 1/-1;
  }
  .piece-ikons {
    justify-self: start;
  }
}
.s-kopie {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h8'/%3E%3C/svg%3E");
}
.s-tausch {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3-3M20 16H7l3 3'/%3E%3C/svg%3E");
}
.s-schere {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M20 4 8.1 15.9M14.5 14.5 20 20M8.1 8.1 12 12'/%3E%3C/svg%3E");
}
.s-muell {
  --sym: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E");
}
.inbox-part-stueckzeile {
  grid-column: 1/-1;
  order: -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inbox-part-stueckzeile .inbox-part-stueck {
  flex: 2 1 220px;
  font-weight: 600;
}
.inbox-part-stueckzeile .inbox-part-arr {
  flex: 1 1 160px;
}
/* Einreichungen: eine Liste je Stück (Block mit Titel · Arrangeur · Kategorie · Ablage, darunter seine Stimmen) */
.inbox-block {
  border: 1px solid var(--line);
  border-left: 6px solid var(--stueck, var(--line));
  border-radius: 10px;
  padding: 8px;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-2);
}
.inbox-block-kopf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.inbox-block-kopf input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.inbox-block-kopf .inbox-block-titel {
  flex: 2 1 220px;
  font-weight: 700;
}
.inbox-block-kopf input:not(.inbox-block-titel) {
  flex: 1 1 150px;
}
.inbox-block-status {
  font-size: 0.9rem;
  flex: 1 1 100%;
}
.inbox-block-status.neu {
  color: var(--ok, #2e7d32);
}
.inbox-block-status.warnung {
  color: var(--warn, #b36b00);
  font-weight: 600;
}
.inbox-part {
  grid-template-columns: auto minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
}
.inbox-part-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  font-size: 0.88rem;
}
.inbox-part-status .ok {
  color: var(--ok, #2e7d32);
  font-weight: 600;
}
.inbox-part-status .warn {
  color: var(--warn, #b36b00);
  font-weight: 600;
}
.inbox-part-status .check {
  font-size: 0.88rem;
}
@media (max-width: 600px) {
  .inbox-part {
    grid-template-columns: auto 1fr auto;
  }
  .inbox-part .inbox-range,
  .inbox-part .inbox-part-status {
    grid-column: 2/3;
  }
}
.inbox-accept-grund {
  flex: 1 1 100%;
  margin: 0;
  color: var(--warn, #b36b00);
}
.inbox-schnell {
  position: relative;
}
.inbox-schnell > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.inbox-schnell > summary::-webkit-details-marker {
  display: none;
}
.inbox-schnell-menu {
  position: absolute;
  z-index: 5;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  min-width: 220px;
}
.inbox-frei {
  margin: 4px 0 0;
}
/* Runde 73: leere Seiten – Kasten über den Seiten, Schild auf der Kachel, aussortierte blass. */
.inbox-leer {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0 0 10px;
}
.inbox-leer p {
  margin: 4px 0;
}
.inbox-leer-liste {
  margin: 4px 0 8px;
  padding-left: 1.2em;
}
.inbox-page-leer {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8a4b00;
}
.inbox-page-leer:empty {
  display: none;
}
.inbox-page.leer-verdacht {
  border-style: dashed;
}
.inbox-page.leer-raus canvas {
  opacity: 0.3;
}
/* Runde 73: doppelte Stimmen – Karte über den Stimmen, beide Blöcke nebeneinander. */
.inbox-doppelt {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0 0 10px;
}
.inbox-doppelt p {
  margin: 4px 0;
}
/* Am Handy bleiben beide Blöcke nebeneinander (kleinere Seiten), damit Seite für Seite verglichen werden kann. */
@media (max-width: 600px) {
  .inbox-doppelt .inbox-vergleich {
    grid-template-columns: 1fr 1fr;
  }
  .inbox-doppelt .einordnen-seite {
    width: 100%;
  }
}
.inbox-doppelt .inbox-vergleich > * {
  min-width: 0;
}
.inbox-doppelt canvas {
  max-width: 100%;
  height: auto;
}
#inbox-work:not(.einzeln) #inbox-check {
  display: none;
}
.storage-preis {
  margin: 0 0 6px;
}
/* Fieldsets wachsen sonst mit dem längsten Eintrag (Auswahl der Auflösung) über den Handybildschirm hinaus */
.settings-verkleinern {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.settings-verkleinern select {
  max-width: 100%;
}
/* Download-Leiste: „Alle“/„Keine“ als kleine Knöpfe, am Handy 44 px hoch */
.auswahl-knopf {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 0.88rem;
}
@media (pointer: coarse) {
  .auswahl-knopf {
    min-height: 44px;
    min-width: 56px;
  }
}
/* Gesamtverzeichnis am Handy: die Tabelle scrollt in sich, die Spaltenköpfe bleiben stehen, die Werkzeuge nehmen weniger Höhe */
@media (max-width: 600px) {
  .dir-tools {
    position: static;
    gap: 6px;
  }
  .dir-tools input {
    flex-basis: 100%;
  }
  .dir-table-wrap {
    max-height: 64vh;
    overflow: auto;
  }
  .dir-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
    box-shadow: 0 1px 0 var(--line);
  }
}
/* Long chip texts (search, many parts) stay inside the page: cut with „…“, the full text in the tooltip */
.chips .chip,
.active-filters .chip {
  max-width: 100%;
}
.chip .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
/* Legend under the progress bar: the same three fills as the bar */
.meter-wrap {
  display: grid;
  gap: 6px;
}
.meter-legend {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 10px;
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}
@media (max-width: 360px) {
  .meter-legend {
    font-size: 0.68rem;
    gap: 7px;
  }
}
.meter-legend strong {
  color: var(--text, inherit);
  font-variant-numeric: tabular-nums;
}
.legende {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.legende .farbe {
  width: 12px;
  height: 9px;
  flex: none;
  border-radius: 3px;
  border: 1px solid var(--bar-line);
}
.legende .voll {
  background: var(--bar);
}
.legende .teil {
  background: repeating-linear-gradient(
    45deg,
    var(--bar-partial) 0 3px,
    color-mix(in srgb, var(--bar-partial) 40%, transparent) 3px 6px
  );
}
.legende .leer {
  background: var(--bar-track);
}
/* Zusammenführen im Stück-Bearbeiten */
.piece-merge-box {
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  display: grid;
  gap: 8px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.piece-merge-box p {
  margin: 0;
}
.piece-merge-box select {
  max-width: 100%;
}
.piece-merge-vorschau ul {
  margin: 4px 0 0;
  padding-left: 20px;
}
.piece-merge-vorschau li {
  margin: 2px 0;
}
.piece-merge-vorschau .art {
  font-size: 0.8rem;
  color: var(--muted);
}
.warning-doppel {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
.besetzung-table .bs-haupt {
  white-space: nowrap;
}
.besetzung-table .bs-haupt .check {
  display: inline-flex;
  margin-right: 6px;
  vertical-align: middle;
}
.besetzung-table .bs-haupt .check.bs-alle {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.besetzung-table .bs-haupt .bs-alle input {
  width: auto;
  flex: none;
}

/* Sicherheitscodes bleiben auch auf schmalen Displays lesbar. */
.login-card pre,
.login-card code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.login-card svg {
  max-width: 100%;
  height: auto;
}
/* Umstellen des Anmeldeverfahrens: geführt, mit deutlicher Warnung */
.auth-aktiv {
  font-weight: 700;
  font-size: 1.05rem;
}
.auth-umstellen {
  margin-top: 10px;
  border: 2px solid #c62828;
  border-radius: 12px;
  padding: 8px 12px;
  background: color-mix(in srgb, #c62828 5%, var(--surface));
}
.auth-umstellen > summary {
  cursor: pointer;
  font-weight: 700;
  color: #c62828;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.auth-warnung {
  border-left: 4px solid #c62828;
  padding: 4px 12px;
  margin: 8px 0;
  background: var(--surface);
}
.auth-warnung ul {
  margin: 6px 0;
  padding-left: 20px;
}
.auth-warnung li {
  margin: 3px 0;
}
.auth-schritte {
  padding-left: 22px;
  display: grid;
  gap: 12px;
}
.auth-schritte > li {
  display: grid;
  gap: 6px;
}
.auth-schritte > li.inaktiv {
  opacity: 0.55;
}
.auth-schritte > li.fertig > strong::after {
  content: ' ✓';
  color: #2e7d32;
}
.auth-stand.ok {
  color: #2e7d32;
  font-weight: 600;
}
.auth-stand.warte {
  color: var(--muted);
}
#auth-wort {
  max-width: 220px;
  text-transform: uppercase;
}
.auth-pruefliste {
  display: grid;
  gap: 6px;
}
.auth-pruefliste .check {
  align-items: flex-start;
}
.auth-pruefliste .auto {
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-pruefliste .fehlt {
  color: #c62828;
  font-weight: 600;
}
.auth-voraus {
  margin: 8px 0;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.auth-voraus ul {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.auth-voraus li.v-ok::before {
  content: '✓ ';
  color: #2e7d32;
  font-weight: 700;
}
.auth-voraus li.v-fehlt::before {
  content: '✗ ';
  color: #c62828;
  font-weight: 700;
}
.auth-voraus li.v-fehlt {
  color: #c62828;
  font-weight: 600;
}
.auth-voraus li small {
  display: block;
  color: var(--muted);
  margin-left: 1.3em;
}
.auth-aktiv.warnung {
  color: #c62828;
}
.members-pick-tools {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.auth-weg {
  margin: 10px 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
}
.auth-weg h4 {
  margin: 0;
}
.auth-weg .radio {
  align-items: flex-start;
}
.login-code {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.login-code h2 {
  margin: 0;
  font-size: 1.1rem;
}
#login-form[hidden] + .login-code {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.mailversand {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.mailversand .radio {
  align-items: flex-start;
}
.passwort-hinweis {
  max-width: 460px;
}
.passwort-hinweis h2 {
  margin-top: 0;
}
.passwort-hinweis .dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.login-wechsel {
  justify-self: center;
  margin-top: 6px;
}
#login-form[hidden] + .login-code,
.login-code:only-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.mfa-schluessel {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  word-spacing: 0.3em;
  user-select: all;
}
/* Ansichtsleiste: nur auf dem Handy, alle Verzeichnisse zum Wischen, bleibt beim Scrollen oben */
.ansicht-leiste {
  display: none;
}
@media (max-width: 860px) {
  .ansicht-leiste {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 6;
    background: var(--bg);
    padding: 8px 0 10px;
    margin: 0 0 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ansicht-leiste::-webkit-scrollbar {
    display: none;
  }
  .ansicht-chip {
    flex: none;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-weight: 600;
    white-space: nowrap;
  }
  .ansicht-chip .n {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
  }
  .ansicht-chip.prog-farbe {
    border-color: var(--prog);
  }
  .ansicht-chip[aria-checked='true'] {
    background: var(--olive);
    border-color: var(--olive);
    color: #f4f2e6;
  }
  .ansicht-chip.prog-farbe[aria-checked='true'] {
    background: var(--prog);
    border-color: var(--prog);
  }
  .ansicht-chip[aria-checked='true'] .n {
    color: inherit;
    opacity: 0.85;
  }
  #views {
    display: none;
  }
}
/* Setlist-Zeilen auf dem Handy: Titel über die ganze Breite, Knöpfe darunter rechts */
@media (max-width: 600px) {
  .prog-entry {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .prog-entry-main {
    flex: 1 1 calc(100% - 64px);
  }
  .prog-entry > button:first-of-type {
    margin-left: auto;
  }
}
/* Ansichtsleiste: Rand blendet aus, wenn seitlich weitere Verzeichnisse liegen (Hinweis zum Wischen) */
/* Fade at the edges without a mask: a mask would also fade the strip's background, and the scrolled list would shine through. */
.ansicht-leiste::before,
.ansicht-leiste::after {
  content: '';
  flex: none;
  position: sticky;
  width: 36px;
  z-index: 1;
  pointer-events: none;
  align-self: stretch;
  opacity: 0;
}
.ansicht-leiste::before {
  left: 0;
  margin-right: -42px;
  background: linear-gradient(to left, transparent, var(--bg));
}
.ansicht-leiste::after {
  right: 0;
  margin-left: -42px;
  background: linear-gradient(to right, transparent, var(--bg));
}
.ansicht-leiste.mehr-links::before,
.ansicht-leiste.mehr-rechts::after {
  opacity: 1;
}
.ansicht-chip:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.more-group.nur-handy {
  display: none;
}
/* Handy quer (niedriger Bildschirm): Kopf in einer flachen Zeile, damit die Noten sichtbar bleiben */
@media (max-height: 500px) and (min-width: 601px) {
  .header {
    padding: 6px 16px;
    gap: 4px 12px;
    flex-wrap: nowrap;
  }
  .brand {
    gap: 10px;
    min-width: 0;
  }
  .brand img {
    width: 40px;
  }
  .brand .schriftzug {
    max-height: 40px;
  }
  .brand .kicker,
  .motto {
    display: none;
  }
  .brand h1 {
    font-size: 1.15rem;
    line-height: 1.2;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
    min-height: 36px;
    order: 3;
  }
  .user {
    font-size: 0.8rem;
    gap: 0 8px;
    line-height: 1.3;
    max-width: none;
  }
  #user-role {
    display: none;
  }
  /* A2: name and instrument stand one below the other here – no separator dot at the start of the second line */
  #user-role:not(:empty) + #user-instrument:not([hidden])::before {
    content: none;
  }
  .actions {
    padding-top: 8px;
    padding-bottom: 6px;
  }
  .progress-card.compact {
    padding: 8px 12px;
    gap: 6px;
  }
  .progress-card.compact :is(.eyebrow, .storage-use) {
    display: none;
  }
  .progress-card.compact h2 {
    font-size: 0.95rem;
  }
  /* Fortschritt eingeklappt als eine flache Zeile: Text | Balken | Knopf (iPhone quer, iOS-Test 14.11.2026) */
  .progress-card.compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 12px;
  }
  .progress-card.compact > div:not(.meter-wrap) {
    flex: none;
    min-width: 0;
  }
  .progress-card.compact h2 {
    margin: 0;
    white-space: nowrap;
    padding-right: 0;
  }
  .progress-card.compact .meter-wrap {
    flex: 1;
    min-width: 80px;
  }
  .progress-card.compact #progress-legend {
    display: none;
  }
  .progress-card.compact .progress-toggle {
    position: static;
    order: 3;
    flex: none;
    min-height: 32px;
    padding: 2px 10px;
  }
}
/* Handy kompakt: Kopf in einer Zeile, nur „Noten hochladen“ und „Mehr“ in der Knopfzeile, Fortschritt eingeklappt als eine Zeile */
@media (max-width: 600px) {
  .header {
    padding: 8px 16px;
    gap: 4px 10px;
  }
  .brand {
    gap: 10px;
  }
  .brand img {
    width: 40px;
  }
  .brand .schriftzug {
    max-height: 40px;
  }
  .brand .kicker {
    display: none;
  }
  .brand h1 {
    font-size: 1.15rem;
    line-height: 1.2;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
  .user {
    font-size: 0.8rem;
    gap: 0 8px;
    line-height: 1.3;
  }
  #user-role {
    display: none;
  }
  .user-fuss {
    gap: 8px;
  }
  .actions {
    flex-wrap: nowrap;
    padding: 8px 16px 6px;
  }
  .actions > #my-submissions,
  .actions > #contact-button {
    display: none;
  }
  .actions > #submit-score {
    flex: 1 1 auto;
    justify-content: center;
  }
  .more-group.nur-handy {
    display: block;
  }
  .progress-card.compact {
    padding: 8px 12px;
    gap: 6px;
  }
  .progress-card.compact :is(.eyebrow, .storage-use) {
    display: none;
  }
  .progress-card.compact h2 {
    font-size: 0.95rem;
    padding-right: 110px;
  }
  .progress-card.compact .progress-toggle {
    top: 6px;
    min-height: 32px;
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  .heading #view-kicker {
    display: none;
  }
  .heading h2 {
    font-size: 1.25rem;
  }
  .header .user > #user-name {
    flex: 0 1 auto;
    flex-basis: auto;
  }
  /* V-A12: line 1 name and instrument, line 2 „Abmelden“ and version, flush left under the name. */
  .header .user .user-fuss {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-start;
    align-items: baseline;
  }
  #user-role:not(:empty) + #user-instrument:not([hidden])::before {
    content: '·';
    margin: 0 0.35em 0 0;
  }
  .header .user > #user-name {
    margin-right: -4px;
  }
  aside {
    padding: 6px;
    gap: 6px;
  }
  .heading {
    margin-bottom: 6px;
    align-items: center;
  }
  #view-sub {
    display: none;
  }
  .heading .document {
    min-height: 34px;
    padding: 4px 10px;
    font-size: 0.85rem;
  }
  #filter-weitere .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  #filter-weitere .chips > * {
    flex: none;
  }
  main .toolbar {
    font-size: 0.85rem;
    gap: 4px 10px;
    margin: 4px 0;
  }
}
/* Hörbeispiele: button on the card and above a setlist, panel with players that load only on a tap */
.hoer {
  margin: 6px 0 2px;
}
.hoer-knopf {
  font-size: 0.85rem;
  padding: 4px 12px;
  min-height: 32px;
  border-radius: 999px;
}
.hoer-panel {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.hoer-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.hoer-art {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line);
}
.hoer-art.youtube {
  background: #c4302b;
  color: #fff;
}
.hoer-art.spotify {
  background: #1db954;
  color: #06210f;
}
.hoer-titel {
  flex: 1 1 140px;
  font-weight: 600;
}
.hoer-spielen {
  font-size: 0.85rem;
  padding: 4px 10px;
  min-height: 32px;
}
.hoer-extern {
  font-size: 0.85rem;
}
.hoer-player {
  display: block;
  width: 100%;
  max-width: 560px;
  border: 0;
  border-radius: 8px;
  margin-top: 8px;
}
.hoer-player.youtube {
  aspect-ratio: 16/9;
  height: auto;
}
.hoer-player.spotify {
  height: 152px;
}
.hoer-player.spotify.hoch {
  height: 352px;
}
.hoer-hinweis {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.view-hoeren {
  margin: -4px 0 12px;
}
.piece-hoer textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
}
.piece-hoer .muted {
  font-weight: 400;
  font-size: 0.8rem;
}
.piece-besetzung {
  margin: 0.4rem 0;
}
.piece-besetzung summary {
  cursor: pointer;
}
.piece-besetzung-liste {
  display: grid;
  gap: 0.3rem;
  margin: 0.4rem 0;
}
.bs-stueck-zeile {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) auto minmax(5rem, 8rem);
  gap: 0.5rem;
  align-items: center;
}
.bs-stueck-zeile.zaehlt-nicht .bs-stueck-name {
  color: var(--muted, #777);
}
.bs-stueck-zeile.zaehlt-nicht input {
  visibility: hidden;
}
.bs-stueck-zeile input,
.bs-stueck-zeile select {
  font: inherit;
  min-width: 0;
}
/* A46: phone upright – the instrument name on its own line, below it „zählt / zählt nicht“ (never cut) and the parts */
@media (max-width: 600px) {
  .bs-stueck-zeile {
    grid-template-columns: auto minmax(5rem, 1fr);
    row-gap: 0.15rem;
    margin-bottom: 0.35rem;
  }
  .bs-stueck-name {
    grid-column: 1/-1;
    overflow-wrap: anywhere;
  }
  .bs-stueck-zeile select {
    min-width: max-content;
  }
}
.prog-hoer {
  grid-column: 1/-1;
}
.prog-hoer textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
}
.prog-hoer .muted {
  font-weight: 400;
  font-size: 0.8rem;
}
.member-gebremst {
  color: var(--red, #b3261e);
  font-weight: 600;
}
.protokoll-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 6px 0;
}
.protokoll-export p {
  margin: 0;
}
.instrumente-wahl {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.instrumente-wahl summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
.instrumente-titel {
  font-weight: 600;
  font-size: 0.9rem;
}
.instrumente-text {
  color: var(--muted);
}
.instrumente-wahl[open] .member-voices {
  margin-top: 6px;
}
.instrument-haupt {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text, #fff);
}
.namen-felder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
@media (max-width: 480px) {
  .namen-felder {
    grid-template-columns: 1fr;
  }
}
/* Test Android/Chrome 06.11.2026: collapsed part buttons not cut off, tap areas on touch screens, sidebar and member form stay inside their box. */
.voices {
  min-width: 0;
}
.voice-head .voice {
  min-width: 0;
}
dialog .member-form .dialog-actions {
  margin: var(--a4) -12px -12px;
  padding: var(--a4) 12px;
  bottom: 0;
}
@media (pointer: coarse) {
  .parts.eingeklappt {
    max-height: 40px;
  }
  .voice-toggle {
    min-height: 40px;
    min-width: 40px;
  }
  .voice-head:not(:has(.voice-toggle))::after {
    width: 40px;
  }
  .besetzung-table button {
    min-height: 40px;
    min-width: 40px;
  }
  .fehlt-mehr {
    min-height: 40px;
  }
  .info-tipp > summary {
    position: relative;
  }
  .info-tipp > summary::after {
    content: '';
    position: absolute;
    inset: -12px;
  }
  details:not(.info-tipp):not(.more-menu) > summary {
    min-height: 40px;
    padding-block: 8px;
    box-sizing: border-box;
  }
  .instrumente-wahl summary {
    align-items: center;
  }
}
@media (pointer: coarse) {
  .voice-actions button {
    min-height: 40px;
  }
}
/* iOS test 06.11.2026: both logs reachable in the tab „Protokoll“, list of instruments recognizably folds out and stays on one line,
   settings window keeps its height between tabs, the page behind a window does not move, one heading above the voices on small screens. */
.settings-panel[data-panel='protokoll'] > details {
  margin: 0 0 12px;
}
.settings-panel[data-panel='protokoll'] > details > summary {
  display: list-item;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
}
.instrumente-wahl summary {
  flex-wrap: nowrap;
  list-style: none;
}
.instrumente-wahl summary::-webkit-details-marker {
  display: none;
}
.instrumente-wahl summary::before {
  content: '▸';
  flex: none;
}
.instrumente-wahl[open] summary::before {
  content: '▾';
}
.instrumente-text {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.members-log li {
  overflow-wrap: anywhere;
  white-space: normal;
}
#settings-dialog {
  min-height: min(620px, calc(100dvh - 32px));
}
@media (pointer: coarse) {
  html:has(dialog:modal) {
    overflow: hidden;
  }
}
@media (max-width: 860px) {
  .voices > legend {
    display: none;
  }
}
/* iOS test 2: the settings window keeps its size between tabs; on short screens (phone sideways) tabs and action bar scroll along, so the content has room. */
#settings-dialog {
  height: min(860px, calc(100dvh - 32px));
}
@media (max-height: 500px) {
  .settings-tabs {
    position: static;
  }
  dialog .dialog-actions {
    position: static;
  }
}
/* Click test: a long option must not push a list out of the window on the phone; settings fields easy to tap. */
.settings-panel select {
  max-width: 100%;
}
.settings-panel .field,
.settings-panel fieldset {
  min-width: 0;
}
@media (pointer: coarse) {
  .settings-panel input:not([type='checkbox']):not([type='radio']) {
    min-height: 40px;
  }
}

/* „Jetzt in Bearbeitung“ while the KI reads (arbeit.js): fixed at the bottom, above everything in the dialog. */
.arbeit {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: min(560px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 12px 16px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.arbeit-kopf {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}
.arbeit-text {
  margin: 6px 0 0;
  font-weight: 600;
}
.arbeit-meter {
  margin-top: 8px;
  height: 12px;
}
.arbeit-kreisel {
  flex: none;
  width: 18px;
  height: 18px;
  border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: arbeit-dreh 0.9s linear infinite;
}
@keyframes arbeit-dreh {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .arbeit-kreisel {
    animation-duration: 3s;
  }
}
dialog.in-arbeit > [inert] {
  opacity: 0.55;
}
#piece-complete-auto {
  margin: -4px 0 6px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  min-height: 0;
}

/* Hint about a piece (column Hinweis): small i beside the labels, the text below the arranger line. */
.hinweis-knopf {
  flex: none;
  align-self: center;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
}
.hinweis-knopf[aria-expanded='true'] {
  background: var(--accent);
  color: var(--accent-text);
}
.hinweis-knopf .sym {
  width: 18px;
  height: 18px;
}
.stueck-hinweis {
  margin: 4px 0 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--text);
  font-size: 0.92rem;
}
.stueck-hinweis .sym {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

/* Handy hoch: breite Tabellen als Karten bzw. schmaler, damit nichts rechts abgeschnitten ist (iOS-Test 14.11.2026). */
@media (max-width: 600px) {
  .dir-table {
    min-width: 0;
    table-layout: auto;
  }
  .dir-table thead {
    display: none;
  }
  .dir-table,
  .dir-table tbody {
    display: block;
  }
  .dir-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 44px;
    grid-template-areas: 'titel digital weg' 'kat kat nr' 'arr solo solo' 'hinw hinw hinw';
    gap: 2px 6px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .dir-table td,
  .dir-table td:last-child {
    display: block;
    padding: 0;
    width: auto;
    min-width: 0;
  }
  .dir-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 2px 0 1px;
  }
  .dir-table .dir-titel {
    grid-area: titel;
  }
  .dir-table .dir-digitalStatus {
    grid-area: digital;
  }
  .dir-table .dir-kategorie {
    grid-area: kat;
  }
  .dir-table .dir-nr {
    grid-area: nr;
  }
  .dir-table .dir-arrangeur {
    grid-area: arr;
  }
  .dir-table .dir-solist {
    grid-area: solo;
  }
  .dir-table .dir-hinweis {
    grid-area: hinw;
  }
  .dir-table td:last-child {
    grid-area: weg;
    align-self: end;
    justify-self: end;
  }
  .dir-table td:last-child button {
    min-width: 40px;
    min-height: 40px;
  }
  .settings-table {
    font-size: 0.88rem;
  }
  .settings-table thead th {
    font-size: 0.66rem;
    letter-spacing: 0;
    padding: 6px 2px;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
  }
  .settings-table thead th:first-child,
  .settings-table tbody th {
    min-width: 0;
    width: 38%;
  }
  .settings-table th,
  .settings-table td {
    padding: 8px 3px;
  }
  .besetzung-table thead {
    display: none;
  }
  .besetzung-table,
  .besetzung-table tbody {
    display: block;
  }
  .besetzung-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'name knoepfe' 'stimmen stimmen' 'erk erk' 'haupt haupt';
    gap: 2px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .besetzung-table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .besetzung-table td[data-label]:not(:empty)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 2px 0 1px;
  }
  .besetzung-table td:first-child {
    grid-area: name;
  }
  .besetzung-table .bs-knoepfe {
    grid-area: knoepfe;
    align-self: start;
  }
  .besetzung-table .bs-stimmen-zelle {
    grid-area: stimmen;
  }
  .besetzung-table td.bs-erkennung {
    grid-area: erk;
  }
  .besetzung-table td.bs-haupt {
    grid-area: haupt;
    white-space: normal;
  }
  .besetzung-table.ohne-erkennung td.bs-erkennung {
    display: none;
  }
  .besetzung-table .bs-stimmen-zelle input {
    max-width: 140px;
  }
  .besetzung-table td.bs-haupt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
  }
  .besetzung-table td.bs-haupt::before {
    flex-basis: 100%;
  }
  .besetzung-table td.bs-haupt .check {
    margin: 0;
  }
  .besetzung-table td.bs-haupt input.bs-haupt.bs-haupt {
    flex: 1;
    width: auto;
  }
  .besetzung-table td.bs-haupt .check.bs-alle {
    flex-basis: 100%;
    margin: 0;
  }
  .besetzung-table .bs-knoepfe button {
    margin-left: 4px;
  }
}
.settings-scroll:has(.besetzung-table, .dir-table) {
  -webkit-mask-image: none;
  mask-image: none;
}
/* Besetzung, breiter Bildschirm: Haken und Namensfeld teilen sich die Zelle, ohne in die Knöpfe daneben zu ragen (iPad quer). */
.besetzung-table td.bs-haupt input.bs-haupt {
  width: calc(100% - 76px);
  min-width: 60px;
}
/* Menü „Mehr“ als Blatt: die Seite darunter scrollt nicht mit, Wischen bleibt im Menü (iPhone). */
@media (max-width: 600px), (max-height: 500px) {
  html:has(#more-menu[open]),
  html:has(#more-menu[open]) body {
    overflow: hidden;
  }
  .more-items {
    touch-action: pan-y;
  }
}
/* Tastatur offen (iPhone/iPad): Fenster in den sichtbaren Bereich über der Tastatur, Überschrift und Schließen bleiben sichtbar.
   --vv-oben/--vv-hoehe setzt app.js aus visualViewport. */
html.tastatur dialog[open]:not(.pdf-viewer):not(.dialog--viewer) {
  position: fixed;
  top: calc(var(--vv-oben, 0px) + 8px);
  bottom: auto;
  margin: 0 auto;
  max-height: calc(var(--vv-hoehe, 100dvh) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.login-page input {
  scroll-margin-bottom: 96px;
}
html.tastatur dialog[open]:not(.pdf-viewer):not(.dialog--viewer) > .dialog-heading {
  position: sticky;
  top: calc(-1 * var(--a5));
  z-index: 4;
  margin: calc(-1 * var(--a5)) calc(-1 * var(--a5)) var(--a3);
  padding: var(--a3) var(--a5);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
/* Startseite schlanker (V-A1, Runde 10): auf PC (1280×800) und Tablet quer steht das erste Stück schon auf dem ersten Bildschirm.
   Fortschritt eingeklappt als eine Zeile (Speicherzeile unter „Details zeigen“ wie am Handy), Überschrift ohne die doppelte Kleinzeile.
   Bei wenig Höhe (Tablet quer; Handy quer bis 500 hoch hat seine eigenen Regeln oben) außerdem der Kopf wie am Handy: kleines Logo, ohne Vereinszeile, Spruch und Untertitel. */
@media (min-width: 601px) and (min-height: 501px) {
  .progress-card.compact {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 12px 6px 20px;
  }
  .progress-card.compact :is(.eyebrow, .storage-use) {
    display: none;
  }
  .progress-card.compact > div:not(.meter-wrap) {
    flex: none;
    min-width: 0;
  }
  .progress-card.compact h2 {
    margin: 0;
    white-space: nowrap;
    font-size: 1rem;
    padding-right: 0;
  }
  .progress-card.compact .meter-wrap {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .progress-card.compact .meter {
    flex: 1;
    min-width: 60px;
  }
  .progress-card.compact #progress-legend {
    margin: 0;
    white-space: nowrap;
  }
  .progress-card.compact .progress-toggle {
    position: static;
    order: 3;
    flex: none;
  }
  .heading {
    margin-bottom: 6px;
  }
  .heading #view-kicker {
    display: none;
  }
}
@media (min-width: 601px) and (max-width: 999px) and (min-height: 501px) {
  .progress-card.compact #progress-legend {
    display: none;
  }
}
@media (min-width: 601px) and (min-height: 721px) and (max-height: 900px) {
  .header {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .brand img {
    width: 64px;
  }
}
@media (min-width: 601px) and (min-height: 501px) and (max-height: 720px) {
  .header {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .brand {
    gap: 10px;
  }
  .brand img {
    width: 44px;
  }
  .brand .kicker,
  .motto {
    display: none;
  }
  .brand h1 {
    font-size: 1.4rem;
  }
  #view-sub {
    display: none;
  }
  .heading {
    align-items: center;
  }
  .actions {
    padding-top: 8px;
    padding-bottom: 6px;
  }
}
/* Suche am Handy (V-A2, Runde 10): solange ein Suchbegriff steht, klappen Stand- und Weitere-Filter und die Hinweise weg,
   die Treffer stehen direkt unter dem Suchfeld. Die Zeile „Aktiv“ (Suche, Stimmen, Filter zurücksetzen) bleibt. */
#search {
  scroll-margin-top: 8px;
}
@media (max-width: 860px) {
  #search {
    scroll-margin-top: 74px;
  }
} /* unter der feststehenden Verzeichnis-Leiste */
@media (max-width: 600px) {
  main:has(#search:not(:placeholder-shown)) :is(.filterbar > .filter-row, #sync-details, #catalog-warnings) {
    display: none;
  }
  main:has(#search:not(:placeholder-shown)) .active-filters {
    border-top: 0;
    padding-top: 0;
  }
}
/* Tippflächen (V-A11, Runde 10): eine Mindestgröße von 44 × 44 für alle Bedienelemente auf Touch-Geräten (Handy und Tablet)
   statt Stelle für Stelle (A1, A5–A7, A9, A10). Kleine Zeichen (ⓘ, Häkchen, Auswahlkreise) bleiben klein, ihre Tippfläche reicht
   unsichtbar darüber hinaus (ⓘ über ::after, Häkchen über ihr Etikett bzw. .tippflaeche). Steht zuletzt und gewinnt deshalb. */
.tippflaeche {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (pointer: coarse) {
  :is(
    button,
    .button,
    .document,
    select,
    [role='tab'],
    summary:not(.info-tipp > summary),
    .chip,
    .part,
    .ansicht-chip
  ) {
    min-height: 44px !important;
  }
  :is(button, .button) {
    min-width: 44px !important;
  }
  .parts.eingeklappt {
    max-height: 44px;
  }
  .check,
  .tippflaeche,
  #portal-logout {
    min-height: 44px;
  }
  .tippflaeche {
    min-width: 44px;
  }
  .settings-table td {
    padding-left: 0;
    padding-right: 0;
  }
  .settings-table :is(thead th:first-child, tbody th) {
    width: auto;
  }
  .settings-table tbody th {
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
  }
  .settings-table thead th {
    overflow-wrap: normal;
  } /* vier Häkchen-Spalten passen ans Handy */
  .dialog-heading button {
    flex: none;
    width: 44px;
    height: 44px;
  }
  .inbox-page-quick,
  .inbox-page-dreh {
    width: 44px;
    height: 44px;
  }
  :is(.inbox-file, .history-originale) a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
/* Einreichung bearbeiten (V-A3 mit A11–A13, Runde 10).
   A12: die Drehknöpfe stehen in einer eigenen Reihe unter der Seite, die Stimmen-Beschriftung überdeckt sie nicht mehr.
   A11: Kopf der Seitenansicht in einer Zeile, Schließen rund wie in den anderen Fenstern; am Handy Drehen nur als Zeichen ↺ ↻.
   A13: am Handy bleibt beim Wischen nur der Hauptknopf „… übernehmen“ als schmale Leiste stehen; Ablehnen, Problem melden
   und die Mail-Einstellung stehen an ihrem Platz und wandern mit. */
.inbox-page {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.inbox-page-open {
  flex: 1 1 100%;
}
.inbox-page-dreh,
.inbox-page-dreh.links {
  position: static;
  margin: 0 4px 4px;
}
#inbox-viewer-close {
  flex: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}
.viewer-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .viewer-head {
    gap: 4px;
  }
  .viewer-head strong {
    font-size: 0.85rem;
  }
  .viewer-head .viewer-datei {
    display: none;
  }
  #inbox-viewer-dreh {
    display: flex;
    gap: 4px;
    margin: 0;
  }
  #inbox-viewer-dreh .dreh-text {
    display: none;
  }
  #inbox-viewer-dreh button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
  }
  #inbox-work > .inbox-sticky,
  #inbox-work > .inbox-sticky > .inbox-actions {
    display: contents;
  }
  #inbox-accept {
    position: sticky;
    top: -12px;
    z-index: 4;
    width: 100%;
    justify-content: center;
    box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.35);
  }
  #inbox-accept {
    margin: 4px 0;
  }
  #inbox-reject,
  #inbox-report {
    margin: 4px 8px 4px 0;
  }
}
/* Nachtest Runde 10 (0.80.11): Rückschritte aus V-A11/V-A3 am Handy.
   A20: Die Mindestbreite 44 hob die natürliche Mindestbreite der Filterknöpfe auf; sie schrumpften bis „M…“. Sie behalten ihre volle Breite,
   die Leiste ist wieder seitlich wischbar.
   A21: Der gesperrte, feststehende „Übernehmen“ ist deckend (blass statt durchsichtig).
   A22: „＋“ auf den Seiten-Kacheln wieder klein gezeichnet (30), die Tippfläche bleibt 44 (unsichtbarer Rand); der Stimmenname bleibt lesbar.
   Besetzung: das Namensfeld nimmt die ganze Breite, ↑ ↓ ✕ (44) stehen neben dem Feld „Stimmen“. */
@media (pointer: coarse) {
  .chips > * {
    flex: none;
  }
  .inbox-page .inbox-page-quick {
    width: 30px;
    height: 30px;
    min-width: 30px !important;
    min-height: 30px !important;
    top: 2px;
    right: 2px;
  }
  .inbox-page-quick::after {
    content: '';
    position: absolute;
    inset: -7px;
  }
}
@media (max-width: 600px) {
  #inbox-accept:disabled {
    opacity: 1;
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted);
  }
  .besetzung-table tr {
    grid-template-areas: 'name name' 'stimmen knoepfe' 'erk erk' 'haupt haupt';
  }
  .besetzung-table .bs-knoepfe {
    align-self: end;
  }
}
/* Reste aus Runde 10 (0.80.12).
   „Einreichung bearbeiten“ am PC breiter (bis 1200 wie die Portal-Einstellungen): mehr Seiten je Reihe.
   Besetzung auf Touch-Geräten ab 601 breit (Handy quer, Tablet): das Feld unter „Zählt für Komplett“ steht unter seinem Häkchen
   und hat die ganze Spaltenbreite, „Flügelhorn/Trompete“ ist ganz lesbar. */
#inbox-dialog {
  max-width: min(1200px, calc(100vw - 32px));
}
@media (pointer: coarse) and (min-width: 601px) {
  .besetzung-table td.bs-haupt input.bs-haupt {
    display: block;
    width: 100%;
    margin-top: 2px;
  }
}
/* Filterkasten (Teil E, Wunsch Volker 15.11.2026): „Weitere“ klappt ein, „Stand“ bleibt sichtbar. Aktive Filter darunter
   zeigt der Knopf als Zahl, die Zeile „Aktiv“ bleibt. */
.weitere-toggle {
  border: 0;
  background: none;
  padding: 0;
  min-height: 0;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  white-space: nowrap;
}
.weitere-toggle:hover {
  color: var(--text);
}
.weitere-pfeil {
  display: inline-block;
  transition: transform 0.15s;
}
.filterbar.weitere-offen .weitere-pfeil {
  transform: rotate(180deg);
}
/* A25: a button, not a heading like „Stand“/„Aktiv“ – framed like the filter chips, normal letters. */
.filter-label.weitere-toggle {
  width: auto;
  padding: 5px 12px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
.weitere-zahl {
  color: var(--accent);
  letter-spacing: 0;
  text-transform: none;
}
.filterbar:not(.weitere-offen) #weitere-chips {
  display: none;
}
@media (min-width: 601px) {
  .weitere-toggle {
    min-width: 58px;
  }
}
/* A14: Mehr → Filter on the phone – description and choice one below the other instead of two cramped columns. */
@media (max-width: 600px) {
  .filter-table :is(tbody, tr, th, td) {
    display: block;
    width: auto;
  }
  .filter-table tbody th {
    border-bottom: 0;
    padding: 8px 0 4px;
  }
  .filter-table td {
    text-align: left;
    padding: 0 0 10px;
  }
  .filter-table select {
    width: 100%;
    max-width: 100%;
  }
}
/* Nachtest 0.80.11 (PC): the „＋“ at the top right covered the end of the title printed on the page – with the mouse it sits
   in the row below the page, between ↺ and ↻. */
@media (pointer: fine) {
  .inbox-page .inbox-page-quick {
    top: auto;
    bottom: 7px;
    right: auto;
    left: calc(50% - 15px);
  }
}
/* Platz sparen (Runde 13): ein leeres, selten gebrauchtes Feld ist eine Zeile „＋ …“; Antippen klappt es auf und setzt den
   Cursor hinein (Stück bearbeiten, Setlist). Gefüllte Felder bleiben offen. Gleiches Aussehen in allen Fenstern. */
.feld-plus {
  display: block;
  width: 100%;
  grid-column: 1/-1;
  text-align: left;
  padding: 8px 12px;
  min-height: 40px;
  margin: 6px 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--link, var(--accent));
  font-weight: 600;
  cursor: pointer;
}
.feld-plus:hover,
.feld-plus:focus-visible {
  border-style: solid;
}
#piece-hint-feld {
  grid-column: 1/-1;
}
/* Erklärung als ⓘ direkt am Häkchen (A27) */
.dialog-satz.haken-satz {
  color: inherit;
  margin: 0;
}
/* A29: the label wraps inside itself, so ⓘ stays next to the tick (it fell into its own line on the phone);
   ⓘ gets a 44-point tap area, and the opened text keeps a gap to the next field. */
.dialog-satz.haken-satz > label.check {
  flex: 1 1 0;
  min-width: 0;
}
.haken-satz .info-tipp > summary {
  min-width: 44px;
  min-height: 44px;
}
.haken-satz .info-tipp[open] > p {
  margin-bottom: var(--a3);
}
/* Seltene Knöpfe hinter „Weitere Aktionen“ (Stück bearbeiten) */
.weitere-aktionen > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.weitere-aktionen {
  order: 3;
}
.weitere-aktionen[open] {
  flex-basis: 100%;
}
.weitere-aktionen > summary {
  list-style: none;
}
.weitere-aktionen > summary::-webkit-details-marker {
  display: none;
}
.weitere-aktionen > summary::before {
  content: '▸';
  display: inline-block;
  width: 1em;
}
.weitere-aktionen[open] > summary::before {
  content: '▾';
}
.weitere-aktionen-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
/* Setlist bearbeiten: Stücke aus Liste oder Foto übernehmen als Aufklapper (Runde 13, K6) */
.prog-source-box {
  margin: 8px 0;
}
.prog-source-box > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}
/* Platz sparen (Runde 13, K14): Stückkarte am Handy – „Komplett“ und andere Etiketten neben dem Titel statt in einer eigenen
   Zeile; „Als eine PDF“ und „Weitere Stimmen“ über die ganze Kartenbreite, bündig mit den Stimmknöpfen. */
@media (max-width: 600px) {
  .titelzeile {
    flex-wrap: nowrap;
  }
  .titelzeile .etiketten {
    order: 0;
    flex: 0 1 auto;
    flex-basis: auto;
    max-width: 50%;
    justify-content: flex-end;
    margin: 2px 0 0;
  }
  :is(#scores, #scores:not(:has(.nr:not(:empty)))) > .score > .karten-fuss {
    grid-column: 1/-1;
    column-gap: var(--a3);
  }
}
/* Mitglied-Formular: die Kopfzeile von „Noten ansehen“ darf umbrechen, „(zurzeit aus)“ bleibt lesbar. */
#member-notenansicht-kurz {
  white-space: normal;
}
/* A28: am Handy stehen die Knöpfe ohne eigenen Kasten (display:contents); der Grund unter „Übernehmen“ bekommt seine eigene Zeile. */
@media (max-width: 600px) {
  #inbox-accept-grund {
    display: block;
    flex: 1 1 100%;
    width: 100%;
  }
}
/* „Nur eigene Noten“ ohne Instrument oder Stimmen gerade nicht ladbar: deutlich, nicht als graue Fußnote (1d). */
.datenbank-hinweis,
.nur-eigene-hinweis {
  border: 2px solid var(--warn);
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
}

/* K9 (Volker 16.11.2026): Portal-Einstellungen → Funktionen am Handy – je Funktion eine kurze Zeile, der Rest hinter ⓘ;
   am PC unverändert der ganze Text. Ebenso die Erklärung zu „Noten für Musiker“. */
:is(.settings-table, .settings-eigene-noten) .kurz,
.nur-handy-info {
  display: none;
}
@media (max-width: 600px) {
  :is(.settings-table, .settings-eigene-noten) .lang {
    display: none;
  }
  .settings-table span.kurz {
    display: inline;
  }
  .settings-eigene-noten p.kurz {
    display: block;
    margin-bottom: 0;
  }
  .nur-handy-info {
    display: block;
    margin-top: 2px;
  }
}
/* K10: Voraussetzungen als aufklappbare Zeile – zu, wenn alles erfüllt ist. */
.auth-voraus > summary {
  cursor: pointer;
  min-height: 36px;
}
/* V-F11: Hinweis auf gemerkte Filter vom letzten Besuch, oben über der Liste. */
.filter-gemerkt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 var(--a2);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
}

/* A34 (Runde 20): Portal-Einstellungen → Funktionen am Handy als Karten statt Tabelle – je Funktion Name, kurze Zeile
   mit ⓘ, darunter die vier Rollen mit Beschriftung. Die Spalten sind fest: Musiker, Leitung, Notenwart, Verwaltung.
   Am PC unverändert die Tabelle. */
@media (max-width: 600px) {
  .funktionen-table,
  .funktionen-table tbody,
  .funktionen-table tr {
    display: block;
    width: 100%;
  }
  .funktionen-table thead {
    display: none;
  }
  .funktionen-table tr {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .funktionen-table tbody th[scope='row'] {
    display: block;
    flex: 1 1 100%;
    width: auto;
    padding: 0 0 6px;
    border: 0;
    overflow-wrap: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
  }
  .funktionen-table td {
    display: block;
    flex: 1 1 50%;
    width: auto;
    padding: 0;
    border: 0;
    text-align: left;
  }
  .funktionen-table td .tippflaeche {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
  }
  .funktionen-table td:nth-of-type(1) .tippflaeche::after {
    content: 'Musiker';
  }
  .funktionen-table td:nth-of-type(2) .tippflaeche::after {
    content: 'Leitung';
  }
  .funktionen-table td:nth-of-type(3) .tippflaeche::after {
    content: 'Notenwart';
  }
  .funktionen-table td:nth-of-type(4) .tippflaeche::after {
    content: 'Verwaltung';
  }
}

/* Runde 24 (Sammelliste) */
/* A38: am schmalen Handy darf „Seite 4 von 4“ in der großen Ansicht auf zwei Zeilen umbrechen statt abgeschnitten zu werden. */
@media (max-width: 400px) {
  .viewer-head strong {
    white-space: normal;
    line-height: 1.15;
  }
}
/* A39: Spaltenköpfe der Funktionen-Tabelle (quer und am PC) ohne Silbentrennung – Platz ist genug. */
.funktionen-table thead th:not(:first-child) {
  white-space: nowrap;
}
/* A41: Knöpfe der Mitgliederkarte am Handy nie schmaler als ihre Beschriftung; passt es nicht, rutscht einer in die nächste Zeile. */
@media (max-width: 600px) {
  /* !important: gegen die 44-px-Mindestbreite für Touch (dieselbe Art Regel, hier genauer). */
  .member-actions > button {
    min-width: max-content !important;
  }
}
/* A40: „Weitere Filter“ am Handy umbrechen statt seitlich wischen – sonst steht „Arrangeur“ halb abgeschnitten am Rand. */
@media (max-width: 600px) {
  #filter-weitere #weitere-chips {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-right: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* K21: the provider's own message below a KI error (administration only), small and as plain text */
.status-anbieter {
  display: block;
  margin-top: 2px;
  font-size: 0.85em;
  opacity: 0.85;
  overflow-wrap: anywhere;
}
/* K35 (Runde 101): KI-Vorschlag mit mehreren Stücken – Karte zeigt „✓ eingetragen“, Hinweis wenn alle eingetragen */
.einordnen-eingetragen {
  color: var(--ok, #2e7d32);
  align-self: center;
}
.einordnen-liste > li.ist-eingetragen {
  border-left: 4px solid var(--ok, #2e7d32);
  padding-left: var(--a2);
}
.einordnen-fertig {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a2);
  align-items: center;
  padding: var(--a2) var(--a3);
  border: 1px solid var(--ok, #2e7d32);
  border-radius: 8px;
  list-style: none;
}
/* F48 (Runde 112): Karte eines Stücks, das schon ganz im Archiv ist – nach „Alle übernehmen“ */
.einordnen-eingetragen.einordnen-vorhanden {
  color: var(--warn, #b36b00);
}
.einordnen-liste > li.ist-vorhanden {
  border-left: 4px solid var(--warn, #b36b00);
  padding-left: var(--a2);
}
