/* ==========================================================================
   FARBEN
   --------------------------------------------------------------------------
   Alle Farbwerte der Seite stehen hier. Wer das Aussehen aendern will,
   aendert diesen Block - nicht die 490 Regeln darunter.

   Zwei Themen: Tag und Nacht. Tag ist die Vorgabe; wer sein Geraet auf
   dunkel gestellt hat, bekommt Nacht, und der Schalter oben rechts
   ueberschreibt beides.

   Die Buntheit traegt Information: jeder Club hat seine eigene Farbe, und
   die bleibt ueberall dieselbe - im Chip auf der Karte, im Balken der
   Uebersicht, im Kaestchen der Heatmap. Die Farbe gehoert dem Club, nicht
   seinem Platz in der Rangliste: ueberholt ein Club einen anderen, behalten
   beide ihre Farbe.

   Die acht Clubfarben sind auf Unterscheidbarkeit geprueft, auch bei
   Rot-Gruen- und Blau-Gelb-Schwaeche. Der Clubname steht ausserdem immer
   daneben - die Farbe hilft beim Wiedererkennen, sie traegt die Information
   nie allein.
   ========================================================================== */

:root {
    /* Flaechen */
    --grund:         #F7F5FB;
    --grund-tief:    #EDE9F6;
    --flaeche:       #FFFFFF;
    --flaeche-hover: #F2EEFA;

    /* Linien */
    --rahmen:        #E0DAEE;
    --rahmen-stark:  #BDB4D4;

    /* Schrift */
    --text:          #35303F;
    --text-hell:     #18141F;
    --leise:         #78728A;
    --neutral:       #A49CB8;
    --auf-farbe:     #FFFFFF;

    /* Akzent */
    --akzent:        #7A2FE0;
    --akzent-tief:   #5C1CB5;

    /* Rueckmeldung */
    --gut:           #00874A;
    --gut-flaeche:   #E0F4EA;

    /* Abstufung fuer Mengen: eine Farbe, hell nach kraeftig.
       Kein Regenbogen - bei einer Skala bedeutet mehr Farbe mehr Wert. */
    /* Diagramm-Gitter: deutlich sichtbarer als die Flaechenrahmen.
       Als Rahmenfarbe waere es fast unsichtbar - im Diagramm braucht man
       es aber zum Ablesen. */
    --chart-gitter:  #C3BBD8;

    --skala-1:       #F0E7FD;
    --skala-2:       #D7C0F7;
    --skala-3:       #AC7BEC;
    --skala-4:       #8B45E3;
    --skala-5:       #5C1CB5;

    /* Clubfarben */
    --club-1:        #00874A;   /* Gruen   */
    --club-2:        #7A2FE0;   /* Violett */
    --club-3:        #D4590A;   /* Orange  */
    --club-4:        #0082B8;   /* Cyan    */
    --club-5:        #D6197A;   /* Pink    */
    --club-6:        #1159D9;   /* Blau    */
    --club-7:        #6E7A00;   /* Oliv    */
    --club-rest:     #7D7A88;

    /* Heatmap: eigene Abstufung mit Abstand zum Leerzustand */
    --heat-leer:     #E6E1F2;
    --heat-1:        #C9ADF2;
    --heat-2:        #A273E3;
    --heat-3:        #7A2FE0;
    --heat-4:        #4E1596;
}

/* Nacht: eigene Werte aus denselben Farbfamilien, nicht die hellen
   umgedreht - auf dunklem Grund braucht es andere Helligkeiten. */
/* Diese Palette gilt fuer beide Wege ins dunkle Thema: den Schalter und
   die Systemeinstellung. Das Skript in nav.php setzt data-thema auch dann,
   wenn nichts gewaehlt wurde - so stehen die Werte nur an dieser einen
   Stelle und koennen nicht auseinanderlaufen. */
:root[data-thema="nacht"] {
    --grund:         #16142B;
    --grund-tief:    #0F0E1E;
    --flaeche:       #1E1C3A;
    --flaeche-hover: #282450;

    --rahmen:        #322E58;
    --rahmen-stark:  #484273;

    --text:          #C5C1E0;
    --text-hell:     #F0EEF9;
    --leise:         #8B86AC;
    --neutral:       #6B6690;
    --auf-farbe:     #16142B;

    --akzent:        #9B7BDB;
    --akzent-tief:   #7B57C4;

    --gut:           #2E9B63;
    --gut-flaeche:   #17301F;

    --chart-gitter:  #564E8C;

    --skala-1:       #2B2552;
    --skala-2:       #453A80;
    --skala-3:       #6A55B5;
    --skala-4:       #9B7BDB;
    --skala-5:       #C7B0F5;

    --club-1:        #2E9B63;
    --club-2:        #8A66CE;
    --club-3:        #CC6B2E;
    --club-4:        #118FB5;
    --club-5:        #CB5189;
    --club-6:        #4A80CE;
    --club-7:        #8E9634;
    --club-rest:     #6E6A8C;

    --heat-leer:     #262046;
    --heat-1:        #4F3F96;
    --heat-2:        #7A5FC9;
    --heat-3:        #A98AE6;
    --heat-4:        #D4BFFA;
}

body {
font-family: -apple-system, system-ui, sans-serif;
max-width: 720px;
margin: 0 auto;
padding: 2rem 1rem;
background: var(--grund);
color: var(--text);
}

h1 {
color: var(--akzent);
border-bottom: 2px solid var(--akzent);
padding-bottom: 0.5rem;
font-weight: 700;
font-size: 1.6rem;
margin: 0 0 1rem;
}

.subtitle {
color: var(--text);
font-size: 0.85rem;
margin-bottom: 1.5rem;
}

ul.events {
list-style: none;
padding: 0;
}

ul.events li {
padding: 0.7rem;
border-bottom: 1px solid var(--rahmen);
display: grid;
grid-template-columns: 100px 100px 1fr 55px 45px 50px;
gap: 1.5rem;
align-items: center;
font-size: 0.9rem;
}

.datum { color: var(--text); font-weight: 600; }
.wochentag { color: var(--akzent); }
.titel { color: var(--text); }

.suche-form {
display: flex;
gap: 0.5rem;
margin: 2rem 0;
}

.suche-form input[type="text"] {
flex: 1;
padding: 0.6rem;
font-size: 1rem;
background: var(--rahmen);
color: var(--text);
border: 1px solid var(--rahmen);
border-radius: 4px;
font-family: inherit;
}

.suche-form button {
padding: 0.6rem 1.2rem;
font-size: 1rem;
background: var(--akzent);
color: var(--auf-farbe);
border: none;
border-radius: 4px;
cursor: pointer;
font-family: inherit;
}

.suche-form button:hover {
background: var(--akzent-tief);
}

.ergebnis {
margin-top: 2rem;
padding: 1.5rem;
background: var(--rahmen);
border-radius: 8px;
border-left: 4px solid var(--akzent);
}

.zahl {
color: var(--akzent);
font-weight: bold;
}

ul.artist-liste {
list-style: none;
padding: 0;
margin-top: 1rem;
}

ul.artist-liste li {
padding: 0.6rem;
border-bottom: 1px solid var(--rahmen);
display: flex;
justify-content: space-between;
align-items: center;
}

ul.artist-liste a {
color: var(--text);
text-decoration: none;
}

ul.artist-liste a:hover {
color: var(--akzent);
}

.back {
display: inline-block;
margin-bottom: 1rem;
color: var(--text);
text-decoration: none;
font-size: 0.9rem;
}

.back:hover { color: var(--akzent); }

.meta {
color: var(--text);
margin-bottom: 2rem;
}

.badge {
display: inline-block;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.85rem;
font-weight: bold;
margin-right: 0.5rem;
}

.badge.flinta { background: var(--akzent); color: var(--text); }
.badge.male { background: var(--neutral); color: var(--text); }
.badge.unknown { background: var(--text); color: var(--auf-farbe); }

.zahl-gross {
color: var(--akzent);
font-size: 1.4rem;
font-weight: bold;
}

.slots-header {
display: grid;
grid-template-columns: 100px 100px 80px 1fr;
gap: 1.5rem;
padding: 0.7rem;
border-bottom: 2px solid var(--akzent);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text);
font-weight: 700;
margin-top: 1rem;
}

ul.slots {
list-style: none;
padding: 0;
}

ul.slots li {
padding: 0.7rem;
border-bottom: 1px solid var(--rahmen);
display: grid;
grid-template-columns: 100px 100px 80px 1fr;
gap: 1.5rem;
align-items: center;
font-size: 0.9rem;
}

.floor { color: var(--akzent); font-size: 0.8rem; }
.zeit { color: var(--text); }

/* ========== TOP-LISTEN ========== */

.top-listen {
margin-top: 3rem;
padding-top: 2rem;
border-top: 1px solid var(--rahmen);
}

.top-listen h2 {
color: var(--akzent);
font-size: 1.2rem;
margin-bottom: 1.5rem;
}

.floors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.floor-block {
background: var(--flaeche);
border: 1px solid var(--rahmen);
border-radius: 8px;
padding: 1.2rem;
}

.floor-block h3 {
color: var(--akzent);
font-size: 1.1rem;
margin: 0 0 0.3rem;
font-weight: 700;
}

.flinta-hinweis {
color: var(--text);
opacity: 0.7;
font-size: 0.8rem;
margin: 0 0 1.2rem;
padding-bottom: 0.8rem;
border-bottom: 1px solid var(--rahmen);
}

.flinta-prozent {
color: var(--akzent);
font-weight: bold;
font-size: 0.95rem;
opacity: 1;
}

ol.top-liste {
list-style: none;
padding: 0;
margin: 0;
counter-reset: item;
}

ol.top-liste li {
padding: 0.5rem 0;
border-bottom: 1px solid var(--rahmen);
display: grid;
grid-template-columns: 24px 1fr 50px 35px;
align-items: center;
gap: 0.6rem;
font-size: 0.9rem;
counter-increment: item;
}

.top-listen ol.top-liste .badge-mini {
    justify-self: stretch;
    text-align: center;
}

ol.top-liste li:last-child { border-bottom: none; }

ol.top-liste li::before {
content: counter(item) ".";
color: var(--text);
opacity: 0.5;
font-size: 0.8rem;
text-align: right;
}

.top-listen ol.top-liste li a {
color: var(--text);
text-decoration: none;
font-weight: 500;
}

.top-listen ol.top-liste li a:hover {
color: var(--akzent);
}

.top-listen ol.top-liste .zahl {
    justify-self: end;
    color: var(--akzent);
    font-weight: bold;
    font-size: 0.85rem;
}

.top-listen ol.top-liste li .badge-mini {
display: inline-block;
padding: 2px 6px;
border-radius: 3px;
font-size: 0.65rem;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 0.05em;
}

.top-listen ol.top-liste li .badge-mini.flinta { background: var(--akzent); color: var(--text); }
.top-listen ol.top-liste li .badge-mini.male { background: var(--neutral); color: var(--text); }
.top-listen ol.top-liste li .badge-mini.unknown { background: var(--rahmen); color: var(--text); }

.zeitraum-form {
    display: flex;
    align-items: end;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.zeitraum-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--text);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.zeitraum-form select {
    padding: 0.5rem 0.6rem;
    font-size: 0.95rem;
    background: var(--rahmen);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
}

.zeitraum-form button {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.zeitraum-form button:hover {
    background: var(--akzent-tief);
}

.fussnote {
color: var(--text);
opacity: 0.5;
font-size: 0.75rem;
margin-top: 1.5rem;
font-style: italic;
}

.kodierung-form {
    margin-top: 2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    overflow: hidden;
}

.kodierung-header,
.kodierung-zeile {
    display: grid;
    grid-template-columns: 40px 1fr 100px 70px 260px;
    gap: 0.8rem;
    align-items: center;
    padding: 0.7rem 1rem;
}

.kodierung-header {
    background: var(--rahmen);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    font-weight: 700;
}

.kodierung-zeile {
    border-bottom: 1px solid var(--rahmen);
    font-size: 0.9rem;
}

.kodierung-zeile:last-child {
    border-bottom: none;
}

.kodierung-zeile .rang {
    color: var(--text);
    opacity: 0.5;
    font-size: 0.85rem;
}

.kodierung-zeile .name {
    color: var(--text);
    font-weight: 500;
}

.kodierung-zeile .links {
    display: flex;
    gap: 0.5rem;
}

.kodierung-zeile .links a {
    color: var(--akzent);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 2px 8px;
    border: 1px solid var(--akzent);
    border-radius: 3px;
}

.kodierung-zeile .links a:hover {
    background: var(--akzent);
    color: var(--auf-farbe);
}

.kodierung-zeile .auftritte {
    color: var(--akzent);
    font-weight: bold;
    font-size: 0.9rem;
}

.kodierung-zeile .radios {
    display: flex;
    gap: 0.6rem;
}

.kodierung-zeile .radios label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    background: var(--rahmen);
}

.kodierung-zeile .radios label:hover {
    background: var(--rahmen-stark);
}

.kodierung-zeile .radios input[type="radio"] {
    cursor: pointer;
    accent-color: var(--akzent);
}

.kodierung-actions {
    padding: 1.5rem 1rem;
    text-align: right;
    background: var(--grund);
    border-top: 1px solid var(--rahmen);
}

.kodierung-actions button {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.kodierung-actions button:hover {
    background: var(--akzent-tief);
}

.erfolg {
    margin: 1rem 0 1.5rem;
    padding: 0.8rem 1rem;
    background: var(--gut-flaeche);
    border-left: 4px solid var(--gut);
    color: var(--text);
    border-radius: 4px;
    font-size: 0.9rem;
}

.reset-hinweis {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text);
    opacity: 0.6;
    text-align: center;
}

.reset-hinweis a {
    color: var(--akzent);
    text-decoration: none;
    margin-left: 0.5rem;
}

.reset-hinweis a:hover {
    text-decoration: underline;
}

.export-hinweis {
    margin-top: 2rem;
    text-align: center;
}

.export-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--flaeche);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
}

.export-link:hover {
    background: var(--rahmen);
    color: var(--akzent);
    border-color: var(--akzent);
}

.direkt-suche {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.direkt-suche h2 {
    color: var(--akzent);
    font-size: 1.1rem;
    margin: 0 0 1rem;
}

.direkt-ergebnisse {
    margin-top: 1.5rem;
}

.direkt-zeile {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.direkt-zeile .name {
    color: var(--text);
    font-weight: 600;
}

.direkt-zeile .aktueller-code {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.8rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.direkt-zeile .anzahl-info {
    color: var(--akzent);
    font-size: 0.8rem;
    font-weight: bold;
}

.direkt-zeile .links {
    display: flex;
    gap: 0.3rem;
}

.direkt-zeile .links a {
    color: var(--akzent);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 2px 6px;
    border: 1px solid var(--akzent);
    border-radius: 3px;
}

.direkt-zeile .links a:hover {
    background: var(--akzent);
    color: var(--auf-farbe);
}

.direkt-form {
    display: flex;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.direkt-form button {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    background: var(--rahmen);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.direkt-form button:hover:not(:disabled) {
    background: var(--akzent);
    color: var(--auf-farbe);
    border-color: var(--akzent);
}

.direkt-form button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.trenner {
    margin: 3rem 0 2rem;
    border: none;
    border-top: 1px solid var(--rahmen);
}

/* ========== EVENTS-FILTER ========== */

.events-filter-form {
    margin: 2rem 0;
    padding: 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.4rem 1rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    margin: 0;
}

.filter-group input[type="radio"] {
    accent-color: var(--akzent);
    cursor: pointer;
}

.events-filter-form > .filter-row > label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.events-filter-form input[type="date"],
.events-filter-form select {
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    background: var(--rahmen);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
}

.proseite-label select {
    min-width: 70px;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rahmen);
}

.filter-actions button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.filter-actions button:hover {
    background: var(--akzent-tief);
}

.reset-link {
    color: var(--text);
    opacity: 0.6;
    text-decoration: none;
    font-size: 0.85rem;
}

.reset-link:hover {
    color: var(--akzent);
    opacity: 1;
}

/* ========== PAGINATION ========== */

.pagination {
    margin-top: 2rem;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.page-link {
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    background: var(--rahmen);
    border-radius: 4px;
    font-size: 0.85rem;
}

.page-link:hover {
    background: var(--akzent);
    color: var(--auf-farbe);
}

.page-info {
    color: var(--text);
    font-size: 0.9rem;
    padding: 0 1rem;
    font-weight: 600;
}



/* ========== MOBILE ========== */



body.index {
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--grund-tief);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doorman {
    text-align: center;
    padding: 2rem;
}

.doorman h1 {
    color: var(--text);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    border: none;
    padding: 0;
    margin: 0;
    font-family: -apple-system, system-ui, sans-serif;
}



.floor-section {
    margin-top: 2rem;
}

ol.event-slots-liste {
    list-style: none;
    padding: 0;
    margin: 0;
}

ol.event-slots-liste li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rahmen);
    display: grid;
    grid-template-columns: 60px 1fr 50px 30px ;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

ol.event-slots-liste .auftritte-count {
    justify-self: end;
    color: var(--akzent);
    font-weight: bold;
    font-size: 0.85rem;
}

ol.event-slots-liste li:last-child {
    border-bottom: none;
}

ol.event-slots-liste .zeit {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.85rem;
    font-weight: 500;
}

ol.event-slots-liste a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

ol.event-slots-liste a:hover {
    color: var(--akzent);
}

ol.event-slots-liste .badge-mini {
   display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.05em;
    justify-self: stretch;
    text-align: center;
}

ol.event-slots-liste .badge-mini.flinta { background: var(--akzent); color: var(--auf-farbe); }
ol.event-slots-liste .badge-mini.male { background: var(--neutral); color: var(--text); }
ol.event-slots-liste .badge-mini.unknown { background: var(--rahmen); color: var(--text); opacity: 0.6; }

ol.event-slots-liste .auftritte-count {
    color: var(--akzent);
    font-weight: bold;
    font-size: 0.85rem;
}

.wink {
    margin-top: 3rem;
    font-size: 0.75rem;
    opacity: 0.3;
}

.wink a,
.wink a:link,
.wink a:visited {
    color: var(--text);
    text-decoration: none !important;
    letter-spacing: 0.05em;
}

.wink a:hover,
.wink a:active {
    color: var(--akzent);
    opacity: 1;
}

ul.slots li a.titel {
    color: var(--text);
    text-decoration: none;
}

ul.slots li a.titel:hover {
    color: var(--akzent);
}

.event-typ-filter {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-left: 1rem;
    border-left: 1px solid var(--rahmen);
}

.event-typ-filter label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

.event-typ-filter input[type="radio"] {
    accent-color: var(--akzent);
    cursor: pointer;
}

.filter-info {
    color: var(--text);
    opacity: 0.5;
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: normal;
}




/* ========== EVENT-DETAILSEITE ========== */

.meta .datum-gross {
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    margin-right: 0.8rem;
}

.meta .program-typ {
    display: inline-block;
    padding: 2px 8px;
    background: var(--rahmen);
    color: var(--text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 3px;
    opacity: 0.7;
}

.floor-section {
    margin-top: 2.5rem;
}

.floor-title {
    color: var(--akzent);
    font-size: 1.1rem;
    margin: 0 0 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--akzent);
    font-weight: 700;
}

ul.event-slots {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.event-slots li {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid var(--rahmen);
    font-size: 0.9rem;
}

ul.event-slots li:last-child {
    border-bottom: none;
}

ul.event-slots .zeit {
    color: var(--text);
    font-weight: 500;
}

ul.event-slots .artist-name {
    color: var(--text);
    text-decoration: none;
}

ul.event-slots .artist-name:hover {
    color: var(--akzent);
}

ul.event-slots .badge-mini {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.05em;
}

ul.event-slots .badge-mini.flinta { background: var(--akzent); color: var(--auf-farbe); }
ul.event-slots .badge-mini.male { background: var(--neutral); color: var(--text); }
ul.event-slots .badge-mini.unknown { background: var(--rahmen); color: var(--text); opacity: 0.6; }

/* Klickbarer Event-Titel in Event-Liste */
.titel-link {
    color: var(--text);
    text-decoration: none;
}

.titel-link:hover {
    color: var(--akzent);
}

/* ========== BOOKING HYPE ANZEIGE ========== */

.bh-anzeige {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0 0.5rem;
}

.bh-block {
    flex: 1;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    text-align: center;
}

.bh-label {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.bh-wert {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.bh-wert.sehr-hoch { color: var(--akzent); }
.bh-wert.hoch { color: var(--skala-4); }
.bh-wert.mittel { color: var(--text); }
.bh-wert.niedrig { color: var(--leise); }
.bh-wert.sehr-niedrig { color: var(--neutral); }

.bh-info {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.75rem;
}

.bh-fussnote {
    color: var(--text);
    opacity: 0.5;
    font-size: 0.75rem;
    font-style: italic;
    margin: 0.5rem 0 2rem;
}


.bh-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    min-width: 30px;
    text-align: center;
    box-sizing: border-box;
}

.bh-chip.sehr-hoch { background: var(--akzent); color: var(--auf-farbe); }
.bh-chip.hoch { background: var(--skala-4); color: var(--auf-farbe); }
.bh-chip.mittel { background: var(--neutral); color: var(--text); }
.bh-chip.niedrig { background: var(--rahmen); color: var(--text); opacity: 0.6; }
.bh-chip.sehr-niedrig { background: var(--rahmen); color: var(--text); opacity: 0.4; }
.bh-chip.keine { background: var(--rahmen); color: var(--text); opacity: 0.3; font-style: italic; }

.schlange-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    min-width: 25px;
    text-align: center;
    box-sizing: border-box;
}

.schlange-chip.sehr-hoch { background: var(--akzent); color: var(--auf-farbe); }
.schlange-chip.hoch { background: var(--skala-4); color: var(--auf-farbe); }
.schlange-chip.mittel { background: var(--neutral); color: var(--text); }
.schlange-chip.niedrig { background: var(--rahmen); color: var(--text); opacity: 0.7; }
.schlange-chip.sehr-niedrig { background: var(--rahmen); color: var(--text); opacity: 0.5; }
.schlange-chip.keine { background: var(--rahmen); color: var(--text); opacity: 0.3; font-style: italic; }

.event-stats {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

.stat-block {
    flex: 1;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-wert {
    color: var(--text);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-wert.flinta {
    color: var(--akzent);
}

.stat-info {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.75rem;
}

.flinta-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    min-width: 40px;
    text-align: center;
    box-sizing: border-box;
}

.flinta-chip.hoch { background: var(--akzent); color: var(--auf-farbe); }
.flinta-chip.mittel { background: var(--neutral); color: var(--text); }
.flinta-chip.niedrig { background: var(--rahmen); color: var(--text); opacity: 0.7; }
.flinta-chip.keine { background: var(--rahmen); color: var(--text); opacity: 0.3; font-style: italic; }


.events-header {
    display: grid;
    grid-template-columns: 100px 100px 1fr 55px 45px 50px;
    gap: 1.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--flaeche);
    border-bottom: 2px solid var(--rahmen);
    color: var(--text);
    opacity: 0.6;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

.events-header span:nth-child(4),
.events-header span:nth-child(5) {
    text-align: center;
}


/* ========== STATISTIK-SEITE ========== */

.statistik-nav {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 2rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--rahmen);
}

.statistik-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
}

.statistik-nav a.active {
    background: var(--akzent);
    color: var(--auf-farbe);
    font-weight: bold;
}

.statistik-nav a.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.statistik-nav a:not(.active):not(.disabled):hover {
    color: var(--akzent);
}

.statistik-filter {
    margin: 1.5rem 0 2.5rem;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.statistik-filter .filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.statistik-filter label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--text);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.statistik-filter select {
    padding: 0.4rem 0.6rem;
    background: var(--rahmen);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.85rem;
}

.statistik-filter button {
    padding: 0.5rem 1rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    font-size: 0.85rem;
}

.statistik-filter button:hover {
    background: var(--akzent-tief);
}

.granularitaet-info {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.75rem;
    margin-left: auto;
}

.chart-section {
    margin: 2rem 0 3rem;
    padding: 1.5rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.chart-section h2 {
    color: var(--akzent);
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.chart-info {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.8rem;
    margin: 0 0 1.5rem;
}

.chart-container {
    height: 400px;
    position: relative;
}

.corona-grid {
    display: grid;
    /* minmax(0, 1fr) statt 1fr: ein blosses 1fr hat min-width:auto und
       laesst seinen Inhalt nicht schrumpfen - die Diagramme druecken das
       Raster dann breiter als die Seite. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.corona-grid h3 {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.chart-container-small {
    height: 300px;
    position: relative;
}


/* ========== TAGEBUCH ========== */

.tagebuch-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.substanz-uebersicht {
    margin: 2rem 0;
    padding: 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.substanz-uebersicht h2 {
    color: var(--akzent);
    font-size: 1rem;
    margin: 0 0 1rem;
}

.substanz-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.substanz-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    background: var(--grund);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
}

.substanz-item.nuechtern {
    background: var(--rahmen);
    border: 1px solid var(--akzent);
}

.substanz-item .anzahl {
    color: var(--akzent);
    font-weight: bold;
    font-size: 0.8rem;
}

.substanz-uebersicht .hinweis {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.8rem;
    margin: 1rem 0 0;
}

.visits-liste {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.visit-block {
    padding: 1rem 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.visit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.visit-datum {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.85rem;
    margin-right: 0.8rem;
}

.visit-event {
    color: var(--akzent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.visit-event:hover {
    text-decoration: underline;
}

.visit-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0.5rem 0;
    color: var(--text);
    font-size: 0.85rem;
}

.detail-item {
    opacity: 0.85;
}

.visit-substanzen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0;
}

.sub-chip {
    padding: 3px 8px;
    background: var(--rahmen);
    color: var(--text);
    border-radius: 4px;
    font-size: 0.75rem;
}

.visit-kommentar {
    margin-top: 0.7rem;
    padding: 0.7rem 0.9rem;
    background: var(--rahmen);
    color: var(--text);
    font-size: 0.85rem;
    font-style: italic;
    border-radius: 4px;
}

.visit-chips {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}


/* ========== TAGEBUCH ANSICHTS-UMSCHALTER ========== */

.ansicht-nav {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0 1.5rem;
}

.ansicht-nav a {
    padding: 0.4rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    background: var(--rahmen);
    border-radius: 4px;
}

.ansicht-nav a.active {
    background: var(--akzent);
    color: var(--auf-farbe);
    font-weight: bold;
}

.ansicht-nav a:not(.active):hover {
    color: var(--akzent);
}

/* ========== TAGEBUCH LISTEN-ANSICHT ========== */

.visits-header {
    display: grid;
    grid-template-columns: 100px 1fr 60px 100px 80px 55px 50px;
    gap: 1rem;
    padding: 0.6rem 0.8rem;
    background: var(--flaeche);
    border-bottom: 2px solid var(--rahmen);
    color: var(--text);
    opacity: 0.6;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

.visits-header span:nth-child(3),
.visits-header span:nth-child(4),
.visits-header span:nth-child(5),
.visits-header span:nth-child(6),
.visits-header span:nth-child(7) {
    text-align: center;
}

ul.visits-tabelle {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.visits-tabelle li {
    display: grid;
    grid-template-columns: 100px 1fr 60px 100px 80px 55px 50px;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--rahmen);
    font-size: 0.9rem;
}

ul.visits-tabelle li:last-child {
    border-bottom: none;
}

ul.visits-tabelle .datum {
    color: var(--text);
    opacity: 0.7;
}

ul.visits-tabelle .titel-link {
    color: var(--text);
    text-decoration: none;
}

ul.visits-tabelle .titel-link:hover {
    color: var(--akzent);
}

ul.visits-tabelle .zeit-cell,
ul.visits-tabelle .sub-cell,
ul.visits-tabelle .geld-cell {
    color: var(--text);
    font-size: 0.85rem;
    text-align: center;
}

ul.visits-tabelle .sub-cell {
    font-size: 1rem;
}

/* ========== VISIT-BANNER + DJ-CHECKBOXEN ========== */

.tagebuch-link {
    color: var(--akzent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.tagebuch-link:hover {
    text-decoration: underline;
}

/* Slots-Liste braucht jetzt mehr Spalten wenn Checkbox da ist */
ol.event-slots-liste li.toggle-slot {
    cursor: pointer;
    transition: background-color 0.15s;
}

ol.event-slots-liste li.toggle-slot:hover {
    background: var(--flaeche-hover);
}

ol.event-slots-liste li.toggle-slot.gesehen {
    background: rgba(214, 35, 39, 0.12);
}

ol.event-slots-liste li.toggle-slot.gesehen a.dj-link {
    color: var(--akzent);
    font-weight: 700;
}

.hidden-checkbox {
    display: none;
}

.djs-speichern-action {
    margin: 1.5rem 0;
    text-align: center;
}

.djs-speichern-action button {
    padding: 0.7rem 1.5rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    font-size: 0.95rem;
}

.djs-speichern-action button:hover {
    background: var(--akzent-tief);
}

.visit-block.hat-djs {
    border-left: 3px solid var(--akzent);
}

.djs-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    background: var(--akzent);
    color: var(--auf-farbe);
    letter-spacing: 0.03em;
}


.top-djs-uebersicht {
    margin: 2rem 0;
    padding: 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.top-djs-uebersicht h2 {
    color: var(--akzent);
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.top-djs-uebersicht .hinweis {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.8rem;
    margin: 0 0 1rem;
}

ol.top-djs-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: djs-liste;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

ol.top-djs-liste li {
    counter-increment: djs-liste;
    display: grid;
    grid-template-columns: 24px 1fr 55px 40px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.7rem;
    background: var(--grund);
    border-radius: 4px;
    font-size: 0.85rem;
}

ol.top-djs-liste li::before {
    content: counter(djs-liste) ".";
    color: var(--text);
    opacity: 0.5;
    font-size: 0.8rem;
}

ol.top-djs-liste li a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

ol.top-djs-liste li a:hover {
    color: var(--akzent);
}

ol.top-djs-liste .badge-mini {
    justify-self: stretch;
    text-align: center;
}

ol.top-djs-liste .dj-anzahl {
    color: var(--akzent);
    font-weight: bold;
    text-align: right;
    font-size: 0.85rem;
}

ol.top-djs-liste .badge-mini.flinta { background: var(--akzent); color: var(--auf-farbe); }
ol.top-djs-liste .badge-mini.male { background: var(--neutral); color: var(--text); }
ol.top-djs-liste .badge-mini.unknown { background: var(--rahmen); color: var(--text); opacity: 0.6; }

ol.top-djs-liste .badge-mini {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.05em;
}

/* ========== VISIT-BANNER (TOP, EVENT-DETAIL) ========== */

.visit-banner-top {
    margin: 1.5rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-left: 4px solid var(--akzent);
    border-radius: 8px;
}

.visit-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.visit-banner-header .tagebuch-link {
    color: var(--akzent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.visit-banner-header .tagebuch-link:hover {
    text-decoration: underline;
}

.visit-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.visit-info-block {
    padding: 0.7rem;
    background: var(--grund);
    border-radius: 4px;
    text-align: center;
}

.visit-info-label {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.visit-info-wert {
    color: var(--akzent);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.visit-info-detail {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.7rem;
}

.visit-substanzen-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.6rem 0;
    border-top: 1px solid var(--rahmen);
}

.visit-substanzen-row .visit-info-label {
    margin: 0 0.5rem 0 0;
}

.visit-kommentar-inline {
    margin-top: 0.7rem;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    font-style: italic;
}




/* ========== QUEUE REVIEW ========== */

.review-progress {
    padding: 0.8rem 1rem;
    background: var(--flaeche);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
    margin: 1rem 0;
}

.review-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 0.8rem;
    background: var(--flaeche);
    border-radius: 4px;
}

.review-nav a, .review-nav .disabled {
    color: var(--akzent);
    text-decoration: none;
    font-size: 0.9rem;
}

.review-nav .disabled {
    color: var(--neutral);
}

.review-nav .event-link {
    color: var(--text);
    font-size: 0.85rem;
}

.review-event-header {
    margin: 1.5rem 0 1rem;
}

.review-event-header h2 {
    color: var(--akzent);
    margin: 0 0 0.3rem;
}

.review-event-meta {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.85rem;
}

.messages-liste {
    margin: 1.5rem 0;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
}

.tag-separator {
    text-align: center;
    color: var(--text);
    opacity: 0.6;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1rem 0 0.5rem;
    padding: 0.3rem;
    border-top: 1px solid var(--rahmen);
    border-bottom: 1px solid var(--rahmen);
}

.msg {
    padding: 0.5rem 0.7rem;
    margin: 0.3rem 0;
    background: var(--grund);
    border-radius: 4px;
    display: grid;
    grid-template-columns: 50px 100px 100px 1fr;
    gap: 0.6rem;
    align-items: start;
    font-size: 0.85rem;
}

.msg-zeit {
    color: var(--text);
    opacity: 0.6;
    font-family: monospace;
}

.msg-sender {
    color: var(--skala-4);
    font-weight: 600;
}

.msg-marker {
    color: var(--text);
    font-size: 0.7rem;
    background: var(--rahmen);
    padding: 2px 6px;
    border-radius: 3px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    align-self: center;
    justify-self: start;
}

.msg-text {
    color: var(--text);
}

.stufe-form {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    text-align: center;
}

.stufe-form p {
    color: var(--text);
    margin: 0 0 1rem;
}

.stufe-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.6rem;
    margin: 1rem 0;
}

.stufe-btn {
    padding: 1rem 0.5rem;
    background: var(--rahmen);
    color: var(--text);
    border: 2px solid var(--rahmen);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.15s;
}

.stufe-btn small {
    display: block;
    font-size: 0.65rem;
    font-weight: normal;
    opacity: 0.7;
    margin-top: 0.3rem;
}

.stufe-btn:hover {
    border-color: var(--akzent);
    color: var(--akzent);
}

.stufe-1 { border-left: 4px solid var(--neutral); }
.stufe-2 { border-left: 4px solid var(--leise); }
.stufe-3 { border-left: 4px solid var(--leise); }
.stufe-4 { border-left: 4px solid var(--skala-4); }
.stufe-5 { border-left: 4px solid var(--akzent); }

.stufe-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rahmen);
}

.stufe-skip, .stufe-reset {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.stufe-skip:hover, .stufe-reset:hover {
    border-color: var(--text);
}
/* ========== BESUCHS-FORMULAR (visit_edit.php) ========== */

.visit-form {
    margin: 1.5rem 0;
}

.visit-form fieldset {
    margin: 0 0 1.2rem;
    padding: 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.visit-form legend {
    padding: 0 0.5rem;
    color: var(--akzent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.feld {
    display: block;
    margin-bottom: 0.8rem;
}

.feld:last-child {
    margin-bottom: 0;
}

.feld-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.feld-hinweis {
    display: block;
    margin: 0.4rem 0 0;
    color: var(--text);
    font-size: 0.75rem;
    opacity: 0.5;
    font-style: italic;
}

.feld-reihe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.visit-form input[type="text"],
.visit-form input[type="date"],
.visit-form input[type="number"],
.visit-form textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    background: var(--rahmen);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.visit-form input[type="date"] {
    color-scheme: dark;
}

.visit-form input:focus,
.visit-form textarea:focus {
    outline: none;
    border-color: var(--akzent);
}

.visit-form textarea {
    resize: vertical;
    line-height: 1.5;
}

.visit-form input::placeholder,
.visit-form textarea::placeholder {
    color: var(--text);
    opacity: 0.35;
}

/* --- Schlangenlänge: Kacheln statt Radios --- */

.schlange-wahl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.schlange-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.7rem 0.4rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s, border-color 0.15s;
}

.schlange-option input[type="radio"] {
    display: none;
}

.schlange-option:hover {
    background: var(--flaeche-hover);
}

.schlange-option:has(input:checked) {
    background: rgba(214, 35, 39, 0.12);
    border-color: var(--akzent);
}

.schlange-nr {
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.schlange-text {
    color: var(--text);
    font-size: 0.7rem;
    opacity: 0.7;
}

.schlange-option:has(input:checked) .schlange-nr,
.schlange-option:has(input:checked) .schlange-text {
    color: var(--akzent);
    opacity: 1;
}

/* --- Substanzen und Begleitung: Kacheln statt Checkboxen --- */

.substanz-wahl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.substanz-option,
.checkbox-zeile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.7rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text);
    font-size: 0.85rem;
    transition: background-color 0.15s, border-color 0.15s;
}

.substanz-option input[type="checkbox"],
.checkbox-zeile input[type="checkbox"] {
    display: none;
}

.substanz-option:hover,
.checkbox-zeile:hover {
    background: var(--flaeche-hover);
}

.substanz-option:has(input:checked),
.checkbox-zeile:has(input:checked) {
    background: rgba(214, 35, 39, 0.12);
    border-color: var(--akzent);
}

.substanz-option:has(input:checked) span,
.checkbox-zeile:has(input:checked) span {
    color: var(--akzent);
    font-weight: 700;
}

.checkbox-zeile {
    justify-content: flex-start;
    margin-bottom: 0.8rem;
}

/* --- Aktionen --- */

.form-aktionen {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn-primaer {
    padding: 0.75rem 1.5rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
}

.btn-primaer:hover {
    background: var(--akzent-tief);
}

.btn-abbrechen {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
}

.btn-abbrechen:hover {
    opacity: 1;
    color: var(--akzent);
}

.loeschen-form {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rahmen);
}

.btn-loeschen {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--neutral);
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    opacity: 0.7;
}

.btn-loeschen:hover {
    border-color: var(--akzent);
    color: var(--akzent);
    opacity: 1;
}

.fehler {
    margin: 1rem 0;
    padding: 0.9rem 1.1rem;
    background: rgba(214, 35, 39, 0.12);
    border-left: 4px solid var(--akzent);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.9rem;
}

.fehler p {
    margin: 0.2rem 0;
}

/* ========== BESUCHS-BUTTON AUF EVENT-DETAIL ========== */

.visit-cta {
    margin: 1.5rem 0;
}

.btn-visit-neu {
    display: inline-block;
    padding: 0.7rem 1.3rem;
    background: var(--flaeche);
    color: var(--text);
    border: 1px solid var(--neutral);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-visit-neu:hover {
    border-color: var(--akzent);
    color: var(--akzent);
}

.btn-visit-bearbeiten {
    color: var(--text);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.7;
    border-bottom: 1px solid var(--neutral);
}

.btn-visit-bearbeiten:hover {
    color: var(--akzent);
    opacity: 1;
    border-color: var(--akzent);
}

/* ========== SCHLANGENLÄNGEN-LISTE (queue_edit.php) ========== */

.queue-filter {
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.queue-filter-zeile {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.queue-filter-label {
    flex-shrink: 0;
    width: 55px;
    color: var(--text);
    opacity: 0.6;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.queue-jahre,
.queue-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.queue-jahr,
.queue-toggle {
    padding: 0.25rem 0.6rem;
    background: var(--grund);
    color: var(--text);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
}

.queue-jahr:hover,
.queue-toggle:hover {
    border-color: var(--neutral);
    color: var(--akzent);
}

.queue-jahr.active,
.queue-toggle.active {
    background: var(--akzent);
    border-color: var(--akzent);
    color: var(--auf-farbe);
    font-weight: 700;
}

.queue-trenner {
    width: 1px;
    height: 18px;
    background: var(--rahmen);
    margin: 0 0.4rem;
}

.queue-fortschritt {
    margin: 0.8rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--rahmen);
    color: var(--text);
    font-size: 0.8rem;
    opacity: 0.7;
}

.queue-leer {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    color: var(--text);
    text-align: center;
    font-style: italic;
    opacity: 0.6;
}

.queue-liste {
    margin: 1.5rem 0;
}

.queue-zeile {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--rahmen);
}

.queue-zeile:last-child {
    border-bottom: none;
}

.queue-zeile.offen {
    background: rgba(255, 255, 255, 0.015);
}

.queue-event {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.queue-datum {
    flex-shrink: 0;
    color: var(--text);
    opacity: 0.6;
    font-size: 0.8rem;
}

.queue-titel {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-titel:hover {
    color: var(--akzent);
}

.queue-stufen {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.queue-stufe {
    cursor: pointer;
}

.queue-stufe input[type="radio"] {
    display: none;
}

.queue-stufe-nr {
    display: block;
    width: 32px;
    padding: 0.35rem 0;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.15s, border-color 0.15s;
}

.queue-stufe:hover .queue-stufe-nr {
    background: var(--flaeche-hover);
    border-color: var(--neutral);
}

.queue-stufe:has(input:checked) .queue-stufe-nr {
    background: rgba(214, 35, 39, 0.12);
    border-color: var(--akzent);
    color: var(--akzent);
}

.queue-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.7rem 0.8rem;
    background: var(--flaeche);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.7rem;
    opacity: 0.6;
}

.queue-speichern {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 3rem;
    padding: 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    position: sticky;
    bottom: 1rem;
}

.queue-anzahl {
    color: var(--text);
    opacity: 0.5;
    font-size: 0.8rem;
}

@media (max-width: 600px) {
    .queue-zeile {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.7rem 0.4rem;
    }

    .queue-event {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .queue-titel {
        white-space: normal;
    }

    .queue-stufen {
        justify-content: space-between;
    }

    .queue-stufe {
        flex: 1;
    }

    .queue-stufe-nr {
        width: auto;
    }

    .queue-filter-zeile {
        flex-direction: column;
        gap: 0.4rem;
    }

    .queue-filter-label {
        width: auto;
    }
}

/* ========== TAGEBUCH-STATISTIK ========== */

.abschnitt-titel {
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rahmen);
    color: var(--akzent);
    font-size: 1.3rem;
}

.chart-untertitel {
    margin: 1.8rem 0 0.8rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-fazit {
    margin: 1rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rahmen);
    color: var(--text);
    font-size: 0.85rem;
    opacity: 0.85;
}

.chart-fazit strong {
    color: var(--akzent);
}

/* Kennzahlen der Korrelation */

.korr-kennzahlen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.korr-block {
    padding: 1rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    text-align: center;
}

.korr-gruppen {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rahmen);
}

.korr-gruppen p {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.korr-gruppen strong {
    color: var(--akzent);
}

/* Einordnung der Ergebnisse */

.einordnung {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.einordnung h3 {
    margin: 0 0 0.8rem;
    color: var(--text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.einordnung p {
    margin: 0 0 0.8rem;
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.65;
    opacity: 0.8;
}

.einordnung p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .korr-kennzahlen {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .korr-block {
        padding: 0.7rem 0.4rem;
    }

    .korr-block .stat-wert {
        font-size: 1.4rem;
    }
}

/* ========== TAGEBUCH: NAVIGATION, FILTER, CLUBS ========== */

.tagebuch-nav {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--rahmen);
}

.tagebuch-nav a {
    padding: 0.45rem 1.1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -0.9rem;
}

.tagebuch-nav a.active {
    color: var(--akzent);
    border-bottom-color: var(--akzent);
}

.tagebuch-nav a:not(.active):hover {
    color: var(--text-hell);
}

.tagebuch-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin: 1.2rem 0 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--rahmen);
}

.filter-jahre {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.filter-chip {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 5px;
    color: var(--text);
    font-size: 0.82rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.filter-chip:hover {
    border-color: var(--rahmen-stark);
    color: var(--text-hell);
}

.filter-chip.active {
    background: var(--akzent);
    border-color: var(--akzent);
    color: var(--auf-farbe);
    font-weight: bold;
}

.filter-club-form {
    display: flex;
    gap: 0.4rem;
    margin: 0;
}

.filter-club-form select {
    max-width: 190px;
    padding: 0.3rem 0.5rem;
    background: var(--rahmen);
    border: 1px solid var(--rahmen);
    border-radius: 5px;
    color: var(--text);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
}

.filter-los {
    padding: 0.3rem 0.7rem;
    background: var(--rahmen);
    border: 1px solid var(--rahmen);
    border-radius: 5px;
    color: var(--text);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
}

.filter-reset {
    color: var(--text);
    font-size: 0.8rem;
    text-decoration: underline;
    opacity: 0.7;
}

.filter-reset:hover {
    color: var(--akzent);
    opacity: 1;
}

.hinweis-wechsel {
    margin: -1rem 0 1.5rem;
    color: var(--text);
    font-size: 0.85rem;
    opacity: 0.8;
}

.hinweis-wechsel a {
    color: var(--akzent);
}

.stat-abdeckung {
    opacity: 0.6;
}

.tagebuch-stats.bh-stats {
    margin-top: -0.5rem;
}

/* Clubuebersicht */

.club-uebersicht {
    margin: 2rem 0;
}

.club-uebersicht h2 {
    color: var(--akzent);
    font-size: 1rem;
    margin: 0 0 1rem;
}

.club-liste {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.club-item {
    display: grid;
    grid-template-columns: minmax(90px, 150px) 1fr auto auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.9rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
    font-size: 0.85rem;
}

.club-item .club-name {
    display: block;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.club-item .club-name:hover {
    color: var(--akzent);
}

.club-item.active {
    border-color: var(--akzent);
}

.club-item.active .club-name {
    color: var(--akzent);
    font-weight: 600;
}

.club-balken-spur {
    display: block;
    height: 6px;
    background: var(--grund);
    border-radius: 3px;
    overflow: hidden;
}

.club-balken {
    display: block;
    height: 100%;
    min-width: 3px;
    background: var(--akzent);
    border-radius: 3px;
}

.club-item .anzahl {
    min-width: 2.8rem;
    color: var(--akzent);
    font-weight: bold;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.club-item .club-stunden {
    min-width: 3.2rem;
    color: var(--text);
    text-align: right;
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

/* Clubkennzeichnung an den Besuchen */

.club-chip {
    display: inline-block;
    padding: 3px 8px;
    background: var(--rahmen);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.club-prefix {
    display: inline-block;
    margin-right: 0.45rem;
    padding: 1px 6px;
    background: var(--rahmen);
    border-radius: 3px;
    color: var(--text);
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Besuche ohne verknuepftes Event: kein Link, also auch keine Linkfarbe */

.visit-event.ohne-event,
.titel-link.ohne-event {
    color: var(--text);
    text-decoration: none;
    cursor: default;
}

.visit-event.ohne-event:hover {
    text-decoration: none;
}

.detail-item.unbekannt {
    opacity: 0.45;
}

.hinweis-luecke {
    opacity: 0.6;
}

/* Listenansicht ohne die Berghain-Spalten: fuenf statt sieben */

.visits-header.ohne-bh,
ul.visits-tabelle.ohne-bh li {
    grid-template-columns: 100px 1fr 60px 100px 80px;
}

@media (max-width: 600px) {
    .tagebuch-nav a {
        padding: 0.45rem 0.8rem;
        font-size: 0.85rem;
    }

    .club-item {
        grid-template-columns: minmax(70px, 1fr) auto auto;
        gap: 0.5rem;
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
    }

    /* Auf dem Handy ist fuer den Balken kein Platz */
    .club-balken-spur {
        display: none;
    }

    .filter-club-form select {
        max-width: none;
        flex: 1;
    }
}

/* ========== TAGEBUCH: EINTRAGEN UND BEARBEITEN ========== */

.neuer-besuch {
    margin: 0 0 1.5rem;
}

.btn-neu {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    background: var(--akzent);
    color: var(--auf-farbe);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: bold;
}

.btn-neu:hover {
    background: var(--akzent-tief);
}

.visit-aktionen {
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--rahmen);
    text-align: right;
}

.visit-bearbeiten {
    color: var(--text);
    font-size: 0.78rem;
    text-decoration: none;
    opacity: 0.6;
}

.visit-bearbeiten:hover {
    color: var(--akzent);
    opacity: 1;
}

/* Begleitung: drei Zustaende statt einer Checkbox */

.allein-wahl {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.allein-option {
    flex: 1;
    min-width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    background: var(--grund);
    border: 1px solid var(--rahmen);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.allein-option input[type="radio"] {
    display: none;
}

.allein-option:hover {
    border-color: var(--rahmen-stark);
}

.allein-wahl label:has(input:checked) {
    background: var(--akzent);
    border-color: var(--akzent);
    color: var(--auf-farbe);
    font-weight: bold;
}

.visit-form .club-fest {
    margin: 0 0 1rem;
    padding: 0.6rem 0.9rem;
    background: var(--grund);
    border-radius: 4px;
}

.visit-form .club-fest strong {
    color: var(--akzent);
}

.visit-form select {
    padding: 0.6rem;
    background: var(--rahmen);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
}

.fehler a {
    color: var(--akzent);
}

/* ========== KALENDER-HEATMAP ========== */

.heatmap-block {
    margin: 2rem 0;
    padding: 1.2rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.heatmap-block h2 {
    color: var(--akzent);
    font-size: 1rem;
    margin: 0 0 1.2rem;
}

.heatmap-jahr {
    margin-bottom: 1.5rem;
}

.heatmap-jahr:last-of-type {
    margin-bottom: 0;
}

.heatmap-kopf {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.heatmap-jahr-label {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

.heatmap-jahr-info {
    color: var(--text);
    opacity: 0.5;
    font-size: 0.75rem;
}

/* Auf schmalen Schirmen wird seitlich gescrollt statt gequetscht */
.heatmap-scroll {
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.heatmap-monate {
    display: grid;
    gap: 2px;
    margin-left: 26px;
    min-width: 620px;
    margin-bottom: 2px;
}

.heatmap-monat {
    color: var(--text);
    opacity: 0.45;
    font-size: 0.6rem;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
}

.heatmap-gitter {
    display: flex;
    gap: 4px;
    min-width: 620px;
}

.heatmap-wochentage {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 2px;
    width: 22px;
    flex: none;
}

.heatmap-wochentage span {
    color: var(--text);
    opacity: 0.4;
    font-size: 0.6rem;
    line-height: 10px;
}

.heatmap-tage {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 1fr);
    gap: 2px;
    flex: 1;
}

.heatmap-tag {
    display: block;
    aspect-ratio: 1;
    min-height: 9px;
    border-radius: 2px;
    background: var(--rahmen);
}

.heatmap-tag.ausserhalb { background: transparent; }
.heatmap-tag.leer       { background: var(--rahmen); }
.heatmap-tag.unbekannt  { background: var(--neutral); }
.heatmap-tag.s1         { background: var(--skala-2); }
.heatmap-tag.s2         { background: var(--skala-3); }
.heatmap-tag.s3         { background: var(--akzent); }
.heatmap-tag.s4         { background: var(--skala-5); }

.heatmap-legende {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rahmen);
}

.heatmap-legende .heatmap-tag {
    width: 10px;
    min-height: 10px;
    flex: none;
}

.heatmap-legende-text {
    color: var(--text);
    opacity: 0.5;
    font-size: 0.7rem;
    margin-right: 0.8rem;
}

@media (max-width: 600px) {
    .heatmap-block {
        padding: 1rem 0.8rem;
    }
}

/* ========== HAUPTNAVIGATION ========== */

.hauptnav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.6rem;
    margin: 0 0 1.5rem;
    padding: 0.8rem 0 1rem;
    border-bottom: 1px solid var(--rahmen);
}

.hauptnav-marke {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--akzent);
    color: var(--auf-farbe);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    flex: none;
}

.hauptnav-marke:hover {
    background: var(--akzent-tief);
}

.hauptnav-gruppe {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hauptnav-titel {
    color: var(--text);
    opacity: 0.4;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.hauptnav-gruppe.active .hauptnav-titel {
    color: var(--akzent);
    opacity: 0.8;
}

.hauptnav-punkte {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hauptnav-punkt {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}

.hauptnav-punkt:hover {
    color: var(--text-hell);
}

.hauptnav-punkt.active {
    color: var(--akzent);
    font-weight: 600;
    border-bottom-color: var(--akzent);
}

.hauptnav-punkt.nav-aktion {
    color: var(--akzent);
}

/* Pflege-Werkzeuge sichtbar abgesetzt: sie schreiben in die Datenbank.
   Kein margin-left:auto - der Body ist auf 720px begrenzt, die Gruppe
   bricht also ohnehin um und stuende sonst rechtsbuendig im Leeren. */
.hauptnav-pflege {
    padding-left: 1.2rem;
    border-left: 1px solid var(--rahmen);
}

.hauptnav-pflege .hauptnav-punkt {
    opacity: 0.55;
    font-size: 0.8rem;
}

.hauptnav-pflege .hauptnav-punkt:hover,
.hauptnav-pflege .hauptnav-punkt.active {
    opacity: 1;
}

@media (max-width: 600px) {
    .hauptnav {
        gap: 1rem 1.2rem;
        padding: 0.6rem 0 0.8rem;
    }

    .hauptnav-marke {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    .hauptnav-punkt {
        font-size: 0.8rem;
    }

    .hauptnav-pflege {
        padding-left: 0;
        border-left: none;
        padding-top: 0.6rem;
        border-top: 1px solid var(--rahmen);
        width: 100%;
    }
}

/* ========== UMGERECHNETE KENNZAHLEN ========== */

.rechnung-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.rechnung-gruppe {
    padding: 0.9rem 1rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 8px;
}

.rechnung-gruppe h3 {
    margin: 0 0 0.7rem;
    color: var(--text);
    opacity: 0.5;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.rechnung-zeile {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--rahmen);
}

.rechnung-gruppe .rechnung-zeile:first-of-type {
    border-top: none;
    padding-top: 0;
}

.rechnung-wert {
    color: var(--akzent);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.rechnung-text {
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.35;
    opacity: 0.8;
}

.rechnung-block .hinweis {
    color: var(--text);
    opacity: 0.6;
    font-size: 0.8rem;
    margin: 0;
}

.rechnung-block .hinweis strong {
    color: var(--text);
    opacity: 1;
}

@media (max-width: 600px) {
    .rechnung-liste {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .rechnung-gruppe {
        padding: 0.7rem;
    }

    .rechnung-wert {
        font-size: 0.95rem;
    }

    .rechnung-text {
        font-size: 0.72rem;
    }
}

.rechnung-quelle {
    display: block;
    color: var(--text);
    font-size: 0.68rem;
    line-height: 1.3;
    opacity: 0.45;
    margin-top: 0.1rem;
}

/* ========== CLUBFARBEN ========== */

.club-f1 { --club: var(--club-1); }
.club-f2 { --club: var(--club-2); }
.club-f3 { --club: var(--club-3); }
.club-f4 { --club: var(--club-4); }
.club-f5 { --club: var(--club-5); }
.club-f6 { --club: var(--club-6); }
.club-f7 { --club: var(--club-7); }
.club-f8 { --club: var(--club-8); }
.club-f0 { --club: var(--club-rest); }

/* Chip am Besuch: die Farbe traegt die Flaeche. Die Schrift darauf ist
   --auf-farbe, nicht die Textfarbe - sonst kippt der Kontrast, sobald das
   Thema wechselt. */
.club-chip {
    background: var(--club, var(--rahmen));
    color: var(--auf-farbe);
    border: none;
    font-weight: 600;
}

.club-prefix {
    background: var(--club, var(--rahmen));
    color: var(--auf-farbe);
    border: none;
    font-weight: 600;
}

/* In der Uebersicht traegt der Balken die Farbe */
.club-item .club-balken {
    background: var(--club, var(--akzent));
}

.club-item .club-name {
    color: var(--club, var(--text));
}

.club-item .anzahl {
    color: var(--club, var(--akzent));
}

.club-item.active {
    border-color: var(--club, var(--akzent));
}

/* Heatmap: ein Kanal zur Zeit.
   Farbton UND Deckkraft gleichzeitig waere technisch moeglich, macht die
   Kaestchen aber unlesbar - die Deckkraft entsaettigt den Farbton, und bei
   9 Pixel Kantenlaenge bleibt von beidem nichts uebrig. */

.heatmap-block[data-modus="club"] .heatmap-tag[class*="club-f"] {
    background: var(--club);
    opacity: 1;
}

.heatmap-block[data-modus="club"] .heatmap-tag.unbekannt[class*="club-f"] {
    opacity: 0.55;
}

/* Dauer: eine Farbe, vier Schritte. Im hellen Thema laeuft sie nach dunkel,
   im dunklen nach hell - in beiden Faellen heisst mehr Farbe mehr Stunden. */
.heatmap-block[data-modus="dauer"] .heatmap-tag.s1 { background: var(--heat-1); opacity: 1; }
.heatmap-block[data-modus="dauer"] .heatmap-tag.s2 { background: var(--heat-2); opacity: 1; }
.heatmap-block[data-modus="dauer"] .heatmap-tag.s3 { background: var(--heat-3); opacity: 1; }
.heatmap-block[data-modus="dauer"] .heatmap-tag.s4 { background: var(--heat-4); opacity: 1; }
.heatmap-block[data-modus="dauer"] .heatmap-tag.unbekannt { background: var(--neutral); opacity: 1; }

/* Leere Tage deutlich abgesetzt, sonst verschwindet der unterste Schritt */
.heatmap-tag,
.heatmap-tag.leer { background: var(--heat-leer); }

/* Legende zeigt, was gerade gilt */
.heatmap-block[data-modus="club"]  .nur-dauer,
.heatmap-block[data-modus="dauer"] .nur-club { display: none; }

.nur-club, .nur-dauer {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.heatmap-kopf-zeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.heatmap-kopf-zeile h2 {
    margin: 0;
}

/* ========== KENNZAHLEN: EINE FARBE JE GROESSE ========== */

/* Jede Groesse traegt dieselbe Farbe, wo immer sie auftaucht - oben in der
   Kachel wie unten in der Rechnung. Das Auge findet "Geld" dann wieder,
   ohne die Ueberschrift zu lesen. */

.kennz-besuche { --kennz: var(--club-6); }
.kennz-club    { --kennz: var(--club-4); }
.kennz-tanz    { --kennz: var(--club-5); }
.kennz-geld    { --kennz: var(--club-3); }

.stat-block[class*="kennz-"] {
    border-top: 3px solid var(--kennz);
}

.stat-block[class*="kennz-"] .stat-wert {
    color: var(--kennz);
}

.rechnung-gruppe[class*="kennz-"] {
    border-top: 3px solid var(--kennz);
}

.rechnung-gruppe[class*="kennz-"] h3 {
    color: var(--kennz);
    opacity: 1;
}

.rechnung-gruppe[class*="kennz-"] .rechnung-wert {
    color: var(--kennz);
}

/* ========== THEMENSCHALTER ========== */

/* Ein Schaltertyp fuer beide Stellen: Thema oben, Heatmap-Ansicht unten.
   Gemeinsame Optik an einer Stelle, damit sie nicht auseinanderlaeuft. */
.segment-schalter,
.thema-schalter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    background: var(--grund-tief);
    border: 1px solid var(--rahmen);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    line-height: 1;
}

.thema-schalter {
    margin-left: auto;
    align-self: center;
}

.segment-schalter button,
.thema-schalter span {
    padding: 0.3rem 0.65rem;
    border: none;
    background: transparent;
    border-radius: 999px;
    color: var(--leise);
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.segment-schalter button[aria-pressed="true"] {
    background: var(--akzent);
    color: var(--auf-farbe);
    font-weight: 600;
}

.segment-schalter button:focus-visible {
    outline: 2px solid var(--akzent);
    outline-offset: 2px;
}

/* Die aktive Seite des Schalters zeigt, wo man gerade ist */
.thema-schalter[data-aktiv="tag"] .thema-tag,
.thema-schalter[data-aktiv="nacht"] .thema-nacht {
    background: var(--akzent);
    color: var(--auf-farbe);
    font-weight: 600;
}

.thema-schalter:hover {
    border-color: var(--rahmen-stark);
}

.thema-schalter:focus-visible {
    outline: 2px solid var(--akzent);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .thema-schalter {
        margin-left: 0;
        font-size: 0.68rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .thema-schalter span,
    .segment-schalter button { transition: none; }
}

/* ========== ANMELDUNG ========== */

.login-seite {
    max-width: 380px;
    margin: 4rem auto;
}

.login-seite h1 {
    font-size: 1.3rem;
}

.login-form {
    margin-top: 1.5rem;
}

.login-form .feld {
    display: block;
    margin-bottom: 1.1rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-radius: 4px;
    color: var(--text-hell);
    font-size: 1rem;
    font-family: inherit;
}

.login-form input:focus-visible {
    outline: 2px solid var(--akzent);
    outline-offset: 1px;
    border-color: var(--akzent);
}

.login-hinweis {
    margin-top: 1.5rem;
    color: var(--leise);
    font-size: 0.8rem;
}

.fehler {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    background: var(--flaeche);
    border-left: 3px solid var(--akzent);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.9rem;
}

.fehler p {
    margin: 0 0 0.4rem;
}

.fehler p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   MOBILE ANSICHT
   --------------------------------------------------------------------------
   Diese Bloecke standen frueher weiter oben in der Datei - und damit VOR
   den Regeln, die sie ueberschreiben sollten. Bei gleicher Spezifitaet
   gewinnt in CSS die spaetere Regel, also blieben 21 Anpassungen wirkungslos
   (unter anderem die vier Kacheln, die auf dem Handy zweispaltig gehoeren).

   Alles, was nur auf schmalen Schirmen gilt, gehoert deshalb ans Dateiende.
   Kommt spaeter eine Mobil-Regel dazu: hier anhaengen, nicht oben einfuegen.
   ========================================================================== */
@media (max-width: 600px) {
body { padding: 1rem 0.8rem; }
h1 { font-size: 1.3rem; }

ul.events li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 0.8rem 0.4rem;
}

.wochentag { font-size: 0.75rem; }

.slots-header {
    grid-template-columns: 85px 90px 85px 1fr;
    gap: 0.4rem;
    padding: 0.5rem 0.2rem;
    font-size: 0.65rem;
}

ul.slots li {
    grid-template-columns: 85px 90px 85px 1fr;
    gap: 0.4rem;
    padding: 0.5rem 0.2rem;
    font-size: 0.8rem;
}

.floor, .zeit { font-size: 0.7rem; }
.titel { font-size: 0.8rem; }

.suche-form { flex-direction: column; }
ul.artist-liste li { padding: 0.8rem 0.4rem; }

/* Top-Listen: Floors untereinander */
.floors {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.floor-block { padding: 1rem; }

ol.top-liste li {
    grid-template-columns: 15px 1fr 55px 35px;
    gap: 0.4rem;
    font-size: 0.85rem;
}

ol.top-liste li::before {
    font-size: 0.75rem;
}

.top-listen ol.top-liste .zahl {
    font-size: 0.8rem;
}

.zeitraum-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
}

.bh-anzeige {
    flex-direction: column;
    gap: 0.5rem;
}

.bh-wert {
    font-size: 1.5rem;
}

.event-stats {
    flex-direction: column;
    gap: 0.5rem;
}

.event-stats .stat-wert {
    font-size: 1.5rem;
}

.events-header {
    display: none;
}

.statistik-filter .filter-row {
    flex-direction: column;
    align-items: stretch;
}

.granularitaet-info {
    margin-left: 0;
}

.chart-container {
    height: 300px;
}

.statistik-nav {
    flex-wrap: wrap;
}

.corona-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.tagebuch-stats {
    grid-template-columns: repeat(2, 1fr);
}

.visit-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.visits-header {
    display: none;
}

ul.visits-tabelle li {
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
    padding: 0.6rem;
}

ul.visits-tabelle .datum,
ul.visits-tabelle .zeit-cell,
ul.visits-tabelle .sub-cell,
ul.visits-tabelle .geld-cell {
    display: none;
}

.events-header {
    display: none;
}

}
@media (max-width: 600px) {
    .doorman h1 {
        font-size: 1.8rem;
    }

    ul.event-slots li {
        grid-template-columns: 70px 1fr auto;
        gap: 0.6rem;
        font-size: 0.85rem;
    }

    .event-typ-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--rahmen);
        padding-top: 0.8rem;
    }

    ol.event-slots-liste li {
        grid-template-columns: 55px 1fr 50px 35px;
        gap: 0.4rem;
        font-size: 0.85rem;
    }

    ol.event-slots-liste .badge-mini {
        justify-self: stretch;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .feld-reihe {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    }

    .schlange-wahl {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Substanzen, die nicht als Konsum zaehlen: sichtbar, aber zurueckgenommen */
.substanz-item.zaehlt-nicht {
    opacity: 0.6;
    border: 1px dashed var(--rahmen);
}

.nuechtern-regel {
    margin-top: 0.8rem !important;
}

/* ========== BEGLEITUNG ========== */

.begleitung-zahlen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.6rem;
    margin: 0.2rem 0 1.2rem;
}

.begleitung-zahl {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.8rem 0.9rem;
    background: var(--flaeche);
    border: 1px solid var(--rahmen);
    border-left: 3px solid var(--begleitung, var(--rahmen-stark));
    border-radius: 6px;
}

.begleitung-zahl.allein    { --begleitung: var(--club-2); }
.begleitung-zahl.gemeinsam { --begleitung: var(--club-1); }
.begleitung-zahl.offen     { --begleitung: var(--neutral); }

.begleitung-wert {
    color: var(--begleitung);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.begleitung-label {
    color: var(--text);
    font-size: 0.85rem;
}

.begleitung-anteil {
    color: var(--leise);
    font-size: 0.72rem;
}

.begleitung-zahl.offen .begleitung-wert {
    opacity: 0.6;
}

/* Diagramme bleiben in ihrem Kasten, auch wenn Chart.js eine Breite setzt */
.chart-container,
.chart-container-small {
    min-width: 0;
    max-width: 100%;
}

.chart-container canvas,
.chart-container-small canvas {
    max-width: 100%;
}
