/* TTWW-App – schlichtes, mobiles Design ohne fremde Bibliotheken */
:root {
  --marke: #a3195b;
  --marke-dunkel: #7a1245;
  --akzent: #e8641a;
  --text: #1f1d21;
  --grau: #6b6870;
  --linie: #e4e0e6;
  --flaeche: #faf8fb;
  --weiss: #fff;
  --ok: #1d7a46;
  --fehler: #b3261e;
  --radius: 12px;
  font-size: 17px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--flaeche); line-height: 1.45; }
a { color: var(--marke); }
h1 { font-size: 1.5rem; margin: .4rem 0 1rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
small { color: var(--grau); display: block; font-size: .82rem; margin-top: .2rem; }

.kopf { background: var(--marke); color: var(--weiss); padding: .8rem 1rem; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ich { color: var(--weiss); text-decoration: none; display: flex; flex-direction: column; align-items: center; font-size: .75rem; line-height: 1.1; flex: none; }
.ich svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ich:hover span { text-decoration: underline; }
.marke { color: var(--weiss); text-decoration: none; display: flex; flex-direction: column; }
.marke-name { font-weight: 700; font-size: 1.15rem; }
.marke-zusatz { font-size: .82rem; opacity: .85; }

.adminnav { display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; background: var(--marke-dunkel); padding: .5rem 1rem; }
.adminnav a, .adminnav .link { color: #fde7f1; text-decoration: none; font-size: .92rem; }
.adminnav a:hover, .adminnav .link:hover { text-decoration: underline; }
.adminnav form { margin-left: auto; }

.inhalt { max-width: 860px; margin: 0 auto; padding: 1rem; }

.meldung { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.meldung.ok { background: #e6f4ec; color: var(--ok); }
.meldung.fehler { background: #fbe9e8; color: var(--fehler); }

/* Tage und Filter */
.tage { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(3.4rem, 1fr); gap: .35rem; overflow-x: auto; margin-bottom: .6rem; }
.tag { display: flex; flex-direction: column; align-items: center; padding: .4rem .2rem; border-radius: .8rem; background: var(--weiss); border: 1px solid var(--linie); color: var(--text); text-decoration: none; line-height: 1.15; }
.tag .wt { font-weight: 700; font-size: 1rem; }
.tag .dt { font-size: .78rem; }
.tag.aktiv { background: var(--marke); border-color: var(--marke); color: var(--weiss); }
.tagtitel { font-size: 1.2rem; color: var(--grau); font-weight: 600; }
.filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { --farbe: var(--grau); padding: .3rem .7rem; border-radius: 999px; border: 1.5px solid var(--farbe); color: var(--text); text-decoration: none; font-size: .85rem; background: var(--weiss); }
.chip.aktiv { background: var(--farbe); color: var(--weiss); }

/* Programmliste */
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.karte { --farbe: var(--grau); background: var(--weiss); border-radius: var(--radius); border-left: 6px solid var(--farbe); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.karte a { display: grid; gap: .1rem; padding: .75rem .9rem; color: var(--text); text-decoration: none; }
.karte .zeit { font-weight: 700; color: var(--farbe); font-size: .92rem; }
.karte .titel { font-weight: 600; font-size: 1.05rem; }
.karte .details { color: var(--grau); font-size: .9rem; }
.karte .kat { font-size: .78rem; color: var(--grau); }
.unsichtbar { opacity: .6; }
.hinweis { display: inline-block; font-size: .78rem; background: #fff3cd; color: #7a5b00; padding: .1rem .5rem; border-radius: 6px; }
.leer { color: var(--grau); font-style: italic; }

/* Detail */
.detail { --farbe: var(--marke); background: var(--weiss); border-radius: var(--radius); padding: 1.2rem; border-top: 6px solid var(--farbe); }
.detail .kat { color: var(--farbe); font-weight: 600; margin: 0; font-size: .9rem; }
.detail h1 { margin-top: .3rem; }
.eckdaten { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 1rem 0; }
.eckdaten dt { color: var(--grau); }
.eckdaten dd { margin: 0; font-weight: 600; }
.mitbringen { background: #fff3cd; padding: .7rem .9rem; border-radius: 8px; margin: 1rem 0; }
.detail section h2 { font-size: 1rem; color: var(--farbe); margin-bottom: .2rem; }
.detail section p { margin: .4rem 0; }

/* Knöpfe */
.knopf { display: inline-block; background: var(--marke); color: var(--weiss); border: 0; border-radius: 10px; padding: .6rem 1.1rem; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.knopf:hover { background: var(--marke-dunkel); }
.knopf.zweit { background: var(--weiss); color: var(--marke); border: 1.5px solid var(--marke); }
.knopf.gefahr { background: var(--fehler); }
.link { background: none; border: 0; padding: 0; color: var(--marke); cursor: pointer; font-size: .92rem; text-decoration: underline; }
.link.gefahr { color: var(--fehler); }

/* Formulare */
.formular { display: grid; gap: .8rem; }
.formular.schmal { max-width: 380px; }
.formular label { display: grid; gap: .25rem; font-weight: 600; font-size: .92rem; }
.formular input, .formular select, .formular textarea { font: inherit; font-weight: 400; padding: .55rem .65rem; border: 1px solid #cfc9d3; border-radius: 8px; background: var(--weiss); width: 100%; }
.formular input[type=color] { padding: .1rem; height: 2.4rem; width: 3.5rem; }
.formular textarea { resize: vertical; }
.formular .haken { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.formular .haken input { width: auto; }
.formular fieldset { border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem 1rem; background: var(--weiss); display: grid; gap: .8rem; }
.formular small { font-weight: 400; }
.formular .gruppe { display: grid; gap: .25rem; }
.formular .gruppe > strong { font-size: .92rem; }
.formular .rahmen { border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem 1rem; background: var(--weiss); display: grid; gap: .8rem; }
.formular legend { font-weight: 700; padding: 0 .3rem; }
.zeile { display: flex; flex-wrap: wrap; gap: .8rem; align-items: start; }
form.zeile { align-items: end; }
.zeile > label { flex: 1 1 180px; }
.zeile > label.breit { flex: 3 1 240px; }
.kategorie > label:first-of-type { flex: 0 0 auto; }
form.zeile { background: var(--weiss); padding: .7rem; border-radius: var(--radius); margin-bottom: .5rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.loeschen { margin-top: 2rem; }

/* Verwaltung */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.kachel { background: var(--weiss); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kachel .zahl { display: block; font-size: 1.8rem; font-weight: 700; color: var(--marke); }
.kasten { background: var(--weiss); border-radius: var(--radius); padding: .4rem 1rem 1rem; margin: 1rem 0; }
.tabelle { width: 100%; border-collapse: collapse; background: var(--weiss); border-radius: var(--radius); overflow: hidden; }
.tabelle th, .tabelle td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-size: .82rem; color: var(--grau); }
.tabelle .zeit { white-space: nowrap; font-weight: 600; width: 1%; }
.tabelle .aktionen { width: 1%; white-space: nowrap; }
.punkt { --farbe: var(--grau); display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--farbe); margin-right: .4rem; }
.klein { font-size: .85rem; color: var(--grau); }
.vorformatiert { white-space: pre-line; }
.warn { color: #9a6700; }
.etikett { display: inline-block; font-size: .78rem; background: #f4e3ec; color: var(--marke-dunkel); padding: .1rem .5rem; border-radius: 999px; margin: 0 .25rem .2rem 0; white-space: nowrap; }
.etikett.admin { background: var(--marke); color: var(--weiss); }
.umbruch { overflow-wrap: anywhere; }
.leitet { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.leitet a { font-weight: 600; }
.achtung { background: #fff1e6; border: 2px solid var(--akzent); border-radius: var(--radius); padding: .4rem 1rem 1rem; display: grid; gap: .5rem; }
.achtung h2 { color: #b34700; margin: .6rem 0 0; }
.achtung-kachel { background: #fff1e6; outline: 2px solid var(--akzent); }
.achtung-kachel .zahl { color: #b34700; }
.pruefen { background: #fff8db; border-left: 4px solid #d9a400; border-radius: var(--radius); padding: .4rem 1rem .8rem; }
.pruefen h2 { margin: .6rem 0 .2rem; }
.kasten > h2:first-child { margin-top: .6rem; }
.kasten > details { padding-top: .6rem; }
.leitung { display: grid; gap: .25rem; }
.leitung > label { font-weight: 600; font-size: .92rem; }
.leitung .gewaehlt { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.leitung .gewaehlt:empty { display: none; }
.leitung .gewaehlt li { background: #f4e3ec; color: var(--marke-dunkel); border-radius: 999px; padding: .25rem .3rem .25rem .75rem; display: inline-flex; align-items: center; gap: .2rem; }
.leitung .weg { border: 0; background: transparent; color: var(--marke-dunkel); cursor: pointer; font-size: .9rem; padding: .1rem .35rem; border-radius: 999px; }
.leitung .weg:hover { background: var(--marke); color: var(--weiss); }

@media (min-width: 700px) {
  :root { font-size: 16px; }
  .inhalt { padding: 1.5rem; }
}
