/* TNYDMR - schlichte Fassung.
 *
 * Dieselbe Seite wie tnydmr.css, nur ohne Leuchtreklame: Systemschrift,
 * haarfeine Linien, ruhige Flaechen. Gedacht fuer den Fall, dass das Dashboard
 * jemandem gezeigt wird, der kein Funker ist - oder einfach fuer Tageslicht.
 *
 * Wichtig: **dieselben Klassen und Kennungen** wie in tnydmr.css. index.html
 * und index2.html teilen sich tnydmr.js; was hier fehlt, faellt dort auseinander.
 * Farbe tragen nur noch die Dinge, bei denen sie eine Bedeutung hat - der
 * Zustand eines Rufs, eine Warnung, eine Sperre.
 *
 * Hell und dunkel: die Seite folgt der Einstellung des Systems. Beides ist
 * durchgezeichnet, nicht nur invertiert. */

:root {
    color-scheme: light dark;

    --bg:        #f6f7f9;
    --surface:   #ffffff;
    --surface-2: #f0f2f5;
    --border:    #dfe3e8;
    --border-2:  #c9cfd6;
    --text:      #1c2430;
    --text-dim:  #5b6675;
    --muted:     #8b96a4;

    --accent:    #2f6df0;   /* ruhiges Blau, traegt keine Bedeutung */
    --gruen:     #17914a;   /* Empfang */
    --rot:       #d13438;   /* Senden */
    --gelb:      #b26a00;   /* Suchruf */
    --blau:      #2f6df0;   /* Privatruf */

    --karte-ok:    var(--gruen);
    --karte-aus:   var(--rot);
    --karte-ich:   var(--accent);
    --karte-fluss: var(--gelb);
    --karte-hoert: rgba(178, 106, 0, .10);
    --karte-mittel: var(--gelb);
    --karte-sende: var(--rot);
    --karte-daten: var(--blau);
    --karte-bruecke: #7c4dcc;
    --karte-dienst: #d6409f;
    --karte-linie: var(--muted);

    --radius:    8px;
    --schatten:  0 1px 2px rgba(16, 24, 40, .06);
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
            "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #14171c;
        --surface:   #1b1f26;
        --surface-2: #21262e;
        --border:    #2b313a;
        --border-2:  #3a424e;
        --text:      #e4e8ee;
        --text-dim:  #9aa5b4;
        --muted:     #6b7683;

        --accent:    #6ea0ff;
        --gruen:     #3fc47a;
        --rot:       #ff6b6b;
        --gelb:      #e0a33a;
        --blau:      #6ea0ff;
        --karte-bruecke: #b794ff;
        --karte-dienst: #ff8fd0;

        --schatten:  0 1px 2px rgba(0, 0, 0, .4);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Zahlen sollen beim Zaehlen nicht wackeln. */
b, td, th, .nummer, .uebersicht { font-variant-numeric: tabular-nums; }

code {
    font-family: var(--mono);
    font-size: .85em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

/* ------------------------------------------------------------------ Kopf */

header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.h-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--accent);
}
.h-logo svg { width: 22px; height: 22px; }

.h-name h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.01em;
}
.h-name h1 span { color: var(--accent); }
.h-name p {
    margin: 0;
    font-size: 12px;
    color: var(--text-dim);
}

.kopfrechts {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Der Verbindungszustand. Ein Punkt und ein Wort - mehr braucht es nicht,
   und rot soll es nur sein, wenn wirklich etwas fehlt. */
.verbindung {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    white-space: nowrap;
}
.verbindung::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.verbindung.da  { color: var(--gruen); border-color: color-mix(in srgb, var(--gruen) 35%, var(--border)); }
.verbindung.weg { color: var(--rot);   border-color: color-mix(in srgb, var(--rot) 35%, var(--border)); }

/* --------------------------------------------------------- Anmeldeformular */

.anmeldeform {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
[hidden] { display: none !important; }

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

.uebersicht {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    padding: 12px 24px;
    font-size: 13px;
    color: var(--text-dim);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.uebersicht b {
    color: var(--text);
    font-weight: 600;
    margin-right: 4px;
}
.uebersicht b.warn    { color: var(--gelb); }
.uebersicht b.rot     { color: var(--rot); }
.uebersicht b.tuerkis { color: var(--accent); }

/* ----------------------------------------------------------------- Reiter */

nav {
    display: flex;
    gap: 2px;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
nav button {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--text-dim);
    font: inherit;
    font-size: 13px;
    padding: 10px 14px;
    cursor: pointer;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
}
nav button:hover { color: var(--text); background: none; }
nav button.an {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

main { padding: 20px 24px 60px; }
main section { display: none; }
main section.an { display: block; }

h2 {
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 22px 0 10px;
}
main section > h2:first-child { margin-top: 0; }

.dim, .blass { color: var(--muted); }
.klein { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }

.leer {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 16px;
}

.stoerung {
    margin: 12px 24px 0;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--rot) 40%, var(--border));
    background: color-mix(in srgb, var(--rot) 8%, var(--surface));
    color: var(--rot);
    font-size: 13px;
}

.warnung {
    color: var(--gelb);
    font-size: 12px;
}

/* --------------------------------------------------------------- Tabellen */

.rollen {
    overflow-x: auto;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
}

table.liste {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.liste th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
table.liste td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.liste tr:last-child td { border-bottom: none; }
table.liste tbody tr:hover td { background: var(--surface-2); }
table.liste th.rechts, table.liste td.rechts { text-align: right; }

/* Eine ID mit dem Namen darueber. */
.wer    { display: block; font-weight: 600; }
.nummer { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.alias  { color: var(--text-dim); }
.tgs    { font-family: var(--mono); font-size: 11px; max-width: 26em; }

/* ----------------------------------------------------------------- Marken */

.marke {
    display: inline-block;
    font-size: 11px;
    line-height: 1.6;
    padding: 0 7px;
    border-radius: 99px;
    border: 1px solid var(--border-2);
    background: var(--surface-2);
    color: var(--text-dim);
    white-space: nowrap;
}
.marke.gut {
    color: var(--gruen);
    border-color: color-mix(in srgb, var(--gruen) 35%, var(--border));
    background: color-mix(in srgb, var(--gruen) 8%, var(--surface));
}
.marke.fehler {
    color: var(--rot);
    border-color: color-mix(in srgb, var(--rot) 35%, var(--border));
    background: color-mix(in srgb, var(--rot) 8%, var(--surface));
}
.marke.info {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

/* Verschluesselt. Mit Schloss, damit es auch ohne Farbe erkennbar bleibt. */
.marke.krypto {
    color: var(--gelb);
    border-color: color-mix(in srgb, var(--gelb) 40%, var(--border));
    background: color-mix(in srgb, var(--gelb) 10%, var(--surface));
}
.marke.krypto::before { content: "\1F512 "; }

/* Ohne PI-Header ist nur Burst F belegt: "sehr wahrscheinlich", nicht
   "sicher". Gestrichelt und blasser - das Fragezeichen steht im Text. */
.marke.krypto.unsicher {
    border-style: dashed;
    color: color-mix(in srgb, var(--gelb) 75%, var(--text-dim));
    background: color-mix(in srgb, var(--gelb) 5%, var(--surface));
}

/* ----------------------------------------------------------------- Karten */

.karten {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.karte {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 14px 16px;
}
.karte h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.karte dl {
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 12px;
    font-size: 13px;
}
.karte dt { color: var(--text-dim); }
.karte dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.karte p  { margin: 0; font-size: 13px; }
.karte .wem   { color: var(--text-dim); }
.karte .alias { color: var(--text-dim); font-size: 12px; min-height: 1.5em; }

/* Die Ausgabe der Mesh-Befehle: Festbreite, scrollbar, Zeilen bleiben stehen. */
.mesh-ausgabe {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    min-height: 8em;
    max-height: 28em;
    overflow: auto;
}
.mesh-ausgabe:empty::before { content: "noch nichts"; color: var(--muted); }


/* Laeuft gerade.
 *
 * Immer dieselbe Hoehe, auch wenn nichts laeuft - sonst schiebt die erste
 * Karte alles darunter nach unten, und die Seite springt bei jedem Ruf.
 * Mehrere Gespraeche stehen nebeneinander und rollen waagerecht. */
#laufend {
    display: flex;
    align-items: stretch;
    gap: 12px;
    /* Nachgemessen am schlimmsten Fall: verschluesselter Suchruf mit langem
       Ruftyp - dort bricht die Ueberschrift auf zwei Zeilen um, und der
       Karteninhalt ist 233 Pixel hoch. Plus Rahmen macht 235, aufgerundet
       238. Wer hier etwas an der Karte aendert, misst neu nach. */
    height: 238px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 16px;
}
#laufend .karte {
    flex: 0 0 300px;
    height: 100%;
    overflow: hidden;
}
#laufend .karte.laeuft {
    border-color: color-mix(in srgb, var(--gruen) 45%, var(--border));
}


/* -------------------------------------------------------------- Bedienung */

input, select, button {
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 6px 10px;
}
input:focus-visible, select:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
button {
    cursor: pointer;
    font-weight: 500;
    background: var(--surface-2);
}
button:hover { border-color: var(--accent); color: var(--accent); }
button.aus:hover { border-color: var(--rot); color: var(--rot); }
button.klein { padding: 3px 9px; font-size: 12px; }

label { font-size: 13px; color: var(--text-dim); }
label input, label select { margin-left: 6px; }

.kasten {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.kasten input { margin: 0; }

.schalten, .wartung {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ---------------------------------------------------------------- Logfeld */

pre#logtext {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    max-height: 62vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}
pre#logtext span { display: block; }
pre#logtext .DEBUG    { color: var(--muted); }
pre#logtext .INFO     { color: var(--text-dim); }
pre#logtext .WARNING  { color: var(--gelb); }
pre#logtext .ERROR    { color: var(--rot); }
pre#logtext .CRITICAL { color: var(--rot); font-weight: 700; }
/* Gespraechszeilen (>> gestartet, << beendet, !! abgerissen): Farbe ueber die Klasse, nicht ueber die Ebene */
pre#logtext .ruf-start { color: var(--gruen); }
pre#logtext .ruf-ende  { color: var(--blau); }
pre#logtext .ruf-weg   { color: var(--gelb); font-weight: 700; }

/* Die Talkgroups der offenen Bruecken. Als Plaketten, eine je Zeitschlitz
   und System. Anklickbar heisst hier: macht zu. */
.tgmarken {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tgmarke {
    font-family: var(--mono);
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 99px;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    color: var(--accent);
}
.tgmarke.reflektor {
    border-color: color-mix(in srgb, var(--blau) 35%, var(--border));
    background: color-mix(in srgb, var(--blau) 8%, var(--surface));
    color: var(--blau);
}
.tgmarke.zumachen:hover {
    border-color: var(--rot);
    background: color-mix(in srgb, var(--rot) 10%, var(--surface));
    color: var(--rot);
}
/* Ohne Steuerung ist es keine Schaltflaeche, sondern eine Anzeige. */
.tgmarke.nurlesen { cursor: default; opacity: .85; }
.tgmarke.nurlesen:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    color: var(--accent);
}

/* Statisch konfiguriert, steht aber gerade nicht offen. Sichtbar bleibt sie:
   dass sie gerade fehlt, ist ja die Nachricht. */
.tgmarke.zu, .tgmarke.zu:hover {
    border-style: dashed;
    border-color: var(--border);
    background: none;
    color: var(--muted);
}

/* Hier wird gerade gesprochen. Ein ruhiges Atmen statt Blinken, wie bei den
   Kacheln ganz unten - die Farbe steht in --ton. */
@keyframes atmenMarke {
    0%, 100% { background: color-mix(in srgb, var(--ton) 8%, var(--surface)); }
    50%      { background: color-mix(in srgb, var(--ton) 26%, var(--surface)); }
}

.tgmarke.funkt, .tgmarke.funkt:hover {
    border-color: var(--ton);
    color: var(--ton);
    animation: atmenMarke 1.6s ease-in-out infinite;
}
.tgmarke.f-rx      { --ton: var(--gruen); }
.tgmarke.f-tx      { --ton: var(--rot); }
.tgmarke.f-suchruf { --ton: var(--gelb); }
.tgmarke.f-privat  { --ton: var(--blau); }

/* Ein Privatruf hat keine Talkgroup und damit keine Plakette, an der er
   leuchten koennte - er bekommt eine eigene, solange er laeuft. */
.pcmarke { cursor: default; }

@media (prefers-reduced-motion: reduce) {
    .tgmarke.funkt {
        animation: none;
        background: color-mix(in srgb, var(--ton) 16%, var(--surface));
    }
}

/* Woher ein Talker Alias kommt - vom Geraet des Sprechers oder von diesem
   Server erzeugt. Siehe aliasZelle() in tnydmr.js. */
.ta.erzeugt {
    color: var(--gelb);
    font-style: italic;
}

/* --------------------------------------------------- Leiste ganz unten */

.leiste {
    padding: 18px 24px 8px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.leiste .gruppe { margin-bottom: 16px; }
.leiste h4 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 7px;
}
.leiste h4 b {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0 7px;
}

.minikacheln {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Eine Kachel je angemeldeter Station. Der Zustand eines Rufs steht links als
   Streifen und als leichte Tuchfarbe - kein Leuchten, aber dieselbe
   Information, und ohne Farbe bleibt sie am Streifen erkennbar. */
.minikachel {
    position: relative;
    min-width: 120px;
    padding: 8px 12px 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-2);
    border-radius: 6px;
    line-height: 1.35;
    box-shadow: var(--schatten);
}
.minikachel b {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.minikachel span {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

/* Eine OpenBridge, die gerade nicht steht. Sichtbar bleiben soll sie - dass
   sie fehlt, ist ja die Nachricht. */
.minikachel.tot {
    border-style: dashed;
    border-left-style: dashed;
    opacity: .55;
}
.minikachel.tot b { color: var(--text-dim); }

.minikachel.rx, .minikachel.tx,
.minikachel.suchruf, .minikachel.privat {
    border-left-color: var(--ton);
    background: color-mix(in srgb, var(--ton) 7%, var(--surface));
    opacity: 1;
    animation: atmen 2s ease-in-out infinite;
}
.minikachel.rx      { --ton: var(--gruen); }
.minikachel.tx      { --ton: var(--rot); }
.minikachel.suchruf { --ton: var(--gelb); }
.minikachel.privat  { --ton: var(--blau); }

.minikachel.rx b, .minikachel.tx b,
.minikachel.suchruf b, .minikachel.privat b { color: var(--ton); }

/* Ein ruhiges Atmen statt Blinken: man sieht, dass etwas laeuft, ohne dass
   die Seite flackert. */
@keyframes atmen {
    0%, 100% { background: color-mix(in srgb, var(--ton) 6%, var(--surface)); }
    50%      { background: color-mix(in srgb, var(--ton) 16%, var(--surface)); }
}

@media (prefers-reduced-motion: reduce) {
    .minikachel.rx, .minikachel.tx,
    .minikachel.suchruf, .minikachel.privat { animation: none; }
}

/* --------------------------------------------------------------- Fusszeile */

footer {
    padding: 16px 24px 24px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

/* ------------------------------------------------- Antwort auf einen Befehl */

.antwort {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    max-width: 22em;
    padding: 11px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 6px 20px rgba(16, 24, 40, .14);
    font-size: 13px;
}
.antwort.ok {
    border-color: color-mix(in srgb, var(--gruen) 45%, var(--border));
    color: var(--gruen);
}
.antwort.nein {
    border-color: color-mix(in srgb, var(--rot) 45%, var(--border));
    color: var(--rot);
}

/* ---------------------------------------------------------------- Telefon */

@media (max-width: 720px) {
    header { gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
    .kopfrechts { width: 100%; margin-left: 0; }
    .uebersicht, .anmeldeform { padding: 10px 14px; }
    .stoerung { margin: 10px 14px 0; }
    nav { padding: 0 8px; }
    main { padding: 16px 14px 48px; }
    .leiste { padding: 14px 14px 4px; }
    footer { padding: 14px 14px 20px; }
    .karten { grid-template-columns: 1fr; }
    /* Auf dem Telefon kommt die waagerechte Rollleiste dazu, sobald mehr
       als ein Gespraech laeuft - die frisst rund fuenfzehn Pixel Hoehe. */
    #laufend { height: 142px; }
    /* Kompakt: nur "an" und "System" - Zeitschlitz und Repeater entfallen auf dem Telefon. */
    #laufend { gap: 8px; margin-bottom: 10px; }
    #laufend .karte { flex: 0 0 78%; padding: 8px 10px; }
    #laufend .karte h3 { font-size: 13px; gap: 6px; margin-bottom: 1px; }
    #laufend .karte p.wem, #laufend .karte .wem { font-size: 10px; margin: 0 0 3px; }
    #laufend .karte p.alias, #laufend .karte .alias { font-size: 10px; margin: 0 0 4px; min-height: 0; }
    #laufend .karte dl { margin: 4px 0 0; gap: 2px 8px; font-size: 11px; }
    #laufend .karte dd { font-size: 11px; }
    #laufend .karte dt:nth-of-type(n+3), #laufend .karte dd:nth-of-type(n+3) { display: none; }
    .minikachel { padding: 4px 7px; }
    .minikachel b { font-size: 10px; letter-spacing: .5px; }
    .minikachel span { font-size: 8.5px; }
    .minikachel { flex: 1 1 calc(33% - 8px); min-width: 0; }
}

/* ------------------------------------------------------- adn.cfg-Editor */

/* Jeder Abschnitt der adn.cfg eine Klappe. <details> statt eigenem
 * Aufklappcode: der Zustand gehoert dem Browser, die Tastaturbedienung ist
 * vorhanden, und es klappt auch dann noch auf, wenn das Skript streikt. */
h3.cfggruppe {
    margin: 20px 0 8px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: normal;
}

details.stanza {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    margin-bottom: 6px;
}

details.stanza > summary {
    cursor: pointer;
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text);
    list-style: none;
}
details.stanza > summary::-webkit-details-marker { display: none; }

/* Ein eigenes Dreieck: das vorgegebene sieht in den beiden Farbwelten
 * unterschiedlich aus, und hier soll es dasselbe sein. */
details.stanza > summary::before {
    content: "\25B8";
    display: inline-block;
    width: 1.1em;
    color: var(--muted);
    transition: transform .12s;
}
details.stanza[open] > summary::before { transform: rotate(90deg); }
details.stanza > summary:hover { color: var(--accent); }

details.stanza .rollen { padding: 0 12px 10px; }

/* Die Wertespalte bekommt den Platz: der Schluessel ist kurz, der Wert kann
 * eine ganze ACL-Liste sein. */
details.stanza table.liste td:nth-child(2) { width: 60%; }
details.stanza table.liste td.rechts { white-space: nowrap; }

details.stanza table.liste td input {
    width: 100%;
    min-width: 12em;
    font-family: var(--mono);
    font-size: 12px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 6px;
}
details.stanza table.liste td input:focus { border-color: var(--accent); }

/* Mehrzeilige Werte kann der Editor nicht schreiben - das Feld steht da,
 * aber abgeblendet, damit man sieht, dass es den Schluessel gibt. */
details.stanza table.liste td input:disabled {
    color: var(--text-dim);
    cursor: not-allowed;
}

/* ---- Mesh-Verwaltung (gleiche Klassen in beiden Stylesheets) */
.mesh-verwaltung { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.2rem; }
.mesh-verwaltung .karte {
    border: 1px solid var(--border, #3a3f4b); border-radius: 6px;
    padding: .6rem .8rem; background: rgba(127,127,127,.07);
}
.mesh-verwaltung .karte h4 { margin: 0 0 .3rem; font-size: 1rem; }
.mesh-verwaltung .karte p { margin: .3rem 0; }
.mesh-verwaltung .klein { font-size: .85em; }
.mesh-verwaltung .rot { color: #e5534b; }
.mesh-verwaltung .rechts { text-align: right; }
.mesh-verwaltung .mono, .mesh-verwaltung .fp { font-family: ui-monospace, Consolas, monospace; }
.mesh-verwaltung .fp { font-size: .9em; word-break: break-all; }
.mesh-verwaltung .fp.gross, dialog.mesh-dialog .fp.gross { font-size: 1.15em; font-weight: 600; letter-spacing: .03em; }
.mesh-titel { margin: .8rem 0 .2rem; font-size: 1.05rem; }
.mesh-adminkarte { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.mesh-adminkarte input.fehlt { outline: 2px solid #e5534b; }
.mesh-verwaltung .punkt.an { color: #3fb950; }
.mesh-verwaltung .punkt.aus { color: #8b949e; }
.mesh-verwaltung .punkt.gelb { color: #d29922; }
.mesh-antraege { display: flex; flex-direction: column; gap: .5rem; }
.mesh-antrag.beitritt { border-left: 4px solid #3fb950; }
.mesh-antrag.sperre { border-left: 4px solid #e5534b; }
.mesh-antrag .knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.mesh-verwaltung .marke { display: inline-block; padding: 0 .5em; border-radius: 1em; font-size: .8em; border: 1px solid currentColor; }
.mesh-verwaltung .marke.info { color: #58a6ff; }
.mesh-verwaltung .marke.gut { color: #3fb950; }
.mesh-verwaltung .marke.fehler { color: #e5534b; }
.mesh-verwaltung button.ja { border-color: #3fb950; color: #3fb950; }
.mesh-verwaltung button.gefahr, dialog.mesh-dialog button.gefahr { border-color: #e5534b; color: #e5534b; }
.mesh-start { display: flex; flex-direction: column; gap: .5rem; }
.mesh-start label, .mesh-adminkarte label { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0; }
.mesh-ergebnis { position: relative; padding: .5rem 2rem .5rem .8rem; border-radius: 6px; border: 1px solid; }
.mesh-ergebnis.ok { border-color: #3fb950; }
.mesh-ergebnis.fehler { border-color: #e5534b; background: rgba(229,83,75,.1); }
.mesh-ergebnis .zu { position: absolute; top: .2rem; right: .3rem; }
.mesh-einladung { display: flex; gap: .5rem; align-items: flex-start; margin-top: .4rem; }
.mesh-einladung code { word-break: break-all; }
.mesh-tabelle td, .mesh-tabelle th { vertical-align: top; }
dialog.mesh-dialog {
    max-width: min(34rem, 92vw); border: 1px solid var(--border, #3a3f4b); border-radius: 8px;
    background: var(--surface, #161b22); color: var(--text, #e6edf3); padding: 1rem 1.2rem;
}
dialog.mesh-dialog::backdrop { background: rgba(0,0,0,.6); }
dialog.mesh-dialog h3 { margin-top: 0; }
dialog.mesh-dialog .kasten, dialog.mesh-dialog .tippen { display: block; margin: .6rem 0; }
dialog.mesh-dialog .tippen input { display: block; margin-top: .3rem; width: 100%; box-sizing: border-box; }
dialog.mesh-dialog .dialog-knoepfe { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
dialog.mesh-dialog button:disabled { opacity: .4; cursor: not-allowed; }
.mesh-sperrform { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }
.mesh-sperrform h4 { flex-basis: 100%; }
.mesh-sperrform label { display: flex; gap: .4rem; align-items: center; }

/* Im Mesh wartet etwas auf einen Admin: das "verbunden" glueht orange (auch ohne Anmeldung). */
@keyframes meshaktion {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 159, 26, .35); }
    50%      { box-shadow: 0 0 14px 3px rgba(255, 159, 26, .85); }
}
.verbindung.da.mesh-aktion {
    color: #ff9f1a;
    border-color: #ff9f1a;
    animation: meshaktion 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .verbindung.da.mesh-aktion { animation: none; box-shadow: 0 0 10px 2px rgba(255, 159, 26, .8); }
}

/* Im Mesh ist ein Mitglied laenger als drei Minuten nicht erreichbar: rot, und pulsierend, wenn zugleich etwas auf einen Admin wartet. */
@keyframes meshluecke {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 90, 77, .35); }
    50%      { box-shadow: 0 0 14px 3px rgba(255, 90, 77, .85); }
}
.verbindung.da.mesh-luecke {
    color: #ff5a4d;
    border-color: #ff5a4d;
    box-shadow: 0 0 8px 1px rgba(255, 90, 77, .55);
}
.verbindung.da.mesh-aktion.mesh-luecke { animation-name: meshluecke; }
.konto-meldung { min-height: 1.4em; margin: .4rem 0; }
.konto-meldung.gut { color: var(--accent, #39ff6a); }
.konto-meldung.schlecht { color: #ff5555; }
#konto label { margin-right: .8rem; }

/* Gaeste (Gastphrase): violett, damit sie in Tabelle und Leiste auf den ersten Blick auffallen. */
.marke.gast { background: #f1e8fd; color: #7a35c2; border-color: #cdb0ee; }
tr.gast td { background: #f6effd; }
tr.gast td:first-child { box-shadow: inset 3px 0 0 #8e4fd6; }
.minikachel.gast { border-color: #b98ae6; }
.minikachel.gast b { color: #7a35c2; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .marke.gast { background: rgba(190, 120, 255, .16); color: #cf9bff; border-color: rgba(190, 120, 255, .5); }
    :root:not([data-theme="light"]) tr.gast td { background: rgba(190, 120, 255, .08); }
    :root:not([data-theme="light"]) .minikachel.gast b { color: #cf9bff; }
}
.konto-status { margin: .6rem 0; padding: .6rem .8rem; border: 1px solid #cdb0ee; border-radius: 4px; background: #f6effd; }
.reg-form label { display: block; margin: .3rem 0; }
#reiter-freigaben.warnung { color: #b57d00; }

/* Goldbarren: Hotspots mit TNYSPOT in der Software-Zeile. */
.goldbarren {
    display: inline-block; width: 1.15em; height: .6em; margin-left: .25em; vertical-align: -.02em;
    border-radius: 2px; border: 1px solid #8a6a05;
    background: linear-gradient(180deg, #fff3b0 0%, #f0c040 38%, #c99a10 62%, #f7dc72 100%);
    box-shadow: 0 0 4px rgba(240, 192, 64, .55), inset 0 -1px 0 rgba(120, 80, 0, .5);
    transform: skewX(-14deg);
}

.netz-live td { background: rgba(57, 255, 106, .05); }

/* Neu registrierte Gaeste (eigene ID, wartet auf Freigabe): tuerkis, damit sie sich von anonymen Gaesten (violett) abheben. */
.marke.gast-reg { background: #e3f6f2; color: #0d7d6c; border-color: #9fd9cf; }
tr.gast-reg td { background: #edf8f5; }
tr.gast-reg td:first-child { box-shadow: inset 3px 0 0 #1fa58f; }
.minikachel.gast-reg { border-color: #7fcdbf; }
.minikachel.gast-reg b { color: #0d7d6c; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .marke.gast-reg { background: rgba(0, 196, 167, .16); color: #4fe6cc; border-color: rgba(0, 196, 167, .5); }
    :root:not([data-theme="light"]) tr.gast-reg td { background: rgba(0, 196, 167, .08); }
    :root:not([data-theme="light"]) .minikachel.gast-reg b { color: #4fe6cc; }
}

/* Registrierungsmaske: alle Felder untereinander, volle Breite. */
.schalten.reg-form { flex-direction: column; align-items: stretch; flex-wrap: nowrap; max-width: 30rem; }
.reg-form label { width: 100%; }
.reg-form input { width: 100%; box-sizing: border-box; }
.reg-form button { align-self: flex-start; }

/* Schedule: Zeitplan fuer AMBE-Dateien. */
.sched-zeit { border: 1px solid var(--border); padding: .5rem .8rem; margin: .3rem 0; max-width: 100%; }
.sched-zeit label { margin: .25rem 0; }
.sched-knoepfe { display: flex; gap: .6rem; margin-top: .4rem; }
#sched-liste td.klein { font-size: .85em; }
.reg-form input[type=checkbox], .reg-form input[type=radio], .sched-zeit input[type=time] { width: auto; }

/* Hinweis auf eine neue Dashboard-Version und die Versionsangabe unten. */
.neue-version { position: sticky; top: 0; z-index: 50; padding: .5rem 1rem; text-align: center; background: #f0c040; color: #222; }
.neue-version button { margin-left: .6rem; }
.dashversion { margin: 1.5rem 1rem; text-align: right; opacity: .6; }

/* "sofort": dieser Konfigurationsschluessel wirkt ohne Neustart. */
.live-marke { display: inline-block; padding: 0 .4em; border: 1px solid currentColor; border-radius: 3px; font-size: .75em; opacity: .8; color: #2e9e5b; }

/* TETRA-Mesh */
.tetra-karten { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.tetra-karten .karte p.gross { margin: .2rem 0; font-size: 1.4em; }
#tetra h4 { margin: 1.2rem 0 .4rem; }

/* TETRA-Mesh: Rufe aus und in das TETRA-Mesh in Orange, mit der Marke "TETRA". */
.marke.tetra { background: #fff1e0; color: #b35c00; border-color: #f0b878; }
tr.tetra td { background: #fff6ec; }
tr.tetra td:first-child { box-shadow: inset 3px 0 0 #e8820c; }
.karte.tetra { border-color: #e8a45a; box-shadow: inset 3px 0 0 #e8820c; }
.karte.tetra h3 { color: #b35c00; }
.minikachel.tetra { border-color: #e8a45a; }
.minikachel.tetra b { color: #b35c00; }

/* NXDN-Reflektor: Rufe aus und in den Reflektor in Tuerkis, mit der Marke "NXDN". */
#nxdn h4 { margin: 1.2rem 0 .4rem; }
.marke.p25 { background: #fff1db; color: #8a5200; border-color: #e6bd7c; }
tr.p25 td { background: #fffaf1; }
tr.p25 td:first-child { box-shadow: inset 3px 0 0 #e08a00; }
.minikachel.p25 { border-color: #e6bd7c; }
.minikachel:has(> .etikett) { padding-top: 15px; }
.minikacheln:has(.etikett) { row-gap: 14px; }
.minikachel .etikett { position: absolute; top: -7px; left: 8px; font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: 1px; line-height: 1; padding: 2px 6px; border-radius: 3px; background: #e08a00; color: #ffffff; }
.minikachel .etikett.dmr { background: #2f6fbd; color: #fff; }
.minikachel .etikett.nxdn { background: #00838f; color: #fff; }
.minikachel .etikett.opc { background: #2a8a5a; color: #fff; }
.minikachel .etikett.tetra { background: #7a4fb0; color: #fff; }
.minikachel .etikett.aprs { background: #8a7a00; color: #fff; }
.minikachel .etikett.ipsc { background: #b03a35; color: #fff; }
.minikachel .etikett.usrp { background: #6f4fd0; color: #fff; }
.minikachel .etikett.tier3 { background: #0f8f80; color: #fff; }
.marke.tier3 { background: #dcf5f1; color: #0b6d61; border-color: #8fd3c9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marke.tier3 { background: rgba(63, 193, 176, .16); color: #5fd3c3; border-color: rgba(63, 193, 176, .55); } }
:root[data-theme="dark"] .marke.tier3 { background: rgba(63, 193, 176, .16); color: #5fd3c3; border-color: rgba(63, 193, 176, .55); }
.minikachel .etikett.echo { background: #5f6b78; color: #fff; }
.minikachel .etikett.obp { background: #4a5a8a; color: #fff; }
.minikachel .etikett.mesh { background: #a03a7a; color: #fff; }
.minikachel .etikett.modem { background: #8a6a30; color: #fff; }
.minikachel.opc { border-color: #7fc4a0; }
.minikachel.p25 b { color: #8a5200; }
.marke.nxdn { background: #e0f7fa; color: #006978; border-color: #7fcfda; }
tr.nxdn td { background: #effbfc; }
tr.nxdn td:first-child { box-shadow: inset 3px 0 0 #0aa5b8; }
.marke.opc { background: #e3f6ec; color: #1f7a4d; border-color: #8fd0ad; }
tr.opc td { background: #f1fbf5; }
tr.opc td:first-child { box-shadow: inset 3px 0 0 #2a8a5a; }
.karte.nxdn { border-color: #5bc3d0; box-shadow: inset 3px 0 0 #0aa5b8; }
.karte.nxdn h3 { color: #006978; }
.minikachel.aprs { border-color: #a3c94d; }
.minikachel.aprs b { color: #4d7c0f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .minikachel.aprs b { color: #bef264; } }
:root[data-theme="dark"] .minikachel.aprs b { color: #bef264; }
.minikachel.nxdn { border-color: #5bc3d0; }
.minikachel.nxdn b { color: #006978; }
.nxdn-tgs { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
/* USRP-App (DVSwitch Mobile): violett */
#usrp h4 { margin: 1.2rem 0 .4rem; }
.marke.usrp { background: rgba(169, 139, 255, .14); color: #b9a1ff; border-color: rgba(169, 139, 255, .55); }
tr.usrp td { background: rgba(169, 139, 255, .07); }
tr.usrp td:first-child { box-shadow: inset 3px 0 0 #a98bff; }
.karte.usrp { border-color: rgba(169, 139, 255, .6); box-shadow: inset 3px 0 0 #a98bff; }
.karte.usrp h3 { color: #c3b0ff; }
.minikachel.usrp { border-color: rgba(169, 139, 255, .6); }
.minikachel.usrp b { color: #a98bff; }
.tgchip.gemappt-usrp { background: rgba(169, 139, 255, .16); color: #c3b0ff; border-color: rgba(169, 139, 255, .6); }
.tgchip { display: inline-block; padding: .05rem .5rem; border-radius: 1rem; border: 1px solid; font-size: .85em; white-space: nowrap; }
.tgchip.gemappt { background: #e3f6ea; color: #17703a; border-color: #86cfa0; }
.tgchip.offen { background: #e0f7fa; color: #006978; border-color: #7fcfda; }
.tgchip.funkt { animation: pulsMarke 1.6s ease-in-out infinite; }
.tgchip.f-rx { --puls: 57, 255, 106; }
.tgchip.f-tx { --puls: 255, 69, 69; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .marke.tetra { background: rgba(255, 159, 67, .16); color: #ffae63; border-color: rgba(255, 159, 67, .55); }
    :root:not([data-theme="light"]) tr.tetra td { background: rgba(255, 159, 67, .08); }
    :root:not([data-theme="light"]) .karte.tetra h3 { color: #ffb36b; }
    :root:not([data-theme="light"]) .minikachel.tetra b { color: #ffae63; }
    :root:not([data-theme="light"]) .marke.p25 { background: rgba(240, 160, 40, .16); color: #f2b04e; border-color: rgba(240, 160, 40, .55); }
    :root:not([data-theme="light"]) tr.p25 td { background: rgba(240, 160, 40, .08); }
    :root:not([data-theme="light"]) .minikachel.p25 b { color: #f2b04e; }
    :root:not([data-theme="light"]) .marke.nxdn { background: rgba(32, 201, 220, .16); color: #5ddcea; border-color: rgba(32, 201, 220, .55); }
    :root:not([data-theme="light"]) tr.nxdn td { background: rgba(32, 201, 220, .08); }
    :root:not([data-theme="light"]) .marke.opc { background: rgba(63, 185, 122, .16); color: #5fe39a; border-color: rgba(63, 185, 122, .55); }
    :root:not([data-theme="light"]) tr.opc td { background: rgba(63, 185, 122, .08); }
    :root:not([data-theme="light"]) .karte.nxdn h3 { color: #5ddcea; }
    :root:not([data-theme="light"]) .minikachel.nxdn b { color: #3ed6e6; }
    :root:not([data-theme="light"]) .tgchip.gemappt { background: rgba(46, 204, 113, .16); color: #5fe39a; border-color: rgba(46, 204, 113, .55); }
    :root:not([data-theme="light"]) .tgchip.offen { background: rgba(32, 201, 220, .14); color: #5ddcea; border-color: rgba(32, 201, 220, .55); }
}

/* IPSC-Repeater: rosa, mit dem kleinen Zusatz "IPSC". */
.marke.ipsc { background: #fde8f1; color: #b0245f; border-color: #f0a9c8; font-size: .7em; }
tr.ipsc td { background: #fdf0f6; }
tr.ipsc td:first-child { box-shadow: inset 3px 0 0 #d63384; }
.minikachel.ipsc { border-color: #e88fb8; }
.minikachel.ipsc b { color: #b0245f; }
.minikachel.ipsc b .marke.ipsc { font-size: .6em; vertical-align: middle; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .marke.ipsc { background: rgba(255, 111, 168, .16); color: #ff8fbb; border-color: rgba(255, 111, 168, .55); }
    :root:not([data-theme="light"]) tr.ipsc td { background: rgba(255, 111, 168, .08); }
    :root:not([data-theme="light"]) .minikachel.ipsc b { color: #ff8fbb; }
}

/* Alle Chips (Plaketten, Marken, Talkgroup-Chips) sind abgerundet. */
.tgmarke, .pcmarke, .marke, .live-marke, .tgchip { border-radius: 1em; }

/* ---- Modems: eigene Kategorie, eigene Farbe (Fuchsia). Das Leuchten kommt vom Topic adn/modemaktiv: rx = Datenrahmen kommen an, tx = das Modem sendet. */
.marke.modem { background: #fbe8fd; color: #9c1ab1; border-color: #e3a3ee; }
tr.modem td { background: rgba(217, 70, 239, .05); }
tr.modem td:first-child { box-shadow: inset 3px 0 0 #d946ef; }
.karte.modem { border-color: #e3a3ee; box-shadow: inset 3px 0 0 #d946ef; }
.karte.modem h3 { color: #9c1ab1; }
.karte.modem.tot { opacity: .6; border-style: dashed; }
.modem-knoepfe { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.minikachel.modem { border-color: #e3a3ee; }
.minikachel.modem b { color: #9c1ab1; }
.minikachel.modem-rx, .minikachel.modem-tx {
    border-left-color: var(--ton);
    background: color-mix(in srgb, var(--ton) 8%, var(--surface));
    opacity: 1;
    animation: atmen 2s ease-in-out infinite;
}
.minikachel.modem-rx { --ton: #d946ef; }
.minikachel.modem-tx { --ton: #f0abfc; }
.minikachel.modem-rx b, .minikachel.modem-tx b { color: var(--ton); }
.modem-form fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 12px; padding: 8px 12px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 14px; align-items: end; }
.modem-form label { width: auto; margin: 0; }
.modem-form input:not([type="checkbox"]), .modem-form select { width: 100%; box-sizing: border-box; }
.modem-form legend { color: #9c1ab1; padding: 0 6px; font-size: .85em; }
.modem-form label.haken { display: flex; align-items: center; gap: 6px; }
.modem-form label.haken input { width: auto; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .marke.modem { background: rgba(217, 70, 239, .16); color: #f0abfc; border-color: rgba(217, 70, 239, .55); }
    :root:not([data-theme="light"]) .karte.modem h3, :root:not([data-theme="light"]) .minikachel.modem b, :root:not([data-theme="light"]) .modem-form legend { color: #f0abfc; }
    :root:not([data-theme="light"]) .minikachel.modem-rx { --ton: #e879f9; }
}
:root[data-theme="dark"] .marke.modem { background: rgba(217, 70, 239, .16); color: #f0abfc; border-color: rgba(217, 70, 239, .55); }
:root[data-theme="dark"] .karte.modem h3, :root[data-theme="dark"] .minikachel.modem b, :root[data-theme="dark"] .modem-form legend { color: #f0abfc; }
:root[data-theme="dark"] .minikachel.modem-rx { --ton: #e879f9; }
@media (prefers-reduced-motion: reduce) {
    .minikachel.modem-rx, .minikachel.modem-tx { animation: none; }
}

/* Zweiter Faktor im Konto: der QR-Code steht auf weissem Grund (auch im dunklen Thema), sonst lesen ihn viele Apps nicht. */
.tf-qr { display: inline-block; background: #fff; padding: 6px; border-radius: 6px; line-height: 0; margin: 4px 0 8px; }
.tf-qr svg { width: 200px; height: 200px; display: block; }
#tf-codes-liste { font-size: 1.15em; letter-spacing: .06em; margin: .3rem 0; }

/* Wie ein Hotspot hereinkommt: roter Punkt = eigener fester Port (soll auf Dauer weg), gruener Punkt = Sammelport. */
.minikachel.weg-fix::after, .minikachel.weg-sammel::after {
    content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; pointer-events: none;
}
.minikachel.weg-fix::after { background: #e5373a; box-shadow: 0 0 5px #e5373a; }
.minikachel.weg-sammel::after { background: #1fa866; }

/* Hinweiskasten im Konto (Status der Registrierung, Notfallcodes, Einmal-Code-Sitzung): im dunklen Thema dunkel, sonst steht helle Schrift auf hellem Grund. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .konto-status { background: rgba(190, 120, 255, .12); border-color: rgba(190, 120, 255, .5); }
}
:root[data-theme="dark"] .konto-status { background: rgba(190, 120, 255, .12); border-color: rgba(190, 120, 255, .5); }

/* Nachgezogen aus tnydmr.css: Hinweisbalken (Fixport, Update), Talkgroup-Zeilen der Systemliste, Diagnose-Kacheln. */
.fixport-hinweis { position: sticky; top: 0; z-index: 49; display: flex; gap: .8rem; align-items: center; justify-content: center; padding: .5rem 1rem; background: #e07a3a; color: #1a1a1a; font-size: 13px; }
.fixport-hinweis button { flex: none; }
.update-hinweis { background: #e8c44a; }

td.tgs .tgzeile { display: flex; align-items: baseline; gap: 8px; }
td.tgs .tgzeile + .tgzeile { margin-top: 4px; }
td.tgs .tgslot { flex: 0 0 26px; font-family: var(--mono); font-size: 10px; color: var(--text-dim); }
td.tgs .tgzeile .tgmarken { flex: 1 1 auto; min-width: 0; }

.diag-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-top: 10px; }
.diag-kachel { border: 1px solid var(--border); border-left-width: 5px; border-radius: var(--radius); padding: 8px 12px; background: var(--surface); box-shadow: var(--schatten); }
.diag-kachel h3 { margin: 0 0 4px 0; font-size: 14px; }
.diag-kachel.ok { border-left-color: var(--gruen); }
.diag-kachel.warnung { border-left-color: var(--gelb); }
.diag-kachel.fehler { border-left-color: var(--rot); }
.diag-kachel.aus { border-left-color: var(--muted); opacity: .75; }
.diag-kurz { margin: 2px 0; }
.diag-zeilen { margin: 4px 0; padding-left: 18px; font-family: var(--mono); font-size: 11px; word-break: break-word; }
.diag-hinweis { margin: 6px 0 0 0; font-size: 12px; color: var(--text-dim); }
#diag-konfig { margin-top: 10px; }


/* Meshkarte: Kreise, Verbindungen, wandernde Audio-Punkte. */
.karte-leiste { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.karte-legende i.k-l { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--karte-aus); margin: 0 3px 0 10px; vertical-align: -1px; }
.karte-legende i.k-l.ok { border-color: var(--karte-ok); }
.karte-legende i.k-l.ich { border-color: var(--karte-ich); }
.karte-legende i.k-l.fluss { border-color: var(--karte-fluss); background: var(--karte-fluss); }
.karte-flaeche { border: 1px solid var(--border); background: var(--surface); }
#karte { display: block; width: 100%; height: auto; max-height: 72vh; touch-action: none; user-select: none; -webkit-user-select: none; }
#karte[data-ansicht="ich"] #k-mesh { display: none; }
#karte[data-ansicht="mesh"] #k-ich { display: none; }
.k-kante { stroke: var(--karte-linie); stroke-width: 1.2; fill: none; }
.k-kante.echt { stroke: var(--karte-ok); stroke-width: 1.6; opacity: .6; }
.k-kante.aus { stroke: var(--karte-aus); stroke-dasharray: 5 5; opacity: .75; }
.k-kante.schwach { opacity: .16; }
.k-fluss { stroke: var(--karte-fluss); stroke-width: 2.6; opacity: .85; fill: none; }
.k-punkt { fill: var(--karte-fluss); }
.kn { cursor: pointer; }
.kn .k-kreis { fill: var(--surface); stroke: var(--karte-aus); stroke-width: 2.5; }
.kn.ok .k-kreis { stroke: var(--karte-ok); }
.kn.ich .k-kreis { stroke: var(--karte-ich); stroke-width: 3.5; }
.kn.gew .k-kreis { stroke-width: 5; }
.kn.hoert .k-kreis { fill: var(--karte-hoert); }
.kn.sat.aus .k-kreis { stroke-dasharray: 4 3; }
.kn.bruecke .k-kreis { stroke: var(--karte-bruecke); }
.kn.bruecke .k-sub { fill: var(--karte-bruecke); }
.k-kante.bruecke { stroke: var(--karte-bruecke); stroke-width: 1.6; opacity: .65; }
.karte-legende i.k-l.bruecke { border-color: var(--karte-bruecke); }
.kn.dienst .k-kreis { stroke: var(--karte-dienst); }
.kn.dienst .k-sub { fill: var(--karte-dienst); }
.k-kante.dienst { stroke: var(--karte-dienst); stroke-width: 1.6; opacity: .65; }
.karte-legende i.k-l.dienst { border-color: var(--karte-dienst); }
.kn.sat.spricht .k-sub { fill: var(--karte-fluss); }
#k-ich-fluss .k-fluss { opacity: .7; }
.k-kante.fremd { stroke-width: 1.3; opacity: .45; }
.k-kante.aus.fremd { opacity: .6; }
.kn.mittel .k-kreis { stroke: var(--karte-mittel); stroke-dasharray: 3 3; }
.karte-legende i.k-l.mittel { border-color: var(--karte-mittel); border-style: dashed; }
.karte-info .mittel { color: var(--karte-mittel); }
.kn.spricht .k-kreis, .kn.ich.spricht .k-kreis { stroke: var(--karte-sende); }
.kn.spricht .k-puls { stroke: var(--karte-sende); }
.kn.spricht .k-sub, .kn.sat.spricht .k-sub { fill: var(--karte-sende); }
.kn.sat.hoert .k-puls, .kn.ich.hoert .k-puls { animation: k-puls 1.4s ease-out infinite; }
.karte-legende i.k-l.sende { border-color: var(--karte-sende); background: var(--karte-sende); }
.k-fluss.daten { stroke: var(--karte-daten); }
.k-punkt.daten { fill: var(--karte-daten); }
.kn.datenruf .k-kreis { stroke: var(--karte-daten); }
.kn.datenruf .k-puls { stroke: var(--karte-daten); animation: k-puls 1.4s ease-out infinite; }
.kn.datenruf .k-sub, .kn.sat.datenruf .k-sub { fill: var(--karte-daten); }
.karte-legende i.k-l.daten { border-color: var(--karte-daten); background: var(--karte-daten); }
.k-puls { fill: none; stroke: var(--karte-fluss); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.kn.spricht .k-puls { animation: k-puls 1.4s ease-out infinite; }
@keyframes k-puls { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
.k-name { fill: var(--text); font-size: 13px; text-anchor: middle; pointer-events: none; }
.k-sub { fill: var(--karte-fluss); font-size: 11px; text-anchor: middle; pointer-events: none; }
.kn.sat .k-sub { fill: var(--text-dim); }
.karte-info { margin-top: 10px; }
.karte-liste { margin: 4px 0; padding-left: 18px; }
.karte-liste ul { margin: 2px 0; padding-left: 18px; }
.karte-info .gut { color: var(--karte-ok); }
.karte-info .schlecht { color: var(--karte-aus); }

/* Fortschrittsbalken (Update) - fehlte in dieser Fassung, der Balken beim Laden der Dateien blieb unsichtbar */
.balken { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; margin: 8px 0; overflow: hidden; }
.balken > div { height: 100%; background: var(--accent); transition: width .4s; }

/* APRS-Symbolwahl im Konto */
.aprs-wahl-zeile { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; flex-wrap: wrap; }
.aprs-vorschau { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.aprs-vorschau .aprs-gross { font-size: 26px; line-height: 1; }
.aprs-picker { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 10px; margin: 0 0 10px; max-width: 640px; }
.aprs-picker input[type=search] { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.aprs-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; max-height: 320px; overflow-y: auto; }
.aprs-kachel { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.aprs-kachel:hover, .aprs-kachel:focus-visible { border-color: var(--accent2, var(--accent)); outline: none; }
.aprs-kachel.gewaehlt { border-color: var(--accent2, var(--accent)); box-shadow: 0 0 0 1px var(--accent2, var(--accent)) inset; }
.aprs-kachel .aprs-symbol { font-size: 26px; line-height: 1.1; }
.aprs-kachel .aprs-name { font-size: 11px; line-height: 1.2; }
.aprs-kachel .aprs-code { font-size: 10px; opacity: .6; font-family: var(--mono, monospace); }
.aprs-gruppe { grid-column: 1 / -1; font-size: 11px; opacity: .7; margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }
.aprs-overlay-zeile { display: block; margin: 0 0 8px; opacity: .85; }

/* Links: Karten in Gruppen (Reiter Links) und Symbolwahl im Editor */
.link-gruppe { font-size: 13px; font-weight: 600; margin: 18px 0 8px; opacity: .75; }
.link-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.link-karte { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.link-karte:hover, .link-karte:focus-visible { border-color: var(--accent2, var(--accent)); outline: none; }
.link-symbol { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2, var(--border)); font-size: 18px; }
.link-titel { font-size: 13px; font-weight: 600; line-height: 1.3; }
.link-beschr { font-size: 12px; line-height: 1.35; margin-top: 2px; opacity: .7; }
.link-symbolraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.link-symbolraster button { font-size: 22px; line-height: 1; padding: 8px 0; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.link-symbolraster button:hover, .link-symbolraster button:focus-visible, .link-symbolraster button.gewaehlt { border-color: var(--accent2, var(--accent)); outline: none; }
.link-karte .link-meta { font-size: 11px; margin-top: 3px; opacity: .55; }

/* Die Admin-Anmeldung ist ein Popup am Y von TNYDMR (oben links); der sichtbare Knopf "Anmelden" entfaellt. */
#anmelden { display: none !important; }
.h-name h1 span.y-knopf { color: inherit; cursor: pointer; }
.h-name h1 span.y-knopf:hover, .h-name h1 span.y-knopf:focus-visible { color: var(--accent); outline: none; }
.anmeldeform {
    position: fixed !important;
    z-index: 1000;
    top: 64px;
    left: 24px;
    width: min(340px, calc(100vw - 32px));
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55), 0 12px 40px rgba(0, 0, 0, .5);
}
.anmeldeform label, .anmeldeform input, .anmeldeform button { width: 100%; box-sizing: border-box; }
.anmelde-titel { font-size: 14px; }

/* Konto eines gesperrten Nutzers: orangener Vollbild-Hinweis (tnydmr.js, kontoSperreZeigen) */
.konto-sperre {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    text-align: center;
    background: #e8650a;
    color: #fff;
    overflow: auto;
}
.konto-sperre[hidden] { display: none !important; }
.konto-sperre h2 { margin: 0; font-size: 28px; line-height: 1.2; color: #fff; }
.konto-sperre-text { margin: 0; max-width: 40em; font-size: 20px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: #fff; }
.konto-sperre-seit { margin: 0; font-size: 14px; opacity: .9; color: #fff; }
.konto-sperre button {
    margin-top: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 700;
    background: #fff;
    color: #8a3a00;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.konto-sperre button:hover, .konto-sperre button:focus-visible { background: #ffe9d6; color: #6e2d00; outline: 3px solid #fff; outline-offset: 2px; }
body.konto-gesperrt { overflow: hidden; }

/* Hinweis an den Nutzer im Sperr-Dialog: ein mehrzeiliges Feld in voller Breite wie die Eingabefelder */
.tippen textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    background: var(--surface-2, var(--surface));
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    resize: vertical;
}
