.rn-karte {
  --rnF: #388bfd;
  --rnRGB: 56, 139, 253;
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  padding: 11px 12px 11px 15px;
  margin-bottom: 9px;
  background: linear-gradient(180deg, rgba(var(--rnRGB), .07), rgba(var(--rnRGB), .02)), var(--bg-input);
  border: 1px solid rgba(var(--rnRGB), .24);
  box-sizing: border-box;
  min-width: 0;
}
.rn-karte::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--rnF);
  opacity: .9;
}
.rn-akzent-gold { --rnF: #f5c451; --rnRGB: 245, 196, 81; }
.rn-titel { font-weight: 800; font-size: 13.5px; color: var(--text); line-height: 1.3; }
.rn-text { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; margin-top: 2px; }
.rn-unter {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-muted); margin: 14px 2px 7px;
}
.rn-leer { font-size: 12px; color: var(--text-muted); padding: 10px 4px; font-style: italic; }
.rn-fehler { font-size: 11.5px; color: #ff7b72; margin-top: 6px; width: 100%; }
.rn-reihe { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; min-width: 0; }
.rn-reihe > .rn-feld { flex: 1 1 160px; }
.rn-breit { width: 100%; justify-content: center; margin-top: 6px; }

.rn-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 12px; border-radius: 9px; cursor: pointer;
  font-size: 12px; font-weight: 800; line-height: 1.2;
  background: var(--bg-input); color: var(--text); border: 1px solid var(--border);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.rn-knopf:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(56, 139, 253, .55); }
.rn-knopf:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rn-knopf.gold {
  color: #231a04; border: none;
  background: linear-gradient(135deg, #fff0c0, #f5c451 55%, rgba(245, 196, 81, .78));
  box-shadow: 0 6px 16px rgba(245, 196, 81, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.rn-knopf.gold:hover:not(:disabled) { box-shadow: 0 9px 22px rgba(245, 196, 81, .4); }
.rn-knopf.gold:disabled { color: #231a04; filter: grayscale(.5); }
.rn-knopf.rot { color: #ff7b72; background: rgba(230, 57, 70, .1); border-color: rgba(230, 57, 70, .35); }
.rn-knopf.rn-klein { padding: 4px 8px; font-size: 11px; }

.rn-feld {
  box-sizing: border-box; min-width: 0; max-width: 100%;
  padding: 8px 10px; border-radius: 9px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font-size: 12.5px; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.rn-feld:focus { border-color: rgba(56, 139, 253, .75); box-shadow: 0 0 0 3px rgba(56, 139, 253, .14); }
.rn-label { display: block; font-size: 10.5px; font-weight: 700; color: var(--text-muted); letter-spacing: .4px; }

.rn-pille {
  --rnP: 139, 148, 158;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  color: rgb(var(--rnP)); background: rgba(var(--rnP), .14); border: 1px solid rgba(var(--rnP), .32);
}
.rn-pille-eigen, .rn-pille-frei { --rnP: 63, 185, 80; }
.rn-pille-adresse { --rnP: 56, 139, 253; }
.rn-pille-name, .rn-pille-ersatz { --rnP: 210, 153, 34; }
.rn-pille-zu { --rnP: 139, 148, 158; }
.rn-pille-fl { --rnP: 255, 122, 69; }
.rn-pille-gold { --rnP: 245, 196, 81; }

.rn-chip {
  padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted);
  transition: transform .12s ease, border-color .12s ease, color .12s ease;
}
.rn-chip:hover { transform: translateY(-1px); color: var(--text); }
.rn-chip.an { color: #f5c451; border-color: rgba(245, 196, 81, .7); background: rgba(245, 196, 81, .12); }
.rn-reiter, .rn-pillen, .rn-status { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.rn-status { margin-bottom: 4px; }

.rn-kopf .rn-schalter-zeile, .rn-schalter-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rn-kopf .el-schalter { flex-shrink: 0; }
.rn-suche { margin: 2px 0 10px; }
.rn-set .rn-set-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.rn-wache { padding: 0; }
.rn-wache-kopf {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%;
  padding: 10px 12px 10px 15px; background: none; border: none; color: var(--text);
  cursor: pointer; text-align: left; font: inherit;
}
.rn-wache-name { font-weight: 800; font-size: 13px; min-width: 0; flex: 1 1 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-kennung { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: #f5c451; font-weight: 700; }
.rn-anzahl { font-size: 11px; color: var(--text-muted); }
.rn-pfeil { color: var(--text-muted); margin-left: auto; }
.rn-wache.offen { --rnF: #f5c451; --rnRGB: 245, 196, 81; }
.rn-ort-zeile { padding: 0 12px 8px 15px; }
.rn-fz-liste { padding: 0 8px 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.rn-fz-zeile {
  display: grid; grid-template-columns: minmax(70px, 1fr) minmax(120px, 2fr) minmax(0, 1.2fr) auto;
  align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px;
  background: var(--bg-card); border: 1px solid var(--border); font-size: 12px; min-width: 0;
}
.rn-fz-zeile.bearbeiten { grid-template-columns: minmax(70px, 1fr) minmax(120px, 3fr) auto; }
.rn-fz-zeile.bearbeiten .rn-fehler { grid-column: 1 / -1; margin-top: 0; }
.rn-fz-typ { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.rn-fz-ruf { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rn-fz-ruf-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rn-fz-ruf .rn-pille { flex-shrink: 0; }
.rn-fz-name { color: var(--text-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-fz-knoepfe { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.rn-zusatz { color: var(--text-muted); font-weight: 500; font-size: .92em; }

.rn-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rn-kat { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; padding: 11px 10px 10px 13px; }
.rn-kat.gewaehlt { --rnF: #f5c451; --rnRGB: 245, 196, 81; box-shadow: 0 0 0 1px rgba(245, 196, 81, .45), 0 8px 22px rgba(245, 196, 81, .12); }
.rn-kat.zu { opacity: .8; }
.rn-kat-vorschau {
  display: flex; align-items: center; justify-content: center; height: 70px; border-radius: 10px;
  background: radial-gradient(70% 80% at 50% 45%, rgba(255, 255, 255, .06), transparent 70%);
}
.rn-kat-info { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
.rn-kat-info .rn-pille { white-space: normal; max-width: 100%; line-height: 1.3; }
.rn-kat-knopf .rn-knopf { width: 100%; }
.rn-fz-vorschau { width: 42px; height: 42px; transform: scale(1.45); }
.rn-wache-vorschau { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transform: scale(1.3); }
.rn-wache-vorschau .rn-wr { width: 36px; height: 36px; }
.rn-zuweisung { margin-top: 12px; }
.rn-regeln { display: flex; flex-direction: column; gap: 5px; }
.rn-regel {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px;
  background: var(--bg-input); border: 1px solid var(--border); font-size: 12px; min-width: 0;
}
.rn-regel-wo { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-regel-was { font-weight: 800; color: #f5c451; white-space: nowrap; }

.rn-mw-knopf {
  padding: 8px 11px; border-radius: 8px; border: 1px solid rgba(245, 196, 81, .5);
  background: rgba(245, 196, 81, .08); color: #f5c451; font-size: 13px; cursor: pointer;
}
.rn-pop-knopf {
  padding: 5px 8px; border-radius: 6px; border: 1px solid rgba(245, 196, 81, .55);
  background: rgba(245, 196, 81, .12); color: #f5c451; font-size: 11px; font-weight: 700; cursor: pointer;
}
.rn-lv-pille {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .6px; color: #f5c451;
  background: rgba(245, 196, 81, .12); border: 1px solid rgba(245, 196, 81, .35);
}

.rn-ch-kopf { display: flex; align-items: center; gap: 12px; }
.rn-ch-icon { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.rn-ch-name { flex: 1 1 auto; min-width: 0; }
.rn-ch-name .rn-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 9px; }
.rn-kachel {
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(245, 196, 81, .22);
  border-radius: 11px; padding: 9px 8px; min-width: 0;
}
.rn-k-titel { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.rn-k-wert { font-size: 19px; font-weight: 900; color: #f5c451; font-variant-numeric: tabular-nums; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-k-wert.rn-k-klein { font-size: 13px; }
.rn-fortschritt { display: flex; flex-direction: column; gap: 5px; }
.rn-f-zeile { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-muted); flex-wrap: wrap; }
.rn-balken { height: 7px; border-radius: 999px; background: var(--bg-card); overflow: hidden; border: 1px solid var(--border); }
.rn-balken > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #388bfd, #7cc4ff); }
.rn-balken-gold > span { background: linear-gradient(90deg, #d29922, #f5c451); }
.rn-chronik { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.rn-chronik::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: rgba(245, 196, 81, .25); }
.rn-ch-eintrag { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; position: relative; }
.rn-ch-punkt {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid rgba(245, 196, 81, .45); font-size: 12px; position: relative; z-index: 1;
}
.rn-ch-titel { font-weight: 800; font-size: 12.5px; color: var(--text); }
.rn-ch-text { font-size: 11.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.rn-ch-datum { font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rn-ch-jubilaeum .rn-ch-titel { color: #f5c451; }
.rn-ch-knoepfe { margin-top: 12px; }

.rn-frist {
  display: flex; align-items: center; gap: 10px; position: relative; overflow: hidden;
  border-radius: 12px; padding: 9px 12px 9px 15px; margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(210, 153, 34, .1), rgba(210, 153, 34, .03)), var(--bg-input);
  border: 1px solid rgba(210, 153, 34, .38); font-size: 12.5px; line-height: 1.45; color: var(--text);
}
.rn-frist::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #d29922; }
.rn-frist-text { flex: 1 1 auto; min-width: 0; }
.rn-frist-hilfe {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  background: rgba(56, 139, 253, .18); border: 1px solid var(--info); color: var(--info);
  font-weight: 800; font-size: 12px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}

.rn-lack-punkt {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, .55); margin-right: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3);
}
.rn-lack-punkt[data-rn-lack="leuchtrot"] { background: #ff3d17; }
.rn-lack-punkt[data-rn-lack="retro"] { background: linear-gradient(180deg, #d3141c 52%, #f6f5ef 52%); }
.rn-lack-punkt[data-rn-lack="signal"] { background: repeating-linear-gradient(45deg, #f7f8fa 0 3px, #e11d2a 3px 5px); }
.rn-lack-punkt[data-rn-lack="battenburg"] { background: conic-gradient(#ffd400 0 25%, #1d43c4 0 50%, #ffd400 0 75%, #1d43c4 0); }
.rn-lack-punkt[data-rn-lack="nacht"] { background: #121722; border-color: #5fb3ff; }
.rn-lack-punkt[data-rn-lack="verband"] { background: var(--rn-vb-haupt, #2f6fe4); }

[data-rn-lack="leuchtrot"] .elk-fz > path:nth-of-type(2) { fill: #ff3d17; }
[data-rn-lack="leuchtrot"] .elk-fz > path:nth-of-type(3) { stroke: #ffd7c9; }
[data-rn-lack="retro"] .elk-fz > path:nth-of-type(2) { fill: url(#rnLackRetro); }
[data-rn-lack="retro"] .elk-fz > g:first-of-type { fill: #fff; stroke: #5b0b0b; stroke-width: 1.1px; paint-order: stroke; }
[data-rn-lack="signal"] .elk-fz > path:nth-of-type(2) { fill: url(#rnLackSignal); }
[data-rn-lack="signal"] .elk-fz > path:nth-of-type(3) { stroke: #e11d2a; }
[data-rn-lack="signal"] .elk-fz > g:first-of-type { fill: #fff; stroke: #8a0d14; stroke-width: 1.3px; paint-order: stroke; }
[data-rn-lack="battenburg"] .elk-fz > path:nth-of-type(2) { fill: url(#rnLackBattenburg); }
[data-rn-lack="battenburg"] .elk-fz > g:first-of-type { fill: #fff; stroke: #0b1a4a; stroke-width: 1.3px; paint-order: stroke; }
[data-rn-lack="nacht"] .elk-fz > path:nth-of-type(2) { fill: #121722; }
[data-rn-lack="nacht"] .elk-fz > path:nth-of-type(3) { stroke: #5fb3ff; }
[data-rn-lack="nacht"] .elk-fz > g:first-of-type { fill: #dbe7f5; }
[data-rn-lack="verband"] .elk-fz > path:nth-of-type(2) { fill: var(--rn-vb-haupt, #2f6fe4); }
[data-rn-lack="verband"] .elk-fz > path:nth-of-type(3) { stroke: var(--rn-vb-akzent, #9ec1ff); }

.rn-wr { position: relative; }
.rn-wr::before {
  content: ''; position: absolute; left: -3px; top: -3px; right: -3px; bottom: -3px;
  border-radius: 11px; pointer-events: none; z-index: 1;
}
.rn-wr-bronze::before { border: 3px solid #c47a3a; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45), 0 0 8px rgba(196, 122, 58, .55); }
.rn-wr-silber::before { border: 3px solid #d5dce5; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45), 0 0 8px rgba(213, 220, 229, .5); }
.rn-wr-gold::before { border: 3px solid #f5c451; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45), 0 0 11px rgba(245, 196, 81, .7); }
.rn-wr-ehren::before { border: 4px double #c9b6ff; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45), 0 0 9px rgba(160, 130, 255, .55); }
.rn-wr-blaulicht::before { border: 3px solid #2a64f6; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45); animation: rnBlaulicht 1.6s steps(1, end) infinite; }
@keyframes rnBlaulicht {
  0% { border-color: #2a64f6; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45), 0 0 10px rgba(42, 100, 246, .8); }
  50% { border-color: #d3e1ff; box-shadow: 0 0 0 1px rgba(10, 14, 22, .45), 0 0 4px rgba(211, 225, 255, .6); }
}
body.tab-hidden .rn-wr-blaulicht::before, body.vrs-gfx-niedrig .rn-wr-blaulicht::before, body.vrs-low-zoom .rn-wr-blaulicht::before { animation: none; }
.rn-pl {
  position: absolute; right: -9px; top: -9px; z-index: 2; pointer-events: none;
  min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 800 9px/1 system-ui, sans-serif; color: #231a04;
  background: linear-gradient(135deg, #fff0c0, #f5c451); border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.rn-pl-stern { background: linear-gradient(135deg, #ffe58a, #e6a400); font-size: 10px; }
.rn-pl-wappen { background: linear-gradient(135deg, #9ec1ff, #1f5fcf); }

@media (prefers-reduced-motion: reduce) {
  .rn-wr-blaulicht::before { animation: none; }
  .rn-knopf, .rn-chip { transition: none; }
  .rn-knopf:hover:not(:disabled), .rn-chip:hover { transform: none; }
}

@media (max-width: 520px) {
  .rn-fz-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .rn-fz-zeile .rn-fz-ruf { grid-column: 1 / -1; grid-row: 2; }
  .rn-fz-zeile .rn-fz-name { display: none; }
  .rn-fz-zeile.bearbeiten { grid-template-columns: minmax(0, 1fr); }
  .rn-fz-zeile.bearbeiten .rn-fz-knoepfe { justify-content: flex-start; }
  .rn-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rn-kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .rn-k-wert { font-size: 16px; }
  .rn-wache-name { flex-basis: 100%; }
}
