:root {
  --red: #d4121e; --red-d: #a50d16; --yellow: #ffd400; --green: #0a9b3c;
  --ink: #16120f; --muted: #5d554e; --paper: #faf6ef; --card: #fff; --line: #e6ddd0;
  --r: 14px; --head: "Bricolage Grotesque", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst überschreibt z. B. .whoami{display:flex} das hidden-Attribut */
html { scroll-behavior: smooth; scroll-padding-top: 68px; /* = Höhe der Kopfzeile (64px + 4px Farbband), sonst bleibt ein Streifen vom Titelbild sichtbar */ }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 "Source Sans 3", system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--red-d); }
.wrap { width: min(920px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* header: the club's tricolour as a thin band */
.top { position: sticky; top: 0; z-index: 5; background: rgba(250,246,239,.92); backdrop-filter: blur(8px);
  border-bottom: 4px solid; border-image: linear-gradient(90deg, var(--red) 0 33%, var(--yellow) 33% 66%, var(--green) 66%) 1; }
.top__row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 19px var(--head); }

/* füllt den ganzen Bildschirm unter der Kopfzeile (64px + 4px Farbband) */
.hero { position: relative; min-height: calc(100vh - 68px); min-height: calc(100svh - 68px); display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--ink); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,4,.15) 0%, rgba(10,6,4,.82) 78%); }
.hero__body { position: relative; z-index: 1; padding-block: 56px 100px; animation: rise .7s ease-out both; } /* unten Platz für den Pfeil */
h1 { font: 800 clamp(38px, 6.4vw, 72px)/1.02 var(--head); margin: 0 0 16px; max-width: 14ch; letter-spacing: -.02em; }
.hero__fact { font-size: 19px; max-width: 42ch; margin: 0 0 26px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }


/* Beim Runterscrollen: Bild zoomt leicht und wird dunkel, Text gleitet nach oben weg.
   Scroll-gesteuert per CSS; Browser ohne Unterstützung zeigen einfach das stehende Bild. */
@supports (animation-timeline: view()) {
  .hero { view-timeline: --hero block; }
  .hero__img { animation: hero-img-out linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
  .hero__body { animation: rise .7s ease-out both, hero-text-out linear both; animation-timeline: auto, --hero; animation-range: normal, exit 0% exit 70%; }
}
@keyframes hero-img-out { to { transform: scale(1.12); opacity: .15; filter: blur(3px); } }
@keyframes hero-text-out { to { transform: translateY(-90px); opacity: 0; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 2px solid transparent; font: 700 16px inherit; font-family: inherit; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-d); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--big { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn[disabled] { opacity: .6; cursor: progress; }

main { padding-block: 48px 72px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; margin: 0 0 24px; min-width: 0; }
legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font: 800 26px/1.2 var(--head); margin-bottom: 14px; padding: 0; }
legend + * { clear: both; }
.num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; font-size: 18px; flex: none; }
h2 { font: 800 30px/1.15 var(--head); margin: 14px 0 8px; }
h3 { font: 700 19px var(--head); margin: 28px 0 4px; }
.hint { color: var(--muted); margin: 0 0 16px; }

.field { margin-bottom: 16px; }
.field.narrow { max-width: 420px; }
label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: .9em; }
input:not([type=radio]):not([type=checkbox]), textarea { width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
input:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(255,212,0,.6); }
input[readonly] { background: var(--paper); }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.phase { display: grid; grid-template-columns: 200px 1fr; gap: 0 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
[aria-invalid=true] { border-color: var(--red) !important; }
.error { color: var(--red-d); font-weight: 600; font-size: 15px; margin: 6px 0 0; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tools__gap { flex: 1; }
.tool { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line);
  background: #fff; font: 600 15px inherit; font-family: inherit; cursor: pointer; }
.tool i { width: 14px; height: 14px; border-radius: 50%; }
.tool.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 560px; margin-inline: auto; background: #fff; }
.plan canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.swatches button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 600; font-size: 15px; color: inherit; cursor: pointer; }
.swatches button::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.15); }
.swatches button:hover, .tool:hover { border-color: var(--ink); }
.swatches button[aria-checked="true"], .wheel.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--yellow); }
.wheel { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; margin: 0; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.wheel:hover { border-color: var(--ink); }
.wheel input[type=color] { width: 30px; min-height: 0; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.picked { font-weight: 600; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; gap: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; margin: 0; }
.seg label:has(:checked) { border-color: var(--ink); background: var(--yellow); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin-top: 18px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--red); }

.card--note { background: var(--ink); color: #fff; border: 0; }
.card--note .num { background: var(--yellow); color: var(--ink); }
.dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dates li { display: grid; grid-template-columns: 140px 170px 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.15); }
.dates span { color: var(--yellow); font-weight: 700; }
.dates em { font-style: normal; color: #d8d0c6; }

.submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.status { margin: 0; font-weight: 600; }
.status.bad { color: var(--red-d); }
.done { text-align: center; padding: 48px 28px; }
.done img { margin: 0 auto; }

.foot { border-top: 1px solid var(--line); padding-block: 28px; }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0; }

@media (max-width: 720px) {
  .card { padding: 20px 16px; }
  .grid2, .phase { grid-template-columns: 1fr; }
  .dates li { grid-template-columns: 1fr; gap: 2px; }
  .tools__gap { display: none; }
  .btn--big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  /* Titelbild trotzdem beim Scrollen ausblenden, aber nur per Deckkraft: kein Zoom, keine Bewegung */
  @supports (animation-timeline: view()) {
    .hero__img, .hero__body { animation: hero-fade linear both !important; animation-timeline: --hero !important; animation-range: exit 0% exit 90% !important; }
  }
}
@keyframes hero-fade { to { opacity: 0; } }

/* ---------- Login, Gruppen-Kopf, Hinweise ---------- */
.login { max-width: 460px; width: 100%; margin-inline: auto; }
.login h2 { margin: 0 0 16px; }
/* Ohne Login: Anmeldung bekommt einen eigenen Bildschirm und steht mittig, wenn das Titelbild weggescrollt ist */
main:has(> #login:not([hidden])) { min-height: calc(100svh - 68px); display: grid; align-content: center; }
@media (min-width: 900px) {
  .login { max-width: 560px; padding: 48px 52px; border-radius: 20px; box-shadow: 0 24px 60px -30px rgba(22,18,15,.35); }
  .login h2 { font-size: 44px; margin-bottom: 28px; }
  .login label { font-size: 18px; }
  .login input { min-height: 56px !important; font-size: 18px; padding-inline: 16px !important; }
  .login .field { margin-bottom: 22px; }
  .login .btn { width: 100%; min-height: 58px; font-size: 18px; margin-top: 6px; }
}
.whoami { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 6px solid var(--green); }
.whoami p { margin: 0; }
.whoami__group { font: 800 24px/1.2 var(--head); }
.notice { background: var(--yellow); border-radius: var(--r); padding: 16px 20px; font-weight: 600; margin: 0 0 24px; }
fieldset[disabled] { opacity: .75; }
select { width: 100%; font: inherit; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; }

/* ---------- Verwaltung ---------- */
.admin { padding-top: 32px; }
.admin__title { color: var(--ink); font-size: clamp(32px, 5vw, 48px); max-width: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 700 15px inherit; font-family: inherit; cursor: pointer; }
.tabs button:hover { border-color: var(--ink); }
.tabs [aria-selected=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.actions { text-align: right; white-space: nowrap; }
.actions .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.danger { color: var(--red-d); }
.danger:hover { border-color: var(--red); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.pill--ok { background: #e3f5e9; border-color: #a9dcb9; color: #075f26; }
.switch { display: flex; align-items: center; gap: 12px; font: 700 20px var(--head); cursor: pointer; }
.switch input { width: 24px; height: 24px; accent-color: var(--green); }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.asset__img { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); display: grid; place-items: center; overflow: hidden; }
.asset__img img { max-height: 100%; object-fit: contain; }
.asset p { margin: 10px 0; }
.asset .btn { min-height: 40px; font-size: 14px; }

.dlg { width: min(1000px, 100% - 32px); max-height: 92vh; border: 0; border-radius: var(--r); padding: 0; background: var(--paper); }
.dlg::backdrop { background: rgba(22,18,15,.55); }
.dlg__head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.dlg__head h2 { margin: 0; }
#dlg-body { padding: 20px 24px 24px; }
/* Abgabe ansehen: Abschnitte wie im Formular, Frage klein darüber, Antwort groß */
.sub__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; color: var(--muted); }
.sub__meta p { margin: 0; }
.sub__sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 14px; }
.sub__sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 800 20px/1.2 var(--head); }
.sub__sec .num { width: 28px; height: 28px; font-size: 14px; }
.ans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.ans--wide { grid-column: 1 / -1; }
.ans__q { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ans__a { font-size: 17px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ans__none { color: var(--muted); font-style: italic; font-size: 15px; }
.ans__list { margin: 0; padding-left: 1.6em; columns: 2 220px; column-gap: 28px; white-space: normal; }
.ans__files { margin: 0; padding-left: 1.2em; white-space: normal; }
.sub__plan img { display: block; max-width: 100%; width: auto; max-height: 62vh; border: 1px solid var(--line); border-radius: 8px; }
.sub__foot { margin: 8px 0 0; text-align: right; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
.dl dt { font-weight: 700; }
.dl dd { margin: 0; white-space: pre-line; }
.creds code { font-size: 20px; background: var(--paper); padding: 2px 8px; border-radius: 6px; }

@media (max-width: 720px) {
  .dl, .ans-grid { grid-template-columns: 1fr; }
  #dlg-body, .dlg__head { padding-inline: 16px; }
  .sub__sec { padding: 16px; }
  .dl dd { margin-bottom: 8px; }
  .actions { white-space: normal; }
}
@media print {
  body * { visibility: hidden; }
  .dlg, .dlg * { visibility: visible; }
  .dlg { position: absolute; inset: 0; width: 100%; max-height: none; }
  .dlg .btn { display: none; }
  .dlg__head { position: static; }
  .sub__sec { break-inside: avoid; }
}

/* ---------- Formular aus der Definition ---------- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.fields > .field { grid-column: 1 / -1; }
.fields > .field.half { grid-column: auto; }
.info { background: var(--paper); border-left: 4px solid var(--yellow); border-radius: 8px; padding: 14px 16px; line-height: 1.7; }
@media (max-width: 720px) { .fields > .field.half { grid-column: 1 / -1; } }

/* ---------- Formular-Editor ---------- */
@media (min-width: 900px) { .editor-bar { position: sticky; top: 72px; z-index: 3; } }
.editor-bar .hint { margin-bottom: 12px; }
.editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ed-section > label, .ed-field > label { display: block; font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.ed-section > label input, .ed-section > label textarea, .ed-field > label input, .ed-field > label textarea { margin-top: 4px; font-weight: 400; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ed-row > select { width: auto; flex: 1 1 220px; }
.ed-title { flex: 1 1 240px; font: 800 22px var(--head) !important; }
.ed-move { display: inline-flex; gap: 6px; margin-left: auto; }
.ed-move .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.ed-field { border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 10px; padding: 14px; margin: 14px 0; background: var(--paper); }
.ed-flags { margin-top: 10px; }
.ed-flags .check { margin: 0; font-size: 15px; }
.ed-cond { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.ed-cond select { width: auto; min-height: 38px; }

#hero-cta { margin-top: 12px; } /* Abstand zur Überschrift, auch wenn kein Text dazwischen steht */
.abgaben-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.abgaben-head .hint { margin: 0; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: 8px; vertical-align: -3px; border: 1px solid rgba(0,0,0,.2); }
/* Farbrad rund; solange keine eigene Farbe gewählt ist, als Regenbogen */
.wheel input::-webkit-color-swatch-wrapper { padding: 0; }
.wheel input::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.15); border-radius: 50%; }
.wheel input::-moz-color-swatch { border: 1px solid rgba(0,0,0,.15); border-radius: 50%; }
.wheel:not(.is-on) input::-webkit-color-swatch { background-image: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.wheel:not(.is-on) input::-moz-color-swatch { background-image: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.ans__plan { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-start; white-space: normal; }
.ans__plan .legend { flex-direction: column; margin: 0 0 10px; font-size: 16px; }
