/* Aarons 30. – gemeinsames Design (Einladung + Gastgeber-Seite)
   Layout: eine schmale Spalte wie eine Einladungskarte; Holzbraun für Überschriften, Waldgrün für Aktionen. */
:root {
  --bg: #eceee9;
  --surface: #fbfbf8;
  --ink: #23261f;
  --muted: #5f655a;
  --line: #d2d6cb;
  --wood: #6b4a2f;
  --green: #3a7550;
  --green-soft: #dcebdf;
  --red: #b0413a;
  --red-soft: #f5e0dc;
  --amber: #b07a12;
  --amber-soft: #f6ead0;
  --input: #ffffff;
  --sky-top: #cfdedb;
  --sky-bottom: #eef1ea;
  --sun: #f0c25e;
  --hill-far: #a7bcae;
  --hill-mid: #6f907a;
  --hill-near: #3f6249;
  --tree: #2e4c38;
  --stone: #cdc6b6;
  --timber: #5b3f29;
  --roof: #9a4632;
  --win: #a9d6b1;
  --shadow: 0 1px 2px rgba(35,38,31,.06), 0 8px 24px rgba(35,38,31,.06);
  --display: "Zilla Slab", "Rockwell", Georgia, serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512; --surface: #211e1a; --ink: #ece6dc; --muted: #a49c8f; --line: #3a352e;
    --wood: #d2a577; --green: #82c497; --green-soft: #213528; --red: #e58076; --red-soft: #3c231f;
    --amber: #e3b45a; --amber-soft: #3a2f17; --input: #1a1815;
    --sky-top: #0f1a17; --sky-bottom: #1b2621; --sun: #e9e1c4; --hill-far: #2a3a32; --hill-mid: #22342a;
    --hill-near: #172219; --tree: #101a13; --stone: #4a463e; --timber: #2f2219; --roof: #4e2a21; --win: #f0c25e;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
.wrap { max-width: 680px; margin: 0 auto; padding-inline: 16px; padding-block: 32px 96px; }
.wrap.wide { max-width: 1100px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; line-height: 1.1; }
h2 { font-size: 24px; color: var(--wood); }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--green); }
[hidden] { display: none !important; }

.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.hero h1 { font-size: clamp(44px, 13vw, 76px); color: var(--wood); letter-spacing: -.01em; }
.hero .lead { font-size: 18px; max-width: 34em; }
.coords { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.facts dt { font-weight: 600; color: var(--wood); }
.facts dd { margin: 0; }
@media (max-width: 420px) { .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .facts dd { margin-bottom: 8px; } }

label.field, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
  font: inherit; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--input); color: var(--ink); padding: 10px 12px;
}
textarea { min-height: 84px; resize: vertical; }
input.pin { font-size: 24px; letter-spacing: .4em; font-variant-numeric: tabular-nums; text-align: center; max-width: 220px; }

fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
legend { font-family: var(--display); font-size: 20px; color: var(--wood); font-weight: 600; padding: 0; margin-bottom: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--input); border-radius: 999px; padding: 8px 14px; font-weight: 500; }
.choice input:checked + span { border-color: var(--green); background: var(--green-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.choice.big span { padding: 12px 18px; font-size: 17px; }
.activity { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); cursor: pointer; }
.activity input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--green); }
.activity strong { display: block; }
.activity small { color: var(--muted); font-size: 14px; }
.activity:has(input:checked) { border-color: var(--green); background: var(--green-soft); }

button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; font-weight: 500; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--green); border-color: var(--green); color: var(--surface); font-weight: 600; }
button.danger { color: var(--red); }
button.link { border: 0; background: transparent; padding: 0; color: var(--green); text-decoration: underline; font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.msg { border-radius: 8px; padding: 10px 14px; font-size: 15px; }
.msg.error { background: var(--red-soft); border: 1px solid var(--red); }
.msg.ok { background: var(--green-soft); border: 1px solid var(--green); }
.msg.warn { background: var(--amber-soft); border: 1px solid var(--amber); }

.savebar { position: sticky; bottom: 0; margin-top: 8px; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status { font-size: 14px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 200px; min-width: 0; }

/* Gastgeber-Seite */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile b { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--muted); }
.tile.ok b { color: var(--green); }
.tile.warn b { color: var(--amber); }
.tile.bad b { color: var(--red); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 4px 10px; align-items: center; font-size: 14px; }
.bars .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.plain li { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.plain li:last-child { border-bottom: 0; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); white-space: nowrap; }
.pill.ja { background: var(--green-soft); border-color: var(--green); }
.pill.nein { background: var(--red-soft); border-color: var(--red); }
.pill.unsicher { background: var(--amber-soft); border-color: var(--amber); }
.pinbox { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .2em; font-weight: 600; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button { padding: 6px 10px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Einladung: Kopfbereich mit Landschaft ---------- */
.invite { position: relative; overflow: hidden; background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom)); min-height: clamp(520px, 78vh, 680px); display: flex; flex-direction: column; }
.invite .landscape { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 62%; display: block; }
.ls-sun { fill: var(--sun); opacity: .9; }
.ls-far { fill: var(--hill-far); }
.ls-mid { fill: var(--hill-mid); }
.ls-near { fill: var(--bg); }
.ls-trees path { fill: var(--tree); }
.ls-wall-stone { fill: var(--stone); }
.ls-wall-wood, .ls-chimney, .ls-door { fill: var(--timber); }
.ls-roof { fill: var(--roof); }
.ls-window { fill: var(--win); }
.invite-text { position: relative; z-index: 1; width: 100%; padding-block: 56px 0; display: flex; flex-direction: column; gap: 14px; }
.invite h1 { font-size: clamp(56px, 16vw, 112px); color: var(--wood); letter-spacing: -.02em; line-height: .95; }
.invite .lead { font-size: clamp(17px, 2.4vw, 20px); max-width: 32em; }
.eyebrow.light { color: var(--ink); opacity: .75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.countdown { font-family: var(--display); font-size: 20px; color: var(--wood); font-variant-numeric: tabular-nums; }
.invite-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.invite.has-photo .landscape { display: none; }
.invite.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.68), rgba(0,0,0,.35) 50%, rgba(0,0,0,.05) 78%, var(--bg)); }
.invite.has-photo .invite-text { z-index: 2; }
.invite.has-photo h1, .invite.has-photo .lead, .invite.has-photo .eyebrow, .invite.has-photo .countdown { color: #fff; opacity: 1; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.invite + .wrap { margin-top: -40px; position: relative; z-index: 2; padding-top: 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 18px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--surface); }
.btn.primary:hover { filter: brightness(1.08); }

/* Programm */
.program { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.program li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.program li:first-child { border-top: 0; padding-top: 4px; }
.prog-day { display: flex; flex-direction: column; }
.prog-day strong { font-family: var(--display); font-size: 19px; color: var(--wood); }
.prog-day span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .program li { grid-template-columns: minmax(0, 1fr); } }

/* Haus */
.house-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.house-feats li { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; border-radius: 10px; overflow: hidden; background: var(--bg); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 13px; color: var(--muted); padding: 6px 10px 8px; }

footer.site-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

/* Fotos im Programm */
.program li.with-img { grid-template-columns: 150px minmax(0, 1fr) 160px; align-items: start; }
.prog-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 640px) {
  .program li.with-img { grid-template-columns: minmax(0, 1fr); }
  .program li.with-img .prog-img { order: -1; aspect-ratio: 16 / 9; margin-bottom: 6px; }
}
/* Kopfbild: Haus etwas weiter unten anschneiden, Text gut lesbar */
.invite-photo { background-position: center 65%; }
.invite.has-photo { min-height: clamp(560px, 86vh, 760px); }
.invite.has-photo .btn:not(.primary) { background: rgba(255,255,255,.9); }
.gallery figure:first-child { grid-column: span 2; }
.gallery figure:first-child img { aspect-ratio: 16 / 9; }
@media (max-width: 460px) { .gallery figure:first-child { grid-column: auto; } .gallery figure:first-child img { aspect-ratio: 4 / 3; } }

/* Dezente Hintergrundfotos in den Karten */
.deco { position: relative; overflow: hidden; isolation: isolate; }
.deco::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: min(58%, 460px); z-index: -1; pointer-events: none;
  background: var(--deco) center / cover no-repeat; opacity: .32;
  -webkit-mask-image: linear-gradient(to left, #000 25%, transparent 100%); mask-image: linear-gradient(to left, #000 25%, transparent 100%); }
@media (prefers-color-scheme: dark) { .deco::before { opacity: .22; } }
@media (max-width: 640px) {
  .deco::before { width: 100%; height: 190px; bottom: auto; opacity: .2;
    -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 100%); mask-image: linear-gradient(to bottom, #000 10%, transparent 100%); }
}

/* Anreise & Mitfahrbörse */
.rides { display: flex; flex-direction: column; gap: 18px; }
.ride-block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ride-block:first-child { border-top: 0; padding-top: 0; }
.ride-block h3 { font-size: 17px; color: var(--wood); }
.ride-details { align-items: flex-end; }
.seats-field { flex: 0 0 150px; }
.ride-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.ride-col h3 { color: var(--wood); }
.ride-sum { font-size: 13px; color: var(--muted); margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.ride-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ride-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--input); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.ride-list li.empty-ride { display: block; color: var(--muted); }
.ride-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; text-align: center; border-radius: 6px; padding: 3px 0; }
.driver .ride-tag { background: var(--green-soft); color: var(--green); }
.seeker .ride-tag { background: var(--amber-soft); color: var(--amber); }
.ride-seats { font-weight: 600; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ride-seats.full { color: var(--muted); }

/* Kommentare in der Mitfahrbörse */
.ride-list li { display: block; }
.ride-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ride-thread { margin: 6px 0 0 62px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 420px) { .ride-thread { margin-left: 0; } }
button.link.small { font-size: 13px; align-self: flex-start; }
.danger-link { color: var(--red) !important; }
.thread-body { display: flex; flex-direction: column; gap: 8px; }
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.comments li { background: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
.comments li p { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
.comments li button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.comment-form input { padding: 8px 10px; font-size: 14px; }
.small-btn { padding: 8px 12px; font-size: 14px; }
