:root {
  --rot: #b71c1c; --rot-d: #8e1414; --rot-l: #fbeaea;
  --ink: #1d232a; --ink-2: #4a5561; --ink-3: #7b8692;
  --line: #e2e6ea; --bg: #f5f6f8; --card: #fff;
  --ok: #1e7a46; --ok-l: #e7f5ed; --warn: #b26a00;
  --r: 10px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14.5px; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 1.1rem 0 .5rem; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; font-size: .85em; word-break: break-all; }
.dim { color: var(--ink-3); font-weight: 400; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.2rem;
  background: var(--ink); color: #fff; padding: .55rem 1.2rem; flex-wrap: wrap; }
.brand { display: flex; gap: .6rem; align-items: center; }
.brand .mark { height: 40px; width: auto; display: block; }
.brand strong { display: block; font-size: .98rem; }
.brand small { display: block; color: #aeb8c2; font-size: .75rem; }
nav { display: flex; gap: .2rem; flex-wrap: wrap; }
nav a { color: #d5dbe1; padding: .45rem .75rem; border-radius: 7px; font-weight: 500; }
nav a:hover { background: #2c343d; text-decoration: none; color: #fff; }
nav a.on { background: #fff; color: var(--ink); }
.tools { margin-left: auto; display: flex; gap: .7rem; align-items: center; }
.jahr label { color: #aeb8c2; font-size: .8rem; display: flex; gap: .4rem; align-items: center; }
.jahr select { background: #2c343d; color: #fff; border: 1px solid #3b4550; border-radius: 7px; padding: .35rem .5rem; font: inherit; }

main { max-width: 1250px; margin: 0 auto; padding: 1.3rem 1.2rem 5rem; }
footer { text-align: center; color: var(--ink-3); font-size: .75rem; padding: 1rem; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .95rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c6ccd2; text-decoration: none; background: #fafbfc; }
.btn.primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.primary:hover { background: var(--rot-d); }
.btn.danger { color: var(--rot); border-color: #efc4c4; }
.btn.danger:hover { background: var(--rot-l); }
.btn.small { padding: .32rem .65rem; font-size: .82rem; font-weight: 500; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 1rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1.1rem; border-top: 3px solid var(--rot); }
.tile span { display: block; color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.tile b { display: block; font-size: 1.9rem; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.tile small { color: var(--ink-3); font-size: .78rem; }
.tile.small b { font-size: 1.35rem; }

/* Tabellen */
.tablewrap { overflow-x: auto; }
.tablewrap.short { max-height: 420px; overflow-y: auto; }
table.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.grid.narrow { width: auto; min-width: 320px; }
.grid th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3);
  font-weight: 600; padding: .5rem .6rem; border-bottom: 2px solid var(--line); background: #fff; position: sticky; top: 0; }
.grid td { padding: .42rem .6rem; border-bottom: 1px solid #eef0f2; }
.grid tbody tr:hover { background: #fafbfc; }
.grid tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.grid .num { text-align: right; }
.grid .nr { width: 3rem; color: var(--ink-3); }
.grid .strong { font-weight: 700; }
.grid .zero { color: #c3c9cf; }
.grid tr.muted td { color: var(--ink-3); }
.grid tr.click { cursor: pointer; }
.nowrap { white-space: nowrap; }
.empty { color: var(--ink-3); text-align: center; padding: 1.5rem; }

.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; background: #eef0f3; color: var(--ink-2); vertical-align: 1px; }
.tag.night { background: #e6e9f5; color: #34407a; }
.tag.nacht { background: #000; color: #fff; }
.tag.tagzeit { background: #a9d8f5; color: #000; }
.tag.nacht, .tag.tagzeit { min-width: 2.6rem; text-align: center; }
/* Einsatztypen */
.tag.typ { min-width: 2.6rem; text-align: center; color: #fff; }
.tag.typ-B   { background: #c62828; }
.tag.typ-TH  { background: #1565c0; }
.tag.typ-THV { background: #ef6c00; }
.tag.typ-THT { background: #2e7d32; }
.tag.typ-BMA { background: #6a1b9a; }
.tag.typ-SO  { background: #616161; }
.warn { color: var(--warn); font-weight: 600; }
.kat { font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: #eef0f3; white-space: nowrap; }
.k-einsatz { background: var(--rot-l); color: var(--rot); }
.k-jf_ausbildung, .k-jf_veranstaltung { background: #e7f0fb; color: #1f4e8c; }
.count { display: inline-block; min-width: 1.6rem; text-align: center; font-size: .78rem; background: var(--ink); color: #fff; border-radius: 99px; padding: .05rem .45rem; margin-left: .3rem; vertical-align: 2px; }

/* Balken */
.bars { display: grid; gap: .35rem; }
.bar { display: grid; grid-template-columns: 170px 1fr 90px 90px; align-items: center; gap: .8rem; color: var(--ink); padding: .2rem .3rem; border-radius: 6px; }
.bar:hover { background: #f7f8fa; text-decoration: none; }
.bar .track { height: 12px; background: #f0f2f4; border-radius: 99px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--rot); border-radius: 99px; }
.bar .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar .sub { color: var(--ink-3); font-size: .8rem; }

/* Chips */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { padding: .35rem .75rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: .86rem; }
.chip em { font-style: normal; color: var(--ink-3); margin-left: .2rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on em { color: #aeb8c2; }
.chip:hover { text-decoration: none; border-color: #c6ccd2; }

/* Formulare */
.form label, .fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.fields { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; margin-bottom: .8rem; }
.fields .wide { flex: 1 1 280px; }
.fieldbtn { display: flex; align-items: flex-end; }
input, select { font: inherit; font-weight: 400; color: var(--ink); padding: .48rem .6rem; border: 1px solid #cfd5db; border-radius: 7px; background: #fff; }
input:focus, select:focus { outline: 2px solid #f1b5b5; border-color: var(--rot); }
label.check { flex-direction: row; align-items: center; gap: .5rem; margin: .7rem 0; }
.hint { color: var(--ink-3); font-size: .82rem; margin: .5rem 0 0; }
.links { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .5rem; }

/* Anwesenheit */
.att-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.att-head h2 { margin: 0; }
.att-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.att-tools input[type=search] { min-width: 200px; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: .4rem; }
.pitem { display: flex !important; flex-direction: row !important; align-items: center; gap: .55rem !important;
  border: 1px solid var(--line); border-radius: 8px; padding: .35rem .45rem .35rem .6rem; cursor: pointer;
  font-size: .9rem !important; font-weight: 500 !important; color: var(--ink) !important; background: #fff; user-select: none; }
.pitem:hover { border-color: #c6ccd2; }
.pitem.on { border-color: var(--ok); background: var(--ok-l); }
.pitem input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); margin: 0; }
.pitem .pname { flex: 1; }
.pitem .hrs { width: 62px; padding: .25rem .4rem; text-align: right; }
.pitem:not(.on) .hrs { visibility: hidden; }
.pitem.hidden { display: none !important; }
details summary { cursor: pointer; font-weight: 600; margin: 1rem 0 .5rem; color: var(--ink-2); }
.actions { display: flex; gap: .6rem; align-items: center; }
.actions .grow { flex: 1; }
.actions.sticky { position: sticky; bottom: 0; background: rgba(245,246,248,.94); backdrop-filter: blur(4px); padding: .8rem 0; border-top: 1px solid var(--line); }
.only-einsatz, .only-lehrgang { display: none !important; }
form[data-kat=einsatz] .only-einsatz { display: flex !important; }
form[data-kat=lehrgang] .only-lehrgang { display: flex !important; }

/* Meldungen */
.flashes { display: grid; gap: .4rem; margin-bottom: 1rem; }
.flash { padding: .6rem .9rem; border-radius: 8px; background: var(--ok-l); color: #14532d; border: 1px solid #bfe3cd; }
.flash.fehler { background: var(--rot-l); color: var(--rot-d); border-color: #f0c2c2; }

@media (max-width: 760px) {
  .bar { grid-template-columns: 110px 1fr 70px; }
  .bar .sub { display: none; }
  .tools { margin-left: 0; }
}
.tile small b { display: inline; font-size: inherit; margin: 0; color: var(--ink); }
.empty-start { border-left: 4px solid var(--rot); }
.empty-start p { margin: .4rem 0 .8rem; }
.wappen-row { display: flex; gap: 1rem; align-items: center; }
.wappen-vorschau { height: 90px; width: auto; }
.cols.tight { gap: 0 1.5rem; }
.steps { margin: .3rem 0 .6rem; padding-left: 1.3rem; line-height: 1.7; }
.actions form { display: inline; }

/* =====================================================================
   Bildschirm-Layout ab 1200 px Breite (FullHD): volle Breite, keine
   Seiten-Scrollbalken – lange Listen scrollen innerhalb ihrer Karte.
   ===================================================================== */
.layout { display: grid; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.col > .card, .layout > .card { margin-bottom: 0; }
.card.grow { display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.tiles.zwei { grid-template-columns: 1fr 1fr; }

@media (min-width: 1200px) {
  :root { font-size: 14px; }
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
  .top { flex: none; padding: .4rem 1.2rem; }
  main { flex: 1; min-height: 0; overflow: auto; max-width: none; width: 100%;
         padding: 12px 20px 14px; display: flex; flex-direction: column; }
  .pagehead { flex: none; margin-bottom: 10px; }
  h1 { font-size: 1.35rem; }
  .flashes { flex: none; }
  .card { padding: .85rem 1rem; }
  .tiles { margin-bottom: 0; gap: 12px; }
  .tile { padding: .6rem .9rem; }
  .tile b { font-size: 1.6rem; margin: .05rem 0; }
  .grid td { padding: .22rem .55rem; }
  .grid th { padding: .38rem .55rem; }
  .bars { gap: .15rem; }
  .bar { padding: .1rem .3rem; grid-template-columns: 150px 1fr 80px 80px; }

  /* Seiten mit festem Raster füllen die Fensterhöhe */
  main.voll .layout { flex: 1; min-height: 0; }
  main.voll .col { min-height: 0; }
  main.voll .card.grow { flex: 1; min-height: 0; }
  main.voll .scrollbox { flex: 1; min-height: 0; overflow: auto; }
  .scrollbox .grid thead th { position: sticky; top: 0; z-index: 1; }
  .scrollbox .grid tfoot td { position: sticky; bottom: 0; background: #fff; z-index: 1; }

  .layout.uebersicht { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
  .layout.einsaetze { grid-template-columns: 300px minmax(0, 1.7fr) minmax(0, 1fr); }
  .layout.mitglieder { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .layout.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .layout.konfig { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .konfig-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .konfig-form .card { margin: 0; }
  .konfig-form .actions { grid-column: 1 / -1; }
  .cols { gap: 0 14px; }
  .actions.sticky { padding: .6rem 0; }
  .plist { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .3rem; }
  .pitem { padding: .22rem .4rem .22rem .55rem !important; }
  .pitem .hrs { padding: .15rem .35rem; }
  h3 { margin: .7rem 0 .35rem; }
  .hint { font-size: .8rem; }
}

.updatebar { display: block; flex: none; background: #fff4d6; color: #7a4b00; border-bottom: 1px solid #f0d58a;
  padding: .35rem 1.2rem; font-weight: 600; font-size: .88rem; }
.updatebar:hover { background: #ffecb8; text-decoration: none; }
.tag.neu { background: #fff4d6; color: #7a4b00; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
ul.hint { margin: .4rem 0 0; padding-left: 1.2rem; }
.tiles.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.drei .tile b { font-size: 1.45rem; }
.tiles.drei .tile small { display: block; line-height: 1.25; }

/* ===== 1.5.0: Stammdaten ===== */
.pagehead .grow { flex: 1; }
.pagehead h1 .tag.dg { font-size: .8rem; vertical-align: 3px; background: #0e1a4f; color: #fff; }
.tag.dg { background: #e6e9f5; color: #0e1a4f; }
.mliste { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 128px auto; gap: .4rem; align-items: center;
  padding: .12rem .3rem; border-bottom: 1px solid #f0f2f4; border-radius: 5px; }
.mrow.on { background: var(--ok-l); }
.mrow label { display: flex; align-items: center; gap: .45rem; min-width: 0; cursor: pointer; font-size: .85rem; }
.mrow label b { min-width: 3.1rem; font-size: .8rem; }
.mrow label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.mrow input[type=date] { font-size: .78rem; padding: .1rem .25rem; width: 128px; }
.mrow input[type=date].ablauf { border-color: var(--rot); color: var(--rot); }
.mrow .mleer { font-size: .72rem; color: var(--ink-3); width: 128px; text-align: center; }
.mrow:not(.on) input[type=date] { opacity: .45; }
.hinweis { background: #fff4d6; color: #6b4300; border-radius: 6px; padding: .4rem .6rem; font-size: .84rem; margin-bottom: .5rem; }
.hinweis.ok { background: var(--ok-l); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: .2rem; }
.chip { font-size: .68rem; font-weight: 700; padding: 0 .3rem; border-radius: 4px; background: #eef0f3; color: var(--ink-2); }
.chip.fs { background: #e6f0fb; color: #1c4f86; }
.chip.abz { background: #fff4d6; color: #7a4b00; }
/* Fällig-Karte */
.faellig-liste { list-style: none; margin: 0; padding: 0; }
.faellig-liste li { display: grid; grid-template-columns: 10px minmax(150px, 220px) minmax(0, 1fr); gap: .5rem; align-items: center;
  padding: .18rem .2rem; border-bottom: 1px solid #f0f2f4; font-size: .85rem; }
.faellig-liste .punkt { width: 9px; height: 9px; border-radius: 50%; background: #8aa0c8; }
.faellig-liste .rot .punkt { background: var(--rot); }
.faellig-liste .gelb .punkt { background: #e2a300; }
.faellig-liste li a { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.faellig .scrollbox { max-height: 132px; overflow: auto; }
/* Qualifikations-Matrix */
.matrix { width: auto; }
.matrix th.rot90, .matrix td.x { min-width: 34px; }
.matrix tbody td:first-child { min-width: 200px; }
.matrix th.rot90 { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; padding: .4rem .15rem; text-align: left; font-size: .72rem; }
.matrix td.x { text-align: center; color: var(--ok); font-weight: 700; padding: .2rem .1rem; }
.matrix td.x.alt { color: var(--rot); }
.matrix tbody td:first-child { white-space: nowrap; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tabs a { padding: .3rem .7rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .85rem; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.katform td { padding: .15rem .3rem !important; }
.katform input { font-size: .82rem; padding: .15rem .3rem; width: 100%; }
.katform input.kurz { width: 5rem; } .katform input.zahl { width: 3.5rem; }
@media (min-width: 1200px) {
  .layout.person3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .layout.person3 .col > .card:not(.grow) { flex: none; }
  .layout.mitglieder3 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .konfig-form #mitglieder ~ .actions { grid-column: auto; align-self: end; }
}
.grid.list td { vertical-align: middle; }
.chips { line-height: 1.3; }
@media (min-width: 1200px) {
  main.voll .layout.person3 { grid-template-rows: minmax(0, 1fr); }
  main.voll .layout.person3 > div.col:first-of-type { overflow: auto; padding-right: 2px; }
}

/* ===== 1.6.0 ===== */
.ampel { display: inline-block; min-width: 2.4rem; text-align: center; font-weight: 700; font-size: .78rem;
  padding: .02rem .35rem; border-radius: 10px; }
.ampel.gruen { background: var(--ok-l); color: var(--ok); }
.ampel.gelb { background: #fff4d6; color: #7a4b00; }
.ampel.rot { background: var(--rot-l); color: var(--rot); }
.tile.ampel-tile.gruen { border-top-color: var(--ok); } .tile.ampel-tile.gelb { border-top-color: #e2a300; }
.chips-check { display: flex; flex-wrap: wrap; gap: 0 .9rem; }
.chips-check label.check { margin: .15rem 0; font-weight: 500; }
.mehrjahr td.num { white-space: nowrap; }
.mehrjahr .mj-wert { display: inline-block; min-width: 3.2rem; }
.mehrjahr .mj-bar { display: inline-block; width: 56px; height: 6px; background: #eef0f3; border-radius: 3px; margin-left: .4rem; vertical-align: 1px; }
.mehrjahr .mj-bar i { display: block; height: 100%; background: var(--rot); border-radius: 3px; }
.mehrjahr tr.abschnitt td { background: #f3f5f8; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
form.jahr.inline { display: flex; gap: .6rem; }
form.jahr.inline label { display: flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; }
@media (min-width: 1200px) { .actions.nur-schmal { display: none; } }

/* ===== 1.6.2: Anstehende Termine ===== */
.termin-liste { list-style: none; margin: 0; padding: 0; }
.termin-liste li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.2rem; align-items: baseline;
  padding: .32rem .5rem .32rem .7rem; border-bottom: 1px solid #f0f2f4; border-left: 3px solid #8aa0c8; }
.termin-liste li.gelb { border-left-color: #e2a300; }
.termin-liste li.rot { border-left-color: var(--rot); background: var(--rot-l); }
.termin-liste .wann { display: flex; flex-direction: column; line-height: 1.2; }
.termin-liste .wann b { font-size: .86rem; }
.termin-liste .wann small { color: var(--ink-3); font-size: .74rem; }
.termin-liste .was { font-size: .9rem; color: var(--ink); }
.termin-liste .was a { font-weight: 650; }
.card.faellig .scrollbox { max-height: 150px; overflow: auto; }

/* ===== 1.7.0: PA-Haken, Nachweise ===== */
.pitem .pa { display: inline-flex; align-items: center; gap: .15rem; font-size: .68rem; font-weight: 700; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 .25rem; cursor: pointer; }
.pitem .pa input { width: 13px !important; height: 13px !important; margin: 0; accent-color: #1c4f86; }
.pitem .pa:has(input:checked) { background: #e6f0fb; color: #1c4f86; border-color: #9cc0e6; }
.pitem:not(.on) .pa { display: none; }
form[data-kat=einsatz] .not-einsatz { display: none !important; }
.st { display: inline-block; min-width: 5.6rem; text-align: center; font-size: .76rem; font-weight: 600; padding: .05rem .35rem; border-radius: 5px; }
.st.ok { background: var(--ok-l); color: var(--ok); }
.st.bald { background: #fff4d6; color: #7a4b00; }
.st.abgelaufen, .st.fehlt { background: var(--rot-l); color: var(--rot); }
.st.na { color: #c4cad1; background: none; }
.bereit { font-weight: 700; }
.bereit.ja { color: var(--ok); } .bereit.nein { color: var(--rot); }
.matrix2 td, .matrix2 th { text-align: center; }
.matrix2 td:first-child, .matrix2 th:first-child { text-align: left; }
.pcheck { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .15rem .6rem; max-height: 210px; overflow: auto;
  border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; }
.pcheck label { display: flex !important; flex-direction: row !important; align-items: center; gap: .4rem; font-weight: 500 !important; font-size: .84rem !important; }

/* ===== 1.7.1: PA-Details beim Erfassen ===== */
.pitem { flex-wrap: wrap; }
.pitem .pa-det { display: none; flex-basis: 100%; gap: .25rem; padding-left: 1.6rem; margin-top: .15rem; align-items: center; }
.pitem .pa-det i { font-style: normal; font-size: .7rem; color: var(--ink-3); }
.pitem.on:has(.pa-cb:checked) .pa-det { display: flex; }
.pitem .pa-det input { width: 0; flex: 1; min-width: 0; padding: .12rem .3rem !important; font-size: .76rem; text-align: right; }
.pitem .pa-det input::placeholder { text-align: left; font-size: .7rem; }
.btn.nav-btn[disabled] { opacity: .45; }

/* ---------- 2.0: Benutzermenü, Anmeldung, Verwaltung ---------- */
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; background: var(--rot);
  color: #fff; display: grid; place-items: center; font-weight: 600; user-select: none; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu-box { position: absolute; right: 0; top: 42px; background: #fff; color: var(--ink); border-radius: var(--r);
  box-shadow: 0 8px 30px rgba(0,0,0,.18); min-width: 220px; padding: .4rem; z-index: 20; }
.usermenu-kopf { padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.usermenu-kopf b, .usermenu-kopf small { display: block; }
.usermenu-kopf small { color: var(--ink-3); font-size: .78rem; }
.usermenu-box a, .usermenu-box button { display: block; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: 7px;
  color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu-box a:hover, .usermenu-box button:hover { background: var(--bg); text-decoration: none; }
.jahr optgroup { color: #aeb8c2; }

body.auth { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 1rem; }
.auth-box { background: var(--card); border-radius: 14px; width: 100%; max-width: 420px; padding: 1.8rem 1.8rem 1.4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-box.breit { max-width: 640px; }
.auth-kopf { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.3rem; }
.auth-kopf img { height: 46px; }
.auth-kopf strong { display: block; font-size: 1.1rem; }
.auth-kopf small { color: var(--ink-3); }
.auth-box label { display: block; margin-bottom: .8rem; font-weight: 500; }
.auth-box label input { display: block; width: 100%; margin-top: .3rem; }
.auth-box .btn.primary { width: 100%; justify-content: center; padding: .65rem; }
input.code { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; margin: .8rem 0 1rem; }
.qr svg { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; }
.geheimnis { font-family: Consolas, monospace; font-size: 1rem; letter-spacing: .08em; word-spacing: .3em;
  background: var(--bg); padding: .5rem .7rem; border-radius: 7px; display: inline-block; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem .9rem; font-family: Consolas, monospace;
  font-size: 1.05rem; background: var(--bg); padding: .9rem 1.1rem; border-radius: 8px; margin: .8rem 0; }
.einmalpw { font-family: Consolas, monospace; font-size: 1.35rem; letter-spacing: .05em; background: var(--bg);
  padding: .7rem 1rem; border-radius: 8px; display: inline-block; margin: .4rem 0 .8rem; user-select: all; }
.tag.ok { background: var(--ok-l); color: var(--ok); }
.tag.aus { background: #eef0f3; color: var(--ink-3); }
.tag.rot { background: var(--rot-l); color: var(--rot); }
.rechte td select { min-width: 9rem; }
.webrechte th:not(:first-child), .webrechte td:not(:first-child) { text-align: center; width: 7rem; }
.webrechte label.check { justify-content: center; margin: 0; min-height: 2.75rem; }

/* Bereich Webseite (Redaktion) */
.tag.wst-entwurf { background: #fff4d6; color: #7a5200; }
.tag.wst-eingereicht { background: #e3ecfb; color: #1c4a9c; }
.tag.wst-veroeffentlicht { background: var(--ok-l); color: var(--ok); }
.web-hinweis { border-left: 4px solid #1c4a9c; }
.web-hinweis .card-head { flex-wrap: wrap; gap: .6rem; margin: 0; }
.web-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.web-kachel { display: flex; flex-direction: column; gap: .15rem; color: var(--ink); margin: 0; }
.web-kachel:hover { text-decoration: none; border-color: #c6ccd2; }
.web-kachel b { font-size: 1.9rem; line-height: 1.1; }
.web-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.web-filter .grow { flex: 1; }
.web-filter input[type=search] { min-width: 14rem; flex: 0 1 22rem; }
.web-form textarea { width: 100%; font: inherit; line-height: 1.5; resize: vertical; }
.web-form > label, .web-upload > label { margin-bottom: .8rem; }
.web-form fieldset { border: 0; padding: 0; margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.web-form legend { font-weight: 600; font-size: .85rem; margin-bottom: .2rem; }
.textregeln { margin: -.3rem 0 1rem; font-size: .85rem; color: var(--ink-2); }
.textregeln summary { cursor: pointer; color: var(--rot); }
.textregeln ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.web-bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.web-bilder.klein { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: .8rem; }
.web-bild { display: flex; flex-direction: column; gap: .4rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem; background: #fff; }
.web-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: #eef0f3; }
.web-bild input[type=text], .web-bild input:not([type]) { width: 100%; }
.web-bild-wahl { display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; }
.web-bild-wahl label.check { margin: 0; }
.web-bild form { display: flex; flex-direction: column; gap: .4rem; }
.web-upload { border-top: 1px solid var(--line); padding-top: .8rem; }
form.web-upload { border-top: 0; }
.web-mediathek { margin: .5rem 0 1rem; }
.web-mediathek summary { cursor: pointer; font-weight: 600; }
.web-baustein { margin-bottom: 1.1rem; }
.web-baustein input:not([type]) { width: 100%; }
.web-baustein-kopf { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; margin-bottom: .35rem; }
.web-baustein-kopf label.check { margin: 0 0 0 auto; }
.web-form fieldset.web-felder { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.web-info { background: #e3ecfb; color: #1c4a9c; border-radius: 8px; padding: .6rem .8rem; }
.web-fahrzeuge { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .2rem 1rem; margin-bottom: .8rem; }
.web-fahrzeuge label.check { margin: .3rem 0; min-height: 2.2rem; }
.web-fakten { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: .6rem 0; }
.web-fakten dt { color: var(--ink-3); font-size: .82rem; }
.web-fakten dd { margin: 0; }
.web-fz-tabelle input:not([type]) { width: 100%; min-width: 9rem; }
.web-fz-tabelle input.kurz { width: 5rem; min-width: 0; }
.admin-tabs { margin-bottom: 1rem; }
@media print { .top, .no-print { display: none !important; } body.auth { background: #fff; } .auth-box { box-shadow: none; } }

/* ===== 2.0.1 ===== */
/* Zusatzdatum in Listen: Berufung (Führungskräfte), Ende einer Funktion */
.mzusatz { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--ink-3); white-space: nowrap; }
.mrow:not(.on) .mzusatz { opacity: .55; }
.clip { margin-left: .3rem; font-size: .75rem; text-decoration: none; flex: none; }
.clip:hover { text-decoration: none; filter: brightness(.8); }
h3.doc-gruppe { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: .7rem 0 .25rem; }
h3.doc-gruppe:first-of-type { margin-top: .2rem; }
.doc-liste { list-style: none; margin: 0; padding: 0; }
.doc-liste li { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; border-bottom: 1px solid #f0f2f4; font-size: .85rem; }
.doc-liste li a { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-liste li small { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-liste li .btn { flex: none; padding: 0 .4rem; }
details.doc-neu summary { margin: .7rem 0 .3rem; font-size: .85rem; }
.grid.hist td { padding: .15rem .3rem; font-size: .82rem; }
.grid.hist .btn { padding: 0 .4rem; }
/* Führerscheinkontrolle */
.fsk { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; font-size: .84rem; margin-top: .4rem;
  padding-top: .5rem; border-top: 1px solid var(--line); }
.fsk-neu { display: inline-flex; gap: .3rem; align-items: center; }
.fsk-neu input[type=date] { font-size: .78rem; padding: .1rem .25rem; width: 128px; }
.fs-zahlen { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.fs-zahlen .st { min-width: 0; padding: .1rem .5rem; }
.card.fs-karte { flex: none; }
.chip.fs.abgelaufen { color: var(--rot); background: var(--rot-l); }
/* Anmeldung: Auswahl 2FA / Passwort, Passwortregeln */
.wahl { display: flex; flex-direction: column; gap: .3rem; margin: .2rem 0 .8rem; }
.wahl label.check { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .45rem; font-weight: 500; }
.wahl label.check small { flex-basis: 100%; padding-left: 1.5rem; }
.pw-selbst { background: var(--bg); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .8rem; }
ul.pwregeln { list-style: none; margin: .2rem 0 .8rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .15rem .8rem; font-size: .82rem; }
ul.pwregeln li { color: var(--rot); }
ul.pwregeln li::before { content: "✘ "; font-weight: 700; }
ul.pwregeln li.ok { color: var(--ok); }
ul.pwregeln li.ok::before { content: "✔ "; }
.auth-box ul.pwregeln { grid-template-columns: 1fr 1fr; margin-top: -.3rem; }

/* ===== 2.0.2: Marke, Burgermenü, Handy ===== */
:root { --marke: #10263F; }
.top { background: var(--marke); }
body.auth { background: var(--marke); }
.brand { color: #fff; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand .mark { height: 38px; }
.brand > div { min-width: 0; }
.brand strong, .brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav a:hover { background: rgba(255,255,255,.1); }
.jahr select { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.jahr select option, .jahr select optgroup { background: var(--marke); }
.fest { display: flex; gap: .7rem; align-items: center; }
.burger { display: none; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  background: none; cursor: pointer; place-items: center; padding: 0; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: #fff;
  border-radius: 2px; position: relative; transition: transform .15s, background .15s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.top.offen .burger span { background: transparent; }
.top.offen .burger span::before { transform: translateY(6px) rotate(45deg); }
.top.offen .burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* breite Bildschirme: Menü steht direkt im Kopf */
@media (min-width: 1200px) {
  .menu { display: contents; }
}
/* schmaler: Menü klappt über den Burger auf */
@media (max-width: 1199.98px) {
  .top { gap: .6rem; padding: .5rem .9rem; }
  .brand { flex: 1; order: 0; }
  .fest { order: 1; }
  .burger { display: grid; order: 2; }
  .menu { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: .5rem; padding: .3rem 0 .5rem;
    max-height: calc(100vh - 64px); overflow-y: auto; }
  .top.offen .menu { display: flex; }
  .menu nav { flex-direction: column; gap: .1rem; }
  .menu nav a { padding: .7rem .8rem; font-size: 1rem; }
  .menu .tools { margin-left: 0; flex-wrap: wrap; gap: .8rem; padding-top: .7rem; border-top: 1px solid rgba(255,255,255,.15); }
  .menu .tools:empty { display: none; }
  .menu .jahr label { font-size: .9rem; }
}

/* Spalten passen sich an; nichts darf breiter als der Bildschirm werden */
.layout { grid-template-columns: minmax(0, 1fr); }
.cols { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.scrollbox { overflow-x: auto; }

@media (max-width: 700px) {
  :root { font-size: 15px; }
  main { padding: .9rem .7rem 4rem; }
  .card { padding: .85rem .8rem; }
  .card-head { flex-wrap: wrap; }
  h1 { font-size: 1.3rem; }
  .brand small { font-size: .7rem; }
  .fest .neu span { display: none; }
  .fest .neu { padding: .45rem .8rem; font-size: 1.1rem; }
  input, select, textarea { font-size: 16px; }  /* kein automatisches Zoomen auf iPhones */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .tiles.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: .6rem .75rem; }
  .tile b { font-size: 1.45rem; }
  .termin-liste li { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .faellig-liste li { grid-template-columns: 10px minmax(0, 1fr); }
  .faellig-liste li > :last-child { grid-column: 2; }
  .fields > label, .fields .wide { flex: 1 1 100%; }
  .fields input, .fields select { width: 100%; }
  .actions { flex-wrap: wrap; }

  /* Listen als Karten (Beschriftungen setzt app.js) */
  table.grid.karten, table.grid.karten tbody, table.grid.karten tfoot, table.grid.karten tr,
  table.grid.karten td { display: block; width: 100%; }
  table.grid.karten thead { display: none; }
  table.grid.karten tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: .5rem; padding: .45rem .7rem;
    background: #fff; }
  table.grid.karten tfoot tr { background: #f3f5f8; }
  table.grid.karten tr.abschnitt { border: 0; background: none; padding: .7rem 0 .2rem; margin: 0; }
  table.grid.karten td { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem;
    padding: .15rem 0; border: 0; text-align: right; min-height: 0; }
  table.grid.karten td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left;
    color: var(--ink-3); font-size: .78rem; font-weight: 600; }
  table.grid.karten td.kt { order: -1; display: block; text-align: left; font-size: 1.02rem; font-weight: 700;
    padding-bottom: .3rem; margin-bottom: .2rem; border-bottom: 1px solid #f0f2f4; }
  table.grid.karten td.kt::before { display: none; }
  table.grid.karten td.voll { display: block; text-align: left; }
  table.grid.karten td.leer, table.grid.karten tbody td.zero, table.grid.karten tr.click td.aktion { display: none; }
  table.grid.karten tr { display: flex; flex-direction: column; }
  table.grid.karten .chips { justify-content: flex-end; }
  table.grid.karten.narrow { min-width: 0; }
  .tablewrap.short { max-height: none; }
}

/* Anmeldung und Impressum mit Logo */
body.auth { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.auth-logo img { display: block; height: 150px; max-width: 100%; margin: 0 auto 1.3rem; }
.auth-logo.bohnevo img { height: 120px; }
.auth-fuss { color: #aeb8c2; font-size: .8rem; text-align: center; }
.auth-fuss a { color: #fff; }
.impressum h3 { margin: 1rem 0 .3rem; }
.impressum p { margin: 0 0 .4rem; line-height: 1.5; }
.ergaenzen { background: #fff4d6; color: #7a4b00; padding: 0 .3rem; border-radius: 4px; }
@media (max-width: 700px) {
  .auth-box { padding: 1.3rem 1.1rem 1.1rem; }
  .auth-logo img { height: 110px; margin-bottom: 1rem; }
  .auth-logo.bohnevo img { height: 90px; }
}
@media print { .burger, .fest { display: none !important; } }
.wappen-row form { min-width: 0; }
input[type=file] { max-width: 100%; }

/* ===== 2.2.0: Fahrzeuge im Einsatz, Besatzung, Einsatznotizen ===== */
.nur-einsatz, .only-einsatz-text { display: none; }
form[data-kat=einsatz] .nur-einsatz { display: block; }
form[data-kat=einsatz] .only-einsatz-text { display: inline; }
form[data-kat=einsatz] .not-einsatz-text { display: none; }
.fields label.notiz { flex: 1 1 100%; }
textarea { font: inherit; font-weight: 400; color: var(--ink); padding: .48rem .6rem; border: 1px solid #cfd5db; border-radius: 7px;
  background: #fff; width: 100%; resize: vertical; min-height: 6.5rem; line-height: 1.45; }
textarea:focus { outline: 2px solid #f1b5b5; border-color: var(--rot); }
.fz-liste { display: grid; gap: .4rem; }
.fz-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; border: 1px solid var(--line); border-radius: 8px;
  padding: .45rem .7rem; background: #fff; }
.fz-zeile.on { border-color: var(--ok); background: var(--ok-l); }
.fz-wahl { display: flex !important; flex-direction: row !important; align-items: center; gap: .5rem !important; cursor: pointer;
  flex: 0 0 19rem; min-width: 0; font-size: .92rem !important; color: var(--ink) !important; }
.fz-wahl input { width: 18px; height: 18px; accent-color: var(--ok); margin: 0; }
.fz-wahl small { color: var(--ink-3); font-weight: 500; }
.fz-crew { font-size: .76rem; font-weight: 600; color: var(--ok); }
.fz-zeiten { display: none; flex-wrap: wrap; gap: .4rem .8rem; }
.fz-zeile.on .fz-zeiten { display: flex; }
.fz-zeiten label { display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; font-weight: 600; color: var(--ink-2); }
.fz-zeiten input { padding: .2rem .35rem; font-size: .85rem; width: 7.2rem; }
/* Fahrzeug und Funktion bleiben innerhalb der Kachel: zwei Spalten, die schrumpfen dürfen */
.pitem { min-width: 0; }
.pitem .fz-det { display: none; flex-basis: 100%; min-width: 0; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: .25rem; padding-left: 1.6rem; margin-top: .15rem; }
form[data-kat=einsatz] .pitem.on .fz-det { display: grid; }
.pitem .fz-det select { width: 100%; min-width: 0; padding: .12rem .2rem; font-size: .76rem; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .fz-wahl { min-width: 0; flex: 1 1 100%; }
  .fz-zeiten { display: none; width: 100%; }
  .fz-zeile.on .fz-zeiten { display: grid; grid-template-columns: 1fr 1fr; }
  .fz-zeiten input { width: 100%; }
}
/* 2.2.1: Belegung je Fahrzeug */
.fz-crew.voll { color: #7a4b00; }
.fz-crew.ueber { color: var(--rot); }
.fz-warn { font-size: .78rem; font-weight: 700; color: var(--rot); }
.fz-warn:empty { display: none; }
.fz-zeile:has(.fz-warn:not(:empty)) { border-color: var(--rot); background: var(--rot-l); }
/* 2.2.1: Haupt-/Nebenbericht, Gäste */
.nur-neben { display: none !important; }
form[data-bericht=neben] .nur-neben { display: flex !important; }
form[data-bericht=neben] .nur-haupt { display: none !important; }
.berichtsart { margin-bottom: .4rem; }
.nur-einsatz-inline { display: none; }
form[data-kat=einsatz] .nur-einsatz-inline { display: inline-block; }
.gaeste { display: grid; gap: .35rem; margin-bottom: .5rem; }
.gast-zeile { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.6fr) auto auto auto; gap: .35rem; align-items: center; }
form:not([data-kat=einsatz]) .gast-zeile { grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.6fr) auto; }
.gast-zeile select { font-size: .85rem; padding: .3rem .35rem; }
@media (max-width: 700px) {
  .gast-zeile, form:not([data-kat=einsatz]) .gast-zeile { grid-template-columns: 1fr auto; }
  .gast-zeile [name=gast_info], .gast-zeile select { grid-column: 1 / -1; }
  .gast-zeile .btn { grid-row: 1; grid-column: 2; }
}
/* 2.2.5: Speichern-Leiste auf dem Handy einzeilig */
.nur-schmal { display: none; }
@media (max-width: 700px) {
  .actions.sticky { flex-wrap: nowrap; gap: .4rem; padding: .45rem 0; }
  .actions.sticky .btn { padding: .5rem .75rem; }
  .actions.sticky .nur-breit { display: none; }
  .actions.sticky .nur-schmal { display: inline; }
}
/* Verwaltung → Benutzer: Rechte-Raster (Bereiche × Wehren) */
.raster th, .raster td { vertical-align: middle; }
.raster td select { min-width: 8.5rem; width: 100%; }
.raster tr.vorlage td { background: var(--bg); }
.raster td:first-child { min-width: 12rem; }
#rechte-raster[hidden] { display: none; }
@media (max-width: 640px) {
  .raster td:first-child { min-width: 8rem; }
  .raster td:first-child small { display: none; }
}

/* ---- Webseite: Editor mit Werkzeugleiste (2.4.0) ---- */
.editor-leiste { position: relative; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 5px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg); margin-top: .3rem; }
.editor-leiste.klein { border-bottom: 1px solid var(--line); border-radius: 8px; margin-bottom: .3rem; width: max-content; }
.editor-leiste select { min-height: 32px; padding: 2px 6px; font-size: .9rem; width: auto; }
.editor-knopf { min-width: 34px; min-height: 32px; padding: 2px 8px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; line-height: 1; }
.editor-knopf:hover { background: #fff; border-color: var(--line); }
.editor-knopf.an { background: #fff; border-color: var(--ink-3); }
.editor-knopf:disabled { opacity: .4; cursor: default; }
.editor-trenner { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--line); }
.editor-a { font-weight: 700; border-bottom: 3px solid var(--rot); padding: 0 2px; }
.ea { display: inline-block; width: 16px; height: 12px; vertical-align: middle;
  background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
              linear-gradient(currentColor, currentColor) 0 50% / 70% 2px no-repeat,
              linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
.ea-c { background-position: 0 0, 50% 50%, 0 100%; }
.ea-r { background-position: 0 0, 100% 50%, 0 100%; }
.ea-j { background-size: 100% 2px, 100% 2px, 100% 2px; }
.editor-palette { position: absolute; z-index: 20; top: 100%; left: 50%; display: flex; gap: 6px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.editor-palette[hidden] { display: none; }
.editor-palette button { width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; outline: 1px solid var(--line); cursor: pointer; }
.editor { border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: .7rem .9rem; background: #fff; overflow: auto;
  resize: vertical; max-height: 70vh; line-height: 1.55; font-weight: 400; }
.editor:focus { outline: 2px solid var(--rot); outline-offset: -1px; }
.editor.leer::before { content: attr(data-platzhalter); color: var(--ink-3); pointer-events: none; }
.editor p { margin: 0 0 .8em; }
.editor h2 { font-size: 1.35rem; margin: .8em 0 .4em; }
.editor h3 { font-size: 1.15rem; margin: .8em 0 .4em; }
.editor h4 { font-size: 1rem; margin: .8em 0 .3em; }
.editor blockquote { margin: 0 0 .8em; padding-left: 1rem; border-left: 4px solid var(--line); color: var(--ink-2); }
.editor a { color: var(--rot); text-decoration: underline; }
textarea.editor-quelle { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; border-radius: 0 0 8px 8px; min-height: 14em; }

/* Bilder groß ansehen */
.web-zoom-huelle { position: relative; display: block; }
.web-zoom { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 6px;
  background: rgba(13, 27, 69, .75); color: #fff; font-size: 1.1rem; line-height: 1; cursor: zoom-in; }
.web-zoom:hover { background: rgba(13, 27, 69, .95); }
dialog.bild-gross { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
dialog.bild-gross::backdrop { background: rgba(10, 15, 30, .85); }
dialog.bild-gross img { display: block; max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; background: #111; }
.bild-gross-zu { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.3); }

/* ---- Webseite → Seiten: Listen-Einträge und Bildauswahl (2.5.0) ---- */
.liste-editor { display: flex; flex-direction: column; gap: .5rem; margin: .4rem 0 .6rem; }
.liste-eintrag { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.liste-eintrag > summary { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; cursor: pointer; list-style: none; }
.liste-eintrag > summary::-webkit-details-marker { display: none; }
.liste-eintrag > summary::before { content: "▸"; color: var(--ink-3); }
.liste-eintrag[open] > summary::before { content: "▾"; }
.liste-eintrag[open] > summary { border-bottom: 1px solid var(--line); background: var(--bg); border-radius: 8px 8px 0 0; }
.liste-titel { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-steuer { display: flex; gap: .3rem; }
.liste-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem .9rem; padding: .8rem; }
.liste-feld { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.liste-feld.breit { grid-column: 1 / -1; }
.liste-feld-name { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.liste-bild { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.liste-bild img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; background: #eef0f3; }
.liste-bilder-reihe { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .5rem; }
.liste-bilder-kachel { display: flex; flex-direction: column; gap: .3rem; border: 1px solid var(--line); border-radius: 8px; padding: .4rem; }
.liste-bilder-kachel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: #eef0f3; }
.liste-bilder-knoepfe { display: flex; gap: .3rem; }
.liste-bilder-knoepfe .danger { margin-left: auto; }
dialog.bildwahl { width: min(960px, 96vw); max-height: 90vh; border: 0; border-radius: 10px; padding: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.bildwahl::backdrop { background: rgba(10, 15, 30, .6); }
.bildwahl-kopf { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.bildwahl-bild { cursor: pointer; text-align: left; font: inherit; }
.bildwahl-bild:hover { border-color: var(--rot); }
