/* Content-App von Roema Design. Handy zuerst. Apple-Weiss mit warmem Papier, ein Akzent (Tannengruen).
   Kontraste (WCAG, gerechnet): tinte auf grund 16,1:1 · leise auf grund 6,4:1 · leise auf flaeche 5,8:1 · hell auf akzent 9,9:1 · akzent auf grund 9,1:1 */
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/publicsans-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; src: url("fonts/publicsans-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --papier: #f7f5f0; --sand: #eeeae2; --anthrazit: #1d1d1f; --stein: #5c5850; --tanne: #2f4a3a; --creme: #fbfaf6;
  --grund: var(--papier); --flaeche: var(--sand); --tinte: var(--anthrazit); --leise: var(--stein); --akzent: var(--tanne); --hell: var(--creme);
  --linie: color-mix(in oklab, var(--tinte) 14%, transparent);
  --schatten: 0 1px 2px rgba(29, 29, 31, .06), 0 6px 18px rgba(29, 29, 31, .06);
  --r: 6px; --rand: 16px;
  --h1: clamp(2.5rem, 1.7rem + 3.6vw, 4.5rem); --h2: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); --h3: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem);
  --text: clamp(1.0625rem, 1.03rem + .18vw, 1.125rem); --klein: clamp(.875rem, .85rem + .1vw, .9375rem);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--tinte); font: 400 var(--text)/1.55 "Public Sans", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
h1, h2, h3 { font-family: "Bricolage", "Public Sans", sans-serif; font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: var(--h1); line-height: 1.04; font-weight: 500; }
h2 { font-size: var(--h2); line-height: 1.12; }
h3 { font-size: var(--h3); line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--grund) 94%, transparent); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 1120px; margin: 0 auto; padding: 8px var(--rand); display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.marke { font-family: "Bricolage", sans-serif; font-weight: 600; font-size: 1.375rem; text-decoration: none; letter-spacing: -.02em; }
.kopf-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.inhalt { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px var(--rand) 64px; outline: none; }
.fuss { text-align: center; padding: 24px var(--rand) 32px; font-size: var(--klein); color: var(--leise); }
.fuss a { text-decoration: none; }

/* Knoepfe: echte Knoepfe, mindestens 44 px */
.knopf { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r); border: 1px solid var(--akzent); background: var(--akzent); color: var(--hell); font: 500 1rem/1.2 "Public Sans", sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, opacity .2s ease; }
.knopf:active { transform: scale(.98); }
.knopf.zweit { background: transparent; color: var(--akzent); }
.knopf.leise { background: transparent; border-color: transparent; color: var(--tinte); padding: 10px 12px; }
.knopf.leise[aria-current="page"] { border-color: var(--linie); background: var(--hell); }
.knopf.breit { width: 100%; }
.knopf.gross { min-height: 56px; font-size: 1.0625rem; }
.knopf[disabled] { opacity: .5; cursor: default; }

/* Felder */
.feld { display: grid; gap: 6px; margin: 0 0 16px; }
.feld label, .etikett { font-size: var(--klein); color: var(--leise); font-weight: 500; }
.feld input, .feld select, .feld textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: 400 1.0625rem/1.4 "Public Sans", sans-serif; color: var(--tinte);
  background: var(--hell); border: 1px solid color-mix(in oklab, var(--tinte) 28%, transparent); border-radius: var(--r); }
.feld textarea { min-height: 96px; resize: vertical; }
.gross-schrift { text-transform: uppercase; letter-spacing: .04em; }
.meldung { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: var(--flaeche); font-size: var(--klein); }
.meldung.fehler { border-left: 3px solid #8a2b1f; }
.kicker { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); font-weight: 500; margin: 0 0 8px; }
.leise-text { color: var(--leise); font-size: var(--klein); }

/* Anmeldung */
.anmelden { max-width: 420px; margin: 4vh auto 0; }
.anmelden h1 { margin: 0 0 8px; }
.anmelden .satz { color: var(--leise); margin: 0 0 28px; }

/* Liste */
.kopfzeile { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.filter { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(-1 * var(--rand)) 20px; padding: 2px var(--rand); scrollbar-width: none; }
.filter::-webkit-scrollbar { display: none; }
.filter .knopf { flex: none; border-color: var(--linie); background: transparent; color: var(--tinte); }
.filter .knopf[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: var(--hell); }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.eintrag { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding: 10px; padding-right: 14px; background: var(--hell); border: 1px solid var(--linie);
  border-radius: var(--r); text-decoration: none; min-height: 112px; }
.eintrag .bild, .vorbild-bild { aspect-ratio: 9 / 16; background: var(--flaeche); border-radius: 4px; overflow: hidden; display: grid; place-items: center; color: var(--leise); font-size: .75rem; text-align: center; }
.eintrag .bild img, .vorbild-bild img { width: 100%; height: 100%; object-fit: cover; }
.eintrag h3 { margin: 4px 0 2px; }
.eintrag .zeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.marke-stand { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .8125rem; font-weight: 500; background: var(--flaeche); color: var(--tinte); }
.marke-stand.gedreht { background: color-mix(in oklab, var(--akzent) 14%, var(--hell)); }
.marke-stand.hochgeladen { background: var(--akzent); color: var(--hell); }
.leer { padding: 32px 20px; text-align: center; background: var(--hell); border: 1px dashed var(--linie); border-radius: var(--r); color: var(--leise); }

/* Einreichen */
.blatt { background: var(--hell); border: 1px solid var(--linie); border-radius: var(--r); padding: 20px 16px; margin: 0 0 24px; box-shadow: var(--schatten); }
.blatt h2 { margin: 0 0 16px; font-size: var(--h3); }
.arten { display: grid; gap: 8px; margin: 0 0 16px; max-height: 360px; overflow-y: auto; padding: 2px; }
.art { position: relative; display: block; padding: 12px 14px 12px 44px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--grund); cursor: pointer; min-height: 44px; }
.art input { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; accent-color: var(--akzent); }
.art strong { display: block; font-weight: 500; }
.art span { color: var(--leise); font-size: var(--klein); }
.art:has(input:checked) { border-color: var(--akzent); background: color-mix(in oklab, var(--akzent) 6%, var(--hell)); }

/* Karte */
.karte { display: grid; gap: 28px; }
.links-spalte { display: grid; gap: 28px; }
.vorbild { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.vorbild-text { display: grid; gap: 10px; }
.zitat { font-size: var(--klein); color: var(--leise); border-left: 2px solid var(--linie); padding-left: 12px; max-height: 9.5em; overflow: hidden; }
.skript { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--linie); }
.schritt { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--linie); }
.schritt .sek { font-family: "Bricolage", sans-serif; font-weight: 500; font-size: 1.25rem; line-height: 1.2; }
.schritt .sek small { display: block; font-family: "Public Sans", sans-serif; font-size: .8125rem; color: var(--leise); font-weight: 400; }
.schritt .einblendung { margin-top: 6px; display: inline-block; padding: 4px 10px; background: var(--flaeche); border-radius: 4px; font-weight: 500; }
.tipp { padding: 14px 16px; background: var(--flaeche); border-radius: var(--r); }
.stand-wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stand-wahl .knopf { padding: 10px 6px; background: transparent; color: var(--tinte); border-color: var(--linie); }
.stand-wahl .knopf[aria-pressed="true"] { background: var(--akzent); color: var(--hell); border-color: var(--akzent); }
.hochladen input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fortschritt { height: 6px; background: var(--flaeche); border-radius: 3px; overflow: hidden; margin: 10px 0 0; }
.fortschritt span { display: block; height: 100%; width: 100%; background: var(--akzent); transform: scaleX(0); transform-origin: left center; transition: transform .2s linear; }
.dateien { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.dateien li { aspect-ratio: 9 / 16; background: var(--flaeche); border-radius: 4px; overflow: hidden; position: relative; }
.dateien img, .dateien video { width: 100%; height: 100%; object-fit: cover; }
.dateien .quer { position: absolute; left: 4px; bottom: 4px; background: var(--hell); font-size: .75rem; padding: 2px 6px; border-radius: 4px; }
details.regeln { background: var(--hell); border: 1px solid var(--linie); border-radius: var(--r); padding: 0 16px; }
details.regeln summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
details.regeln ul { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 6px; }
.abschnitt { display: grid; gap: 14px; }

/* Verwaltung */
.tabelle { width: 100%; border-collapse: collapse; font-size: var(--klein); background: var(--hell); border: 1px solid var(--linie); border-radius: var(--r); overflow: hidden; }
.tabelle th, .tabelle td { text-align: left; padding: 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-weight: 500; color: var(--leise); }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle-rahmen { overflow-x: auto; margin: 0 0 28px; }

/* Bewegung: nur transform und opacity */
.auftauchen { animation: auf .6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes auf { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auftauchen { animation: none; } .knopf, .fortschritt span { transition: none; } }

@media (min-width: 768px) {
  :root { --rand: 32px; }
  .liste { grid-template-columns: repeat(2, 1fr); }
  .karte { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 48px; }
  .karte .links-spalte { position: sticky; top: 84px; }
  .vorbild { grid-template-columns: 160px 1fr; }
  .dateien { grid-template-columns: repeat(4, 1fr); }
  .blatt { padding: 28px; }
  .arten { grid-template-columns: repeat(2, 1fr); max-height: none; }
}
@media (min-width: 1200px) { .liste { grid-template-columns: repeat(3, 1fr); } }
