/* Look & Feel angelehnt an zinnowwaldschule.de: Raleway (Überschriften), Source Sans 3 (Text),
   Dunkelgrün, Salbei, Creme, Rot als Akzent. Schriften selbst gehostet (keine Google-Anfragen). */
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url(/fonts/raleway-700.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url(/fonts/source-sans-3-400.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url(/fonts/source-sans-3-700.woff2) format("woff2"); }

:root {
  --ink: #1e3918;        /* Text, Überschriften */
  --green: #274c24;      /* Buttons */
  --green-hover: #1e3918;
  --sage: #bdccba;       /* Kopfband */
  --sage-light: #d7dfd7; /* Boxen */
  --sage-soft: #eef2ee;
  --cream: #fcf0db;
  --gold: #ecbe6b;
  --red: #ba5858;
  --muted: #4f6249;
  --white: #ffffff;
  --radius: 7.5px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 17px/1.45 "Source Sans 3", Arial, sans-serif;
}

/* Kopfband mit schräger Kante wie auf der Schulseite */
.site-head { display: flex; align-items: stretch; min-height: 64px; margin: 16px 0 0; }
.site-head .brand {
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 28px 6px 16px; font-family: Raleway, Arial, sans-serif; font-weight: 700;
  line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; font-size: 1.05rem; white-space: nowrap;
}
.site-head .band { flex: 1; background: var(--sage); clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 22px 50%, 0 0); }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }
.hero { background: var(--sage-light); border-radius: var(--radius); padding: 22px 20px; margin: 16px 0 18px; }
h1, h2 { font-family: Raleway, Arial, sans-serif; font-weight: 700; color: var(--ink); }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 1.15rem; margin: 0; line-height: 1.25; }
p { margin: 0 0 10px; }
.hero .intro { font-size: 1.05rem; margin-bottom: 14px; }
.hero .hero-sub { font-size: 1rem; margin: 0 0 6px; }
.hero ul { margin: 0; padding-left: 20px; }
.hero li { margin-bottom: 6px; }
.hero li:last-child { margin-bottom: 0; }

.card { background: var(--white); border: 1px solid var(--sage-light); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.notice { background: var(--cream); border-color: var(--gold); }
.error { border-left: 4px solid var(--red); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.slot { display: grid; gap: 10px; }
.slot-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.slot-num { font-size: .8rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.dates { font-family: Raleway, Arial, sans-serif; font-weight: 700; font-size: 1.1rem; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: var(--sage-soft); color: var(--muted); white-space: nowrap; }
.badge.long { background: var(--cream); color: var(--ink); }
.bags { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bag { border-radius: var(--radius); padding: 8px 10px; background: var(--sage-light); min-height: 54px; }
.bag .label { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bag .who { font-weight: 700; overflow-wrap: anywhere; }
.bag.free { background: var(--white); border: 1.5px dashed var(--sage); }
.bag.free .who { color: var(--green); font-weight: 400; }
.bag.mine { background: var(--cream); outline: 2px solid var(--gold); }
.slot.past { opacity: .5; }
.handover { font-size: .9rem; color: var(--muted); }

button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: var(--radius); padding: 9px 24px 8px; cursor: pointer;
  background: var(--green); color: var(--white); text-decoration: none; display: inline-block; text-align: center;
  transition: background .15s;
}
button:hover { background: var(--green-hover); }
button.secondary { background: var(--white); color: var(--green); border: 1.5px solid var(--green); }
button.secondary:hover { background: var(--sage-soft); }
button.danger { background: var(--white); color: var(--red); border: 1.5px solid var(--red); }
button.danger:hover { background: #fbeeee; }
button.link { background: none; color: var(--green); padding: 4px 6px; text-decoration: underline; font-weight: 700; }
button.link:hover { background: none; color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.full { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input, select {
  font: inherit; width: 100%; padding: 9px 12px; border-radius: var(--radius); border: 1.5px solid var(--sage);
  background: var(--white); color: var(--ink);
}
label { display: block; font-weight: 700; margin-bottom: 6px; }

dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(440px, calc(100vw - 32px)); background: var(--white); color: var(--ink); }
dialog::backdrop { background: rgba(30, 57, 24, .45); }
dialog h2 { margin-bottom: 8px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.form-error { color: var(--red); font-weight: 700; margin-top: 8px; min-height: 1.2em; }

.progress { height: 8px; background: var(--sage-light); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--green); }

footer { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 28px; }

@media (min-width: 700px) {
  .site-head { margin-top: 24px; }
  .site-head .brand { padding-left: max(16px, calc((100vw - 760px) / 2 + 16px)); font-size: 1.2rem; }
  h1 { font-size: 2rem; }
}

@media print {
  .no-print, dialog, .site-head .band { display: none !important; }
  .card { break-inside: avoid; border-color: #bbb; }
}
