@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
[hidden] { display: none !important; }
:root {
  --bg: #fafafa; --fl: #ffffff; --rand: #e4e4e7; --text: #18181b; --muted: #52525b;
  --blau: #0562e6; --tint: #eef4fe; --grau: #f4f4f5; --gut: #15803d; --schlecht: #b91c1c;
  --r: 10px; --rf: 6px; --sh: 0 1px 2px rgba(24,24,27,.04), 0 2px 8px rgba(24,24,27,.04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 "Public Sans", system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 28px; font-weight: 650; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
a { color: inherit; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.small { font-size: 12px; color: var(--muted); }
.ic { flex: none; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--rf); border: 1px solid var(--rand); background: var(--fl); color: var(--text); font: 500 14px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--grau); }
.btn.primary { background: var(--blau); border-color: var(--blau); color: #fff; }
.btn.primary:hover { background: #0454c7; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--grau); }
.btn.icon { width: 44px; padding: 0; }
.btn.on-gut { background: #ecfdf3; border-color: #bbf7d0; color: var(--gut); }
.btn.on-schlecht { background: #fef2f2; border-color: #fecaca; color: var(--schlecht); }

input, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--fl); border: 1px solid var(--rand); border-radius: var(--rf); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 88px; resize: vertical; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }

/* Login */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 380px; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); box-shadow: var(--sh); padding: 32px 24px; display: grid; gap: 12px; }
.login-box form { display: grid; gap: 8px; margin-top: 8px; }
.err { color: var(--schlecht); font-size: 14px; min-height: 20px; margin: 0; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 20; background: rgba(250,250,250,.97); border-bottom: 1px solid var(--rand); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 8px; min-height: 60px; }
.top-in .titel { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 96px; display: grid; gap: 24px; }
.kopf { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.kopf > div { display: grid; gap: 4px; }

/* Karten */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.karte { background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.karte:hover { border-color: #d4d4d8; }
.karte .bild { aspect-ratio: 16 / 10; background: var(--grau); overflow: hidden; }
.karte .bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.karte .info { padding: 14px 16px 16px; display: grid; gap: 8px; }
.karte .zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.karte h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--tint); color: #0346a8; }
.badge.grau { background: var(--grau); color: var(--muted); }
.meta { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta .gut { color: var(--gut); }
.meta .schlecht { color: var(--schlecht); }
.meta .ic { width: 16px; height: 16px; }
.leer { padding: 32px; text-align: center; color: var(--muted); background: var(--fl); border: 1px dashed var(--rand); border-radius: var(--r); }

/* Bottom-Navigation */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; background: var(--fl); border-top: 1px solid var(--rand); padding-bottom: env(safe-area-inset-bottom); }
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font-size: 12px; color: var(--muted); text-decoration: none; }
.bnav a.aktiv { color: var(--blau); background: var(--tint); }
@media (min-width: 900px) { .bnav { display: none; } .wrap { padding-bottom: 48px; } }

/* Bewerten */
.stapel-wrap { max-width: 560px; margin: 0 auto; width: 100%; display: grid; gap: 16px; }
.fortschritt { font-size: 14px; color: var(--muted); text-align: center; }
.stapel { position: relative; aspect-ratio: 4 / 4.2; width: 100%; }
.sk { position: absolute; inset: 0; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); box-shadow: 0 4px 16px rgba(24,24,27,.06); overflow: hidden; display: flex; flex-direction: column; touch-action: none; user-select: none; }
.sk.hinten { transform: scale(.96) translateY(10px); opacity: .7; }
.sk .bild { flex: 1; min-height: 0; background: var(--grau); }
.sk .bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; pointer-events: none; }
.sk .info { padding: 14px 16px; display: flex; align-items: center; gap: 8px; }
.sk .info h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk .stempel { position: absolute; top: 20px; padding: 6px 12px; border: 2px solid; border-radius: 6px; font-weight: 700; font-size: 20px; background: #fff; opacity: 0; }
.sk .stempel.ja { left: 20px; color: var(--gut); }
.sk .stempel.nein { right: 20px; color: var(--schlecht); }
.knoepfe { display: flex; justify-content: center; align-items: center; gap: 20px; }
.rund { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--rand); background: var(--fl); display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh); color: var(--text); }
.rund.klein { width: 52px; height: 52px; color: var(--muted); }
.rund.nein { color: var(--schlecht); }
.rund.ja { color: var(--gut); }
.rund:hover { background: var(--grau); }
.rund .ic { width: 26px; height: 26px; }
.notizbox { background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.zusammen { display: grid; gap: 12px; text-align: center; justify-items: center; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); padding: 32px 20px; }

/* Detail */
.detail { max-width: 1440px; margin: 0 auto; padding: 16px 16px 96px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .detail { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; padding-bottom: 48px; } .seite-liste { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; } }
.seitenbild { position: relative; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); overflow: hidden; cursor: crosshair; }
.seitenbild img { width: 100%; display: block; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; background: var(--blau); color: #fff; border: 2px solid #fff; font: 600 12px/1 inherit; font-family: inherit; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); padding: 0; }
.pin::after { content: ""; position: absolute; inset: -8px; }
.pin.neu { background: #18181b; }
.pin.erledigt { background: #a1a1aa; }
.pinform { position: absolute; z-index: 5; width: min(300px, calc(100% - 16px)); background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); box-shadow: 0 8px 24px rgba(24,24,27,.12); padding: 12px; display: grid; gap: 8px; cursor: default; }
.seite-liste { background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; align-content: start; }
.seite-liste summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.nliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nliste li { border: 1px solid var(--rand); border-radius: var(--rf); padding: 10px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.nliste li.hl { background: var(--tint); }
.nliste li.erl .ntext { color: var(--muted); text-decoration: line-through; }
.nr { width: 24px; height: 24px; border-radius: 50%; background: var(--grau); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.nr.p { background: var(--blau); color: #fff; }
.ntext { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; min-height: 44px; margin: 0; }
.chk input { width: 20px; height: 20px; min-height: 0; }
.leiste-aktionen { display: flex; gap: 4px; align-items: center; }
.spalte { display: grid; gap: 12px; align-content: start; }
.bewertung { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); padding: 12px 16px; }
.bewertung .frage { font-weight: 600; font-size: 15px; }
.bewertung .leiste-aktionen { gap: 8px; flex-wrap: wrap; }
.hinweis { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 14px; border-radius: var(--r); background: var(--tint); color: #0346a8; font-size: 14px; }
.hinweis .ic { width: 18px; height: 18px; margin-top: 1px; }
.kopf .muted { max-width: 60ch; }
@media (max-width: 640px) { .nurgross { display: none; } }

/* Admin */
.suche { position: relative; width: 100%; max-width: 360px; }
.suche .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.suche input { padding-left: 40px; }
.inbox { list-style: none; margin: 0; padding: 0; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); }
.inbox li + li { border-top: 1px solid var(--rand); }
.inbox a { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; align-items: flex-start; min-height: 44px; }
.inbox a:hover { background: var(--grau); }
.inbox .t { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 14px; }
.inbox .t span:first-child { overflow-wrap: anywhere; }
.abschnitt { display: grid; gap: 12px; }
.werkzeuge { list-style: none; margin: 0; padding: 0; background: var(--fl); border: 1px solid var(--rand); border-radius: var(--r); }
.werkzeuge li { display: flex; gap: 12px; align-items: center; padding: 8px 16px; font-size: 14px; flex-wrap: wrap; }
.werkzeuge li + li { border-top: 1px solid var(--rand); }
.werkzeuge .n { flex: 1; min-width: 140px; font-weight: 500; }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: #18181b; color: #fff; padding: 10px 16px; border-radius: var(--rf); font-size: 14px; z-index: 50; }
