/* Farben hier anpassen */
:root {
  --accent: #7a2e3a;        /* Hauptfarbe (Kopfzeile, Buttons) */
  --accent-ink: #fff;
  --bg: #f6f3ee;
  --card: #fff;
  --ink: #2a2522;
  --muted: #6d655e;
  --line: #e2dcd3;
  --free: #d9f0dc;  --free-ink: #1d6b2a;
  --req: #fdf0c8;   --req-ink: #8a6100;
  --booked: #f6d6d3; --booked-ink: #9b2c22;
  --blocked: #e6e3df; --blocked-ink: #6d655e;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }

header.site { background: var(--accent); color: var(--accent-ink); padding: 18px 0; }
header.site .brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 14px; }
header.site .brand-text { display: flex; flex-direction: column; }
header.site.hero { background-size: cover; background-position: center 35%; min-height: 260px; display: flex; align-items: flex-end; padding-bottom: 22px; }
header.site.hero .wrap { width: 100%; }
header.site.hero .title { font-size: 1.8rem; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
header.site.hero .org { font-size: 1rem; opacity: 1; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
@media (max-width: 640px) { header.site.hero { min-height: 180px; } header.site.hero .title { font-size: 1.3rem; } }
header.site .logo { height: 60px; width: auto; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
header.site .org { font-size: .85rem; opacity: .85; letter-spacing: .03em; }
header.site .title { font-size: 1.35rem; font-weight: 650; }
main.wrap { padding-top: 24px; padding-bottom: 40px; }
footer.site { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: .9rem; }

h1 { font-size: 1.6rem; margin: .2em 0 .4em; }
h2 { font-size: 1.3rem; margin: .2em 0 .6em; }
h3 { font-size: 1rem; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.lead { font-size: 1.05rem; max-width: 60em; }
.small, small { font-size: .85rem; color: var(--muted); }
.meta { color: var(--muted); font-size: .95rem; }

/* Reiter */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; align-items: center; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 500; }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs .logout { margin-left: auto; }
.badge { background: #d4380d; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .8rem; margin-left: 4px; }
.tabs a.active .badge { background: #fff; color: var(--accent); }

.ex-info { background: var(--card); border-radius: var(--radius); padding: 16px 20px; border: 1px solid var(--line); }

/* Legende */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 6px; font-size: .9rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.legend i.free { background: var(--free); border: 1px solid var(--free-ink); }
.legend i.requested { background: var(--req); border: 1px solid var(--req-ink); }
.legend i.booked { background: var(--booked); border: 1px solid var(--booked-ink); }
.legend i.blocked { background: var(--blocked); border: 1px solid var(--blocked-ink); }
.free-count { font-weight: 600; }

/* Wochen-Schnellauswahl */
.week-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.week-nav a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; text-decoration: none;
  background: var(--free); color: var(--free-ink); border: 1px solid transparent; line-height: 1.3; }
.week-nav a:hover { border-color: var(--free-ink); }
.week-nav a span { font-size: .85rem; color: var(--ink); }
.week-nav a em { font-style: normal; font-size: .8rem; font-weight: 600; }
.week-nav a.full { background: var(--blocked); color: var(--blocked-ink); }

/* Kalender */
.week { margin: 18px 0 26px; scroll-margin-top: 12px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cal { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; min-width: 420px; }
table.cal th { font-weight: 600; font-size: .9rem; padding: 4px; text-align: center; }
table.cal th span { font-weight: 400; color: var(--muted); font-size: .8rem; }
table.cal th.time-col { width: 74px; text-align: right; padding-right: 8px; }
table.cal td { text-align: center; border-radius: 8px; height: 52px; font-size: .9rem; padding: 4px; vertical-align: middle; }
table.cal td.free { background: var(--free); padding: 0; }
table.cal td.free a { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 52px;
  color: var(--free-ink); font-weight: 650; text-decoration: none; border-radius: 8px; border: 2px solid transparent; }
table.cal td.free a:hover, table.cal td.free a:focus { border-color: var(--free-ink); background: #c4e8c9; }
table.cal td.requested { background: var(--req); color: var(--req-ink); }
table.cal td.booked { background: var(--booked); color: var(--booked-ink); }
table.cal td.blocked { background: repeating-linear-gradient(45deg, var(--blocked), var(--blocked) 6px, #efece8 6px, #efece8 12px);
  color: var(--blocked-ink); font-size: .8rem; }
table.cal td.closed, table.cal td.none { background: #efebe5; color: #b3aaa0; }

/* Admin-Kalender */
table.admin-cal td { height: auto; min-height: 60px; vertical-align: top; text-align: left; font-size: .8rem; }
table.admin-cal td.free { padding: 4px; }
table.admin-cal .entry { display: block; padding: 3px 5px; margin-bottom: 3px; border-radius: 5px; text-decoration: none;
  color: var(--ink); background: rgba(255,255,255,.7); line-height: 1.25; }
table.admin-cal .entry small { font-size: .75rem; }
table.admin-cal form { margin: 0; display: inline; }
table.admin-cal .blk { display: block; }
code { background: #efebe5; padding: 0 4px; border-radius: 4px; }
table.admin-cal td.free a.small { color: var(--free-ink); display: inline-block; margin-right: 6px; }

/* Karten & Formulare */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; }
.card.narrow { max-width: 380px; margin: 40px auto; }
.form-card { max-width: 760px; }
.slot-pick { background: var(--free); color: var(--free-ink); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit;
  border: 1px solid #cfc7bc; border-radius: 7px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2 .full { grid-column: 1 / -1; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; }
label.check.inline { display: inline-flex; margin-right: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 7px; margin: 0 0 12px; padding: 8px 12px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 10px 0; }
.inline-form label { margin: 0; }
.inline-form input, .inline-form select { width: auto; }

.btn { display: inline-block; padding: 9px 16px; border-radius: 7px; border: 1px solid #cfc7bc; background: #fff;
  color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f3efe9; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ok { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.btn.danger { background: #fff; border-color: #c0392b; color: #c0392b; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
button.link.small { font-size: .78rem; color: var(--muted); }
button.link.danger { color: #c0392b; margin-top: 10px; }

.flash { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; background: var(--free); color: var(--free-ink); }
.flash.err { background: var(--booked); color: var(--booked-ink); }
.flash.warn { background: var(--req); color: var(--req-ink); }
.flash ul { margin: 0; padding-left: 18px; }

/* Buchungskarten */
.booking-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.booking dl { display: grid; grid-template-columns: 110px 1fr; gap: 2px 12px; margin: 0 0 10px; font-size: .95rem; }
.booking dt { color: var(--muted); }
.booking dd { margin: 0; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; margin-right: 6px; }
.pill.pending { background: var(--req); color: var(--req-ink); }
.pill.confirmed { background: var(--free); color: var(--free-ink); }
.pill.declined, .pill.cancelled { background: var(--blocked); color: var(--blocked-ink); }
details.actions summary { list-style: none; display: inline-block; }
details.actions summary::-webkit-details-marker { display: none; }
.status-form { margin-top: 12px; max-width: 520px; }
details.card summary { cursor: pointer; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; min-width: 640px; }
table.list th, table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; vertical-align: top; }
table.list th { background: #efebe5; font-weight: 600; }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  header.site .title { font-size: 1.15rem; }
  table.cal { min-width: 0; border-spacing: 3px; }
  table.cal th.time-col { width: 44px; padding-right: 4px; font-size: .8rem; }
  table.cal th.time-col span { display: none; }
  table.cal td { font-size: .78rem; height: 46px; padding: 2px; overflow-wrap: anywhere; hyphens: auto; }
  table.cal td.free a { min-height: 46px; }
  table.admin-cal { min-width: 640px; }
  .booking dl { grid-template-columns: 1fr; }
  .booking dt { margin-top: 6px; }
}
@media print {
  header.site, footer.site, .tabs, .legend, form, details { display: none !important; }
  body { background: #fff; }
}
th .limit { color: #9b2c22 !important; font-weight: 600; }
.limit-form { margin: 2px 0 0; }
.limit-form label { display: block; font-size: .75rem; font-weight: 400; margin: 0; color: var(--muted); white-space: nowrap; }
.limit-form label.on { color: #9b2c22; font-weight: 600; }
.limit-form select { display: inline-block; width: auto; padding: 1px 2px; font-size: .75rem; margin: 0; }
.price { background: #fdf6e3; border-left: 4px solid var(--req-ink); padding: 8px 12px; border-radius: 6px; font-size: .95rem; }
@media (max-width: 640px) {
  header.site .logo { height: 44px; }
}
.note { background: #eef4fb; border-left: 4px solid #3a6ea5; padding: 8px 12px; border-radius: 6px; font-size: .95rem; }
table.cal th .slot-label { font-weight: 600; color: var(--ink); font-size: .85rem; }
pre.mail { white-space: pre-wrap; font: .9rem/1.45 ui-monospace, monospace; background: #faf8f5; padding: 12px; border-radius: 6px; margin: 10px 0 0; }

/* ---------- Anmeldung Gemeindefreizeit ---------- */
.event .meta { font-size: 1.05rem; color: var(--ink); }
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.price-cards div { background: var(--bg); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.price-cards span { font-size: .85rem; color: var(--muted); }
.price-cards b { font-size: 1.4rem; color: var(--accent); }
.progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.progress .bar { flex: 1 1 200px; height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--accent); }
.event + .card { margin-top: 18px; }
fieldset legend { font-weight: 650; padding: 0 6px; }
fieldset { padding-bottom: 8px; }
table.prices { min-width: 560px; }
table.prices .num, table.regs .num { text-align: right; white-space: nowrap; }
table.prices input.count { width: 70px; text-align: right; }
table.prices input.donation { width: 100px; text-align: right; display: inline-block; }
table.prices label.with { font-weight: 400; font-size: .88rem; margin: 6px 0 0; }
table.prices label.check { font-size: .88rem; margin: 6px 0 0; }
table.prices tfoot th { font-size: 1.05rem; background: #efebe5; }
.payinfo { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.sumbox { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.sumbox div { flex: 1 1 200px; background: var(--bg); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; }
.sumbox b { font-size: 1.5rem; color: var(--accent); }
dl.bank { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
dl.bank dt { color: var(--muted); }
dl.bank dd { margin: 0; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.stats b { font-size: 1.4rem; }
.stats span { font-size: .85rem; color: var(--muted); }
table.regs { min-width: 860px; }
table.regs tr.cancelled td { opacity: .55; }
.pill.st-new { background: var(--req); color: var(--req-ink); }
.pill.st-deposit { background: #dbe8f7; color: #1f4f86; }
.pill.st-paid { background: var(--free); color: var(--free-ink); }
.pill.st-cancelled { background: var(--blocked); color: var(--blocked-ink); }
.pay-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pay-form input[name=amount] { width: 80px; text-align: right; }
.pay-form label.check { margin: 0; }
.delete-form { margin-top: 18px; }
@media (max-width: 640px) { dl.bank { grid-template-columns: 1fr; } dl.bank dd { margin-bottom: 6px; } }

/* ---------- Zeitfenster-Regeln, Führungen (11/2026) ---------- */
:root { --held: #ffd9a8; --held-ink: #8a4b00; --pause: #dfe6ef; --pause-ink: #45536a;
        --special: #e9dcf5; --special-ink: #5b2d86; --restr: #ecf7d9; --restr-ink: #3f6b12; }
table.cal td.free.restricted { background: var(--restr); }
table.cal td.free.restricted a { color: var(--restr-ink); }
table.cal td.free small, table.cal td.special small { font-weight: 400; font-size: .72rem; }
table.cal td.held { background: var(--held); color: var(--held-ink); font-size: .8rem; }
table.cal td.pause { background: var(--pause); color: var(--pause-ink); font-size: .8rem; }
table.cal td.special { background: var(--special); color: var(--special-ink); font-weight: 600; font-size: .8rem; outline: 2px solid #b48fd6; outline-offset: -2px; }
table.cal td.special a { color: var(--special-ink); text-decoration: none; display: block; }
.legend i.restricted { background: var(--restr); }
.legend i.held { background: var(--held); }
.legend i.pause { background: var(--pause); }
.legend i.special { background: var(--special); border: 2px solid #b48fd6; }
.specials-list ul { list-style: none; padding: 0; margin: 0; }
.specials-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.specials-list li:first-child { border-top: 0; }
.specials-list li .small { flex: 1 1 260px; }
.btn.small-btn { padding: 4px 12px; font-size: .9rem; }
.price-live { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 4px 0 14px; }
.price-live strong { font-size: 1.25rem; color: var(--accent); }
.restrict-note { color: var(--restr-ink); font-size: .9rem; }
.special-pick { border-left: 4px solid #b48fd6; }
.companions { margin-bottom: 8px; }
.companions p.small { margin: 0 0 4px; }
/* Verwaltung: Regel-Schalter im Kalender */
table.admin-cal td.held, table.admin-cal td.pause, table.admin-cal td.special { font-weight: 400; }
table.admin-cal .rule { display: block; font-size: .72rem; color: var(--muted); }
table.admin-cal .rule.manual { color: #9b2c22; }
.ovr-form { display: inline; }
.ovr-form button { font-size: .72rem; }
table.cal td.free a { flex-direction: column; text-align: center; }
header.site.hero { background-position: center 50% !important; }
table.list tr.imp-err td { background: #fbe3e1; } table.list tr.imp-warn td { background: #fff4d6; } .user-form input, .user-form select { width: auto; } .narrow-card { max-width: 420px; }
.companions-text { margin: 0 0 6px; font-weight: 500; }
.report-box { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; } .report-box h3 { color: var(--ink); font-size: 1.05rem; margin: 0 0 4px; } .inline-form label.wide { flex: 1 1 320px; } .inline-form label.wide input { width: 100%; }
@media (min-width: 641px) { header.site.hero { min-height: 320px; } }
.price-cards small { font-size: .78rem; color: var(--muted); margin-top: 2px; line-height: 1.3; }

/* ---------- Startseite ---------- */
.home-intro h1 { margin-top: 6px; }
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 24px; }
.event-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.event-card:hover, .event-card:focus { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); }
.event-card .pic { display: block; height: 140px; background-size: cover; background-position: center 40%; }
.event-card .txt { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.event-card strong { font-size: 1.1rem; }
.event-card .when { color: var(--muted); font-size: .9rem; }
.event-card .desc { font-size: .9rem; }
.event-card .go { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; }
