/* v1.19: Musik-Modul – Termine, Zu-/Absagen, Übersicht der Musikleitung */
:root { --m-yes: #e3efd3; --m-yes-ink: #3f6a14; --m-maybe: #ffecb5; --m-maybe-ink: #7a5600; --m-no: #f9d3d3; --m-no-ink: #9b1c1c; --m-open: #f1f1f1; --m-blue: #e7eef8; --m-blue-ink: #2b4c7e; }
.tag.music { background: var(--m-blue); color: var(--m-blue-ink); }
.tag.maybe { background: var(--m-maybe); color: var(--m-maybe-ink); }
.tag.kind-probe { background: var(--m-blue); color: var(--m-blue-ink); }
.tag.kind-register { background: #efe6f7; color: #5b2f86; }
.tag.kind-auftritt { background: #fde7d4; color: #8a3d00; font-weight: 700; }
.tag.kind-sonst { background: #eee; color: #555; }

/* Terminkarte */
.m-event { scroll-margin-top: 80px; }
.m-event.cancelled { opacity: .7; }
.m-event.cancelled h3 { text-decoration: line-through; }
.m-event.past { opacity: .8; }
.m-head { display: flex; gap: 14px; align-items: flex-start; }
.m-date { flex: none; width: 56px; text-align: center; border-radius: 10px; background: var(--b-soft, #eef3f9); border: 1px solid rgba(var(--b-rgb, 47,111,179),.3); padding: 6px 0 4px; line-height: 1.1; }
.m-date .d { display: block; font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); }
.m-date .w { display: block; font-size: .72rem; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; }
.m-date .m { display: block; font-size: .75rem; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.m-main { min-width: 0; flex: 1; }
.m-main h3 { margin: 2px 0 0; font-size: 1.15rem; }
.m-main h3 a { text-decoration: none; color: var(--heading); }
.m-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.m-when { color: var(--heading); font-weight: 600; font-size: .95rem; }
.m-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 10px 0 0; font-size: .92rem; }
.m-facts dt { color: var(--muted); }
.m-facts dd { margin: 0; color: var(--heading); }
.m-count { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; font-size: .9rem; text-decoration: none; }
.m-count span { padding: 1px 8px; border-radius: 99px; font-weight: 700; }
.m-count .c1 { background: var(--m-yes); color: var(--m-yes-ink); }
.m-count .c2 { background: var(--m-maybe); color: var(--m-maybe-ink); }
.m-count .c0 { background: var(--m-no); color: var(--m-no-ink); }
.m-count .co { background: var(--m-open); color: #555; font-weight: 600; }
.m-regs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; font-size: .8rem; }
.m-regs span { padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); }
.m-regs .full { background: var(--m-yes); border-color: #cfe3b5; }
.m-regs .part { background: #fff8e3; border-color: #f0dc9c; }
.m-regs .none { background: #fdf0f0; border-color: #f2caca; }

/* Antwort-Knöpfe */
.m-answer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fafafa; border: 1px solid var(--line); }
.m-answer.open { background: #fffaf0; border-color: #f3d27a; }
.m-who { font-weight: 700; color: var(--heading); }
.m-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.m-comment { grid-column: 1 / -1; font-size: .9rem; padding: 6px 10px !important; margin: 0 !important; }
@media (min-width: 761px) {
  .m-answer { grid-template-columns: 110px 1fr auto; padding: 8px 12px; }
  .m-comment { grid-column: 2; grid-row: 1; }
  .m-btns { grid-column: 3; grid-row: 1; }
}
.m-btn { font: inherit; font-size: .92rem; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--heading); cursor: pointer; }
.m-btn b { font-size: 1.05em; }
.m-btn:hover { border-color: #bbb; }
.m-btn.s1.on { background: #5e9d24; border-color: #5e9d24; color: #fff; }
.m-btn.s2.on { background: #e6a817; border-color: #e6a817; color: #fff; }
.m-btn.s0.on { background: #c43c3c; border-color: #c43c3c; color: #fff; }
.m-btn.mini { padding: 3px 9px; font-size: .9rem; margin-right: 3px; }
.m-set { white-space: nowrap; }
@media (max-width: 560px) {
  .m-answer { grid-template-columns: 1fr; }
  .m-btns { justify-content: stretch; }
  .m-btn { flex: 1 1 0; padding: 10px 4px; }
  .m-head { gap: 10px; }
  .m-date { width: 48px; }
}

/* Wer kommt? */
.m-who-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; }
.m-reg h3, .m-reg-h { margin: 8px 0 4px; font-size: 1rem; }
.m-reg ul { list-style: none; margin: 0; padding: 0; }
.m-reg li { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.m-sym { display: inline-flex; width: 24px; height: 24px; flex: none; align-items: center; justify-content: center; border-radius: 6px; font-weight: 700; background: var(--m-open); color: #777; }
.s1 > .m-sym, tr.s1 .m-sym { background: var(--m-yes); color: var(--m-yes-ink); }
.s2 > .m-sym, tr.s2 .m-sym { background: var(--m-maybe); color: var(--m-maybe-ink); }
.s0 > .m-sym, tr.s0 .m-sym { background: var(--m-no); color: var(--m-no-ink); }
td.m-sym { display: table-cell; width: 28px; text-align: center; vertical-align: middle; }
.m-tiles { margin: 12px 0; }
.m-tiles .t1 { background: var(--m-yes); } .m-tiles .t2 { background: var(--m-maybe); } .m-tiles .t0 { background: var(--m-no); } .m-tiles .to { background: var(--m-open); }

/* Übersicht (Raster) */
table.m-grid { border-collapse: separate; border-spacing: 0; font-size: .85rem; margin: 0; min-width: 100%; }
table.m-grid th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
table.m-grid th, table.m-grid td { border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 5px 6px; text-align: center; white-space: nowrap; background: #fff; }
table.m-grid thead th { position: sticky; top: 0; z-index: 2; vertical-align: bottom; min-width: 64px; }
table.m-grid thead a { text-decoration: none; display: flex; flex-direction: column; color: var(--heading); }
table.m-grid thead small { font-weight: 400; color: var(--muted); font-size: .72rem; }
table.m-grid .n { position: sticky; left: 0; z-index: 1; text-align: left; background: #fafafa; font-weight: 600; color: var(--heading); }
table.m-grid thead .n { z-index: 3; }
table.m-grid tr.reg th { background: var(--ok-bg); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--primary-dark); }
table.m-grid td.s1 { background: var(--m-yes); color: var(--m-yes-ink); font-weight: 700; }
table.m-grid td.s2 { background: var(--m-maybe); color: var(--m-maybe-ink); font-weight: 700; }
table.m-grid td.s0 { background: var(--m-no); color: var(--m-no-ink); font-weight: 700; }
table.m-grid td.so { color: #aaa; }
table.m-grid td.sx { color: #ccc; background: #fcfcfc; }
table.m-grid .cx { color: #aaa; background: #f6f6f6; font-size: .75rem; }
table.m-grid th.cx a span { text-decoration: line-through; }
table.m-grid sup { font-size: .6rem; margin-left: 1px; }
table.m-grid tfoot td, table.m-grid tfoot th { background: #fafafa; font-size: .8rem; }
.m-legend { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 8px; }
.m-legend span { padding: 1px 8px; border-radius: 6px; }
.m-legend .s1 { background: var(--m-yes); } .m-legend .s2 { background: var(--m-maybe); } .m-legend .s0 { background: var(--m-no); } .m-legend .so { background: var(--m-open); } .m-legend .sx { background: #fcfcfc; border: 1px solid var(--line); }

/* Musikleitung */
table.m-list tr.cancelled td { opacity: .6; }
table.m-list tr { scroll-margin-top: 80px; }
.m-form .m-times { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; align-items: end; } /* 2.9.2: feste Spaltenbreite, Felder unten bündig, auch wenn eine Beschriftung zweizeilig ist (Rückmeldung bis / Uhrzeit) */
.m-form .m-times > * { min-width: 0; }
.m-repeat { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 6px 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.m-repeat legend { font-weight: 700; color: var(--heading); padding: 0 4px; }
.m-repeat .m-until { display: flex; align-items: center; gap: 8px; margin: 0; }
.m-repeat .m-until input { width: auto; margin: 0; }
.m-repeat .muted { flex-basis: 100%; }
.m-pending { border-color: #f3d27a; background: #fffcf3; }
.m-reglist li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.m-reglist .inline-form { margin: 0; }
.m-role-form { margin-top: 4px; }
.m-quote { display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: var(--m-open); vertical-align: middle; overflow: hidden; }
.m-quote span { display: block; height: 100%; background: var(--primary); }
a.strong { font-weight: 700; text-decoration: none; color: var(--heading); }
.help-wanted.music { background: var(--m-blue); border-color: #bcd0ec; border-left-color: #4a78b8; }
@media print { .m-answer, .m-set, #kalender { display: none !important; } }
table.m-table { table-layout: fixed; }
table.m-table td:nth-child(1) { width: 36px; }
table.m-table td:nth-child(2) { width: 34%; }
table.m-table td:nth-child(4) { width: 170px; text-align: right; }
@media (max-width: 640px) { table.m-table td:nth-child(3) { display: none; } table.m-table td:nth-child(2) { width: auto; } }
.m-tiles .card { padding: 10px 14px; }
@media (max-width: 640px) {
  table.m-list thead { display: none; }
  table.m-list, table.m-list tbody, table.m-list tr, table.m-list td { display: block; width: 100%; }
  table.m-list tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.m-list td { border: 0; padding: 0; }
  table.m-list td:nth-child(1) { grid-column: 1; }
  table.m-list td:nth-child(4) { grid-column: 2; grid-row: 1 / span 2; width: auto; }
  table.m-list td:nth-child(2), table.m-list td:nth-child(3) { grid-column: 1 / -1; }
  table.m-list .actions { flex-wrap: nowrap; }
}
.m-home .tag.no, .home-list .tag.no.m { background: var(--m-no); color: var(--m-no-ink); }
