/* Privatanzeige – Frankenwald-Palette: Nebel, Fichte, Vereinsrot, Honig */
@font-face { font-family: "Bricolage"; src: url("/schrift/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --grund: #E7ECE7;
  --flaeche: #F7F9F6;
  --tinte: #12261E;
  --leise: #5A6D64;
  --linie: #D2DBD4;
  --fichte: #12302A;
  --rot: #B4121B;
  --honig: #A86C0A;
  --gruen: #1B7A4B;
  --schrift: "Bricolage", ui-rounded, system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --unten: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --grund: #0C1713; --flaeche: #14231D; --tinte: #E8EFE9; --leise: #8DA196; --linie: #23362E; --fichte: #0F2A24; --rot: #EF5A5F; --honig: #E2A93F; --gruen: #46C285; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--tinte); font: 16px/1.45 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--honig); outline-offset: 2px; border-radius: 6px; }

#app { max-width: 620px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 18px calc(96px + var(--unten)); min-height: 100dvh; }
.zahl { font-family: var(--schrift); font-variant-numeric: tabular-nums; }

/* ---- Kopf ---- */
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kopf h1 { font: 700 30px/1.05 var(--schrift); letter-spacing: -0.02em; }
.kopf p { color: var(--leise); font-size: 14px; margin-top: 4px; }
.zurueck { background: none; border: 0; padding: 6px 0; color: var(--leise); font-size: 15px; display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }

/* ---- Spieltag-Band: das eine laute Element ---- */
.band { --farbe: var(--fichte); position: relative; margin: 0 -18px 22px; padding: 22px 22px 24px; background: var(--farbe); color: #fff; overflow: hidden; }
.band::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(105deg, transparent 0 46px, rgba(255,255,255,.055) 46px 92px); pointer-events: none; }
.band > * { position: relative; z-index: 1; }
.band .oben { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; opacity: .9; }
.band h2 { font: 800 clamp(30px, 9vw, 44px)/1 var(--schrift); letter-spacing: -0.03em; margin: 12px 0 6px; text-wrap: balance; }
.band .unten { font-size: 15px; opacity: .92; }
.band .stand { font: 800 clamp(64px, 22vw, 104px)/.9 var(--schrift); letter-spacing: -0.04em; margin: 8px 0 4px; }
.live-punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #fff; margin-right: 7px; animation: puls 1.4s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .25; } }
@media (min-width: 656px) { .band { border-radius: 22px; margin-inline: 0; } }

/* ---- Abschnitte ---- */
.abschnitt { margin-bottom: 26px; }
.abschnitt > h2 { font: 700 19px/1.4 var(--schrift); padding-top: 3px; letter-spacing: -0.01em; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.abschnitt > h2 small { font: 400 13px var(--text); color: var(--leise); }
.blatt { background: var(--flaeche); border-radius: 18px; padding: 4px 16px; }
.blatt.eng { padding: 14px 16px; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); min-height: 52px; }
.zeile:last-child { border-bottom: 0; }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .haupt b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .haupt span { display: block; color: var(--leise); font-size: 13.5px; }
.zeile .rechts { text-align: right; font-size: 14px; color: var(--leise); white-space: nowrap; }
.zeile .rechts b { display: block; color: var(--tinte); font: 700 17px var(--schrift); }
.marke { width: 6px; align-self: stretch; border-radius: 3px; background: var(--farbe, var(--leise)); flex: none; margin: 2px 0; }
.leer { color: var(--leise); padding: 18px 0; font-size: 15px; }
.gut { color: var(--gruen); } .schlecht { color: var(--rot); } .mittel { color: var(--honig); }

/* ---- Hinweise ---- */
.hinweisband { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 16px; margin-bottom: 12px; background: var(--flaeche); border-left: 6px solid var(--farbe, var(--honig)); }
.hinweisband b { display: block; } .hinweisband span { font-size: 14px; color: var(--leise); }

/* ---- Wetter ---- */
.wetter { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; }
.wetter .temp { font: 800 64px/.9 var(--schrift); letter-spacing: -0.04em; }
.wetter .lage b { font: 700 20px var(--schrift); display: block; } .wetter .lage span { color: var(--leise); font-size: 14px; }
.tage { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.tage div { text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--grund); font-size: 13px; }
.tage b { display: block; font: 700 15px var(--schrift); margin-top: 2px; }
.tage i { font-style: normal; font-size: 20px; display: block; line-height: 1.3; }

/* ---- Schnellnachrichten ---- */
.schnell { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schnell button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 14px; min-height: 62px; border-radius: 16px; border: 0; background: var(--fichte); color: #F1F5F1; font-weight: 600; font-size: 15px; line-height: 1.2; transition: transform .08s; }
.schnell button:active { transform: scale(.97); }
.schnell button i { font-style: normal; font-size: 24px; }

/* ---- Auswahlleiste ---- */
.wahl { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 18px; padding: 2px 18px; scrollbar-width: none; }
.wahl::-webkit-scrollbar { display: none; }
.wahl button { flex: none; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--linie); background: transparent; font-weight: 600; font-size: 15px; white-space: nowrap; }
.wahl button[aria-pressed="true"] { background: var(--tinte); color: var(--grund); border-color: var(--tinte); }

/* ---- Tabellen ---- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: right; font-weight: 500; color: var(--leise); font-size: 12.5px; padding: 8px 4px; }
th:nth-child(2) { text-align: left; }
td { padding: 9px 4px; border-top: 1px solid var(--linie); text-align: right; font-variant-numeric: tabular-nums; }
td:first-child { width: 28px; color: var(--leise); } td:nth-child(2) { text-align: left; max-width: 0; width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.wir td { font-weight: 700; color: var(--tinte); background: color-mix(in srgb, var(--farbe, var(--rot)) 14%, transparent); }
tr.wir td:first-child { border-radius: 8px 0 0 8px; } tr.wir td:last-child { border-radius: 0 8px 8px 0; }
td.pkt { font: 700 15px var(--schrift); }
td.best { color: var(--gruen); font-weight: 700; }

/* ---- Müll ---- */
.tonnen { display: grid; gap: 10px; }
.tonne { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--flaeche); }
.tonne .koerper { width: 26px; height: 34px; border-radius: 5px 5px 7px 7px; background: var(--farbe); position: relative; flex: none; }
.tonne .koerper::before { content: ""; position: absolute; left: -3px; right: -3px; top: -5px; height: 6px; border-radius: 3px; background: var(--farbe); filter: brightness(.82); }
.tonne b { flex: 1; font-weight: 600; } .tonne .wann { text-align: right; } .tonne .wann b { font: 700 18px var(--schrift); display: block; } .tonne .wann span { font-size: 13px; color: var(--leise); }
.tonne.bald { outline: 2px solid var(--honig); }

/* ---- Geld ---- */
.summe { font: 800 44px/1 var(--schrift); letter-spacing: -0.03em; }
.verlauf { width: 100%; height: 76px; display: block; margin-top: 10px; }

/* ---- Nachrichten ---- */
.faden { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.blase { max-width: 84%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--flaeche); align-self: flex-start; }
.blase.ich { align-self: flex-end; background: var(--fichte); color: #F1F5F1; border-radius: 18px 18px 6px 18px; }
.blase.tor { align-self: center; background: var(--rot); color: #fff; border-radius: 18px; text-align: center; font-weight: 600; }
.blase small { display: block; font-size: 12px; opacity: .7; margin-bottom: 2px; }
.blase i { font-style: normal; margin-right: 6px; }
.schreiben { position: sticky; bottom: calc(84px + var(--unten)); background: var(--grund); padding-top: 10px; }
.schreiben form { display: flex; gap: 8px; }
.schreiben input[type=text] { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 999px; border: 1.5px solid var(--linie); background: var(--flaeche); }
.rund { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 0; background: var(--rot); color: #fff; display: grid; place-items: center; }
.rund svg { width: 22px; height: 22px; }

/* ---- Formulare ---- */
.feld { display: block; margin: 12px 0; }
.feld > span { display: block; font-size: 14px; color: var(--leise); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--linie); background: var(--flaeche); min-height: 48px; }
.blatt input[type=text], .blatt input[type=password], .blatt input[type=number], .blatt select { background: var(--grund); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--rot); color: #fff; font-weight: 700; font-size: 16px; }
.knopf.breit { width: 100%; } .knopf.still { background: transparent; color: var(--tinte); border: 1.5px solid var(--linie); } .knopf.klein { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.knopf:disabled { opacity: .5; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schalter { display: flex; align-items: center; gap: 12px; padding: 11px 0; min-height: 48px; border-bottom: 1px solid var(--linie); cursor: pointer; }
.schalter:last-child { border-bottom: 0; }
.schalter span { flex: 1; } .schalter small { display: block; color: var(--leise); font-size: 13px; }
.schalter input { position: absolute; opacity: 0; width: 0; height: 0; }
.schalter i { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--linie); position: relative; transition: background .15s; }
.schalter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.schalter input:checked + i { background: var(--gruen); } .schalter input:checked + i::after { transform: translateX(18px); }
.schalter input:focus-visible + i { outline: 3px solid var(--honig); outline-offset: 2px; }
.schalter input:disabled + i { opacity: .45; }
.depotzeile { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 6px; margin-bottom: 14px; }
.depotzeile input:first-child { grid-column: 1 / -1; font-weight: 600; }
.depotzeile input, .schnellzeile input { min-height: 44px; padding: 8px 10px; }
.schnellzeile { display: grid; grid-template-columns: 58px 1fr 40px; gap: 6px; margin-bottom: 6px; }
.weg { border: 0; background: none; color: var(--leise); font-size: 22px; }
.punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--leise); flex: none; } .punkt.an { background: var(--gruen); } .punkt.aus { background: var(--rot); }
.fest { position: sticky; bottom: calc(84px + var(--unten)); padding: 10px 0; background: linear-gradient(transparent, var(--grund) 30%); }
.klein-text { font-size: 13.5px; color: var(--leise); margin: 8px 0; }
.menue button { width: 100%; display: flex; align-items: center; gap: 14px; background: none; border: 0; border-bottom: 1px solid var(--linie); padding: 15px 0; text-align: left; min-height: 60px; }
.menue button:last-child { border-bottom: 0; }
.menue b { display: block; font-weight: 600; } .menue span span { display: block; color: var(--leise); font-size: 13.5px; }
.menue > button > span { flex: 1; } .menue svg { width: 22px; height: 22px; color: var(--leise); flex: none; }

/* ---- Anmeldung ---- */
.tor-seite { min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: center; }
.tor-seite h1 { font: 800 40px/1 var(--schrift); letter-spacing: -0.03em; margin-bottom: 8px; }
.tor-seite p { color: var(--leise); margin-bottom: 18px; }
.fehlertext { color: var(--rot); font-size: 14.5px; min-height: 22px; margin: 6px 0; }

/* ---- Leiste unten ---- */
#nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: color-mix(in srgb, var(--flaeche) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linie); padding: 6px max(8px, calc(50vw - 310px)) calc(6px + var(--unten)); display: grid; grid-template-columns: repeat(5, 1fr); }
#nav[hidden] { display: none; }
#nav button { position: relative; background: none; border: 0; padding: 7px 2px 5px; display: grid; justify-items: center; gap: 3px; font-size: 11.5px; color: var(--leise); border-radius: 12px; min-height: 54px; }
#nav svg { width: 24px; height: 24px; }
#nav button[aria-current="page"] { color: var(--rot); font-weight: 700; }
#nav .neu { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rot); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---- Kurzmeldung ---- */
#hinweis { position: fixed; left: 50%; bottom: calc(96px + var(--unten)); transform: translate(-50%, 20px); background: var(--tinte); color: var(--grund); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; max-width: min(90vw, 480px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; text-align: center; }
#hinweis.da { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

[hidden] { display: none !important; }
