/* ===== Theme-Variablen ===== */
:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-elev2: #1f2430;
  --bg-input: #11141a;
  --border: #2a3040;
  --border-soft: #232838;
  --text: #e6e9ef;
  --text-dim: #9aa3b2;
  --text-faint: #6b7383;
  --accent: #c9a14a;       /* champagner-gold */
  --accent-2: #e3c373;
  --accent-soft: rgba(201,161,74,.14);
  --pink: #d98cae;
  --blue: #6ea8fe;
  --green: #5cc98c;
  --orange: #f2994a;
  --red: #e2607a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --shadow-sm: 0 3px 12px rgba(0,0,0,.35);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

body {
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(201,161,74,.10), transparent 60%),
    radial-gradient(800px 500px at 110% 0%, rgba(110,168,254,.07), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: .2px; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }

/* ===== Header / Navigation ===== */
.app-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 26px;
  background: rgba(20,23,30,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-size: 1.6rem;
  color: var(--pink);
  filter: drop-shadow(0 0 8px rgba(217,140,174,.5));
}
.brand h1 { font-size: 1.25rem; }
.brand-sub { color: var(--text-dim); font-size: .8rem; }

.tabs { display: flex; gap: 8px; margin-left: auto; }
.tab {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .92rem;
  transition: all .18s ease;
}
.tab:hover { color: var(--text); background: var(--bg-elev2); }
.tab.active {
  color: #1a1a1a;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(201,161,74,.3);
}
.print-btn { margin-left: 4px; }
/* „Zutaten drucken“ nur auf dem Snacks-Tab anbieten */
body:not([data-print-page="snacks"]) .snacks-only { display: none; }

/* Speicherstatus + Header-Aktionen */
.header-actions { display: flex; align-items: center; gap: 12px; }
.save-status {
  font-size: .78rem;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color .2s, border-color .2s, background .2s;
}
.save-status.ok  { color: var(--green); border-color: rgba(92,201,140,.4); background: rgba(92,201,140,.08); }
.save-status.busy { color: var(--accent-2); border-color: rgba(201,161,74,.4); background: var(--accent-soft); }
.save-status.err { color: var(--red); border-color: rgba(226,96,122,.45); background: rgba(226,96,122,.1); }

/* ===== Buttons ===== */
.btn {
  border: 1px solid var(--border);
  background: var(--bg-elev2);
  color: var(--text);
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1a1a1a;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(201,161,74,.35); }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(226,96,122,.12); border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: rgba(226,96,122,.2); }
.btn-sm { padding: 5px 10px; font-size: .8rem; }

/* ===== Layout ===== */
.app-main { padding: 26px; max-width: 1240px; margin: 0 auto; }
.page { display: none; animation: fade .25s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-sub { color: var(--text-dim); font-size: .9rem; margin-top: 4px; }
.empty-hint, .hint {
  color: var(--text-faint);
  font-size: .85rem;
  font-style: italic;
}
.empty-hint { padding: 30px; text-align: center; }
.hint { margin: 8px 0; font-style: normal; }

/* ===== Form-Elemente ===== */
input[type="text"], input[type="number"], input[type="time"], select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--accent); }
input::placeholder { color: var(--text-faint); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: .85rem; color: var(--text-dim); }
.field input, .field select { color: var(--text); }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }

/* ===================================================== */
/* SEITE 1: SNACKS                                       */
/* ===================================================== */
.snack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.snack-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s;
}
.snack-card:hover { transform: translateY(-3px); border-color: var(--border); }
/* Erledigt: grüne Umrandung + halbe Deckkraft */
.snack-card.done { border-color: var(--green); opacity: .5; }
.snack-card.done:hover { opacity: .7; border-color: var(--green); }
.btn-done { background: var(--green); border-color: var(--green); color: #0f1115; font-weight: 600; }
.snack-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-elev2);
  display: block;
}
.snack-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 2.4rem;
}
.snack-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.snack-title { font-size: 1.08rem; font-weight: 600; }
.snack-note { color: var(--accent-2); font-size: .8rem; margin-top: 2px; }
.snack-ing-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin: 12px 0 6px; }
.snack-ing { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.snack-ing li { font-size: .85rem; color: var(--text-dim); padding-left: 14px; position: relative; }
.snack-ing li::before { content: "\2022"; color: var(--accent); position: absolute; left: 0; }
.snack-ing .none { color: var(--text-faint); font-style: italic; }
.snack-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-soft); }
.snack-actions .btn { flex: 1; }

/* Button-Gruppe im Seitenkopf */
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Abstand vor dem Getränke-Bereich */
.drinks-head { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border-soft); }

/* Menge (gedämpft) + Zutatenname auf Karten und in Listen */
.ing-amt { color: var(--text-faint); font-size: .85em; }
.ing-name { color: inherit; }
.ing-line { display: inline-flex; gap: 4px; align-items: baseline; min-width: 0; }

/* Geteiltes Zutaten-Formular: Menge (schmal) + Zutat (breit) */
.ingredient-form-split { flex-wrap: wrap; }
.ingredient-form-split .ing-amount { flex: 0 0 120px; min-width: 0; }
.ingredient-form-split #ingredientInput { flex: 1; min-width: 120px; }

/* Automatische Gesamt-Zutatenliste */
.ingredients-summary { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border-soft); }
.ingredients-summary h3 { font-size: 1.15rem; font-weight: 600; }
.ingredients-all {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 18px;
}
.ingredients-all li {
  font-size: .9rem;
  color: var(--text-dim);
  padding: 6px 10px 6px 22px;
  position: relative;
  background: var(--bg-elev2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}
.ingredients-all li::before { content: "\2022"; color: var(--accent); position: absolute; left: 10px; }

.img-preview { width: 100%; max-height: 170px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.image-upload { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ingredient-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ingredient-list li {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-elev2); padding: 7px 10px; border-radius: 8px; font-size: .85rem;
  border: 1px solid var(--border-soft);
}
.ingredient-list .x { cursor: pointer; color: var(--red); padding: 0 4px; font-weight: 700; }

/* ===================================================== */
/* SEITE 2: AUTOS                                        */
/* ===================================================== */
.cars-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.guest-panel, .task-panel {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; position: sticky; top: 90px;
}
.guest-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 7px; min-height: 40px; }
.guest-chip, .seat-guest {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-elev2); border: 1px solid var(--border);
  padding: 8px 11px; border-radius: 999px; font-size: .88rem; cursor: grab; user-select: none;
  touch-action: none;
}
.guest-chip .chip-name, .seat-guest .chip-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.guest-chip:active { cursor: grabbing; }
.muted-hint { color: var(--text-faint); font-size: .85rem; font-style: italic; list-style: none; padding: 8px 4px; }
.guest-chip .avatar, .seat-guest .avatar {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  background: linear-gradient(135deg, var(--pink), var(--accent));
  color: #1a1a1a; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.guest-chip .x { cursor: pointer; color: var(--text-faint); font-weight: 700; padding: 0 2px; }
.guest-chip .x:hover { color: var(--red); }
.guest-list.dropzone-active { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 10px; }

.cars-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.cars-toolbar label { color: var(--text-dim); font-size: .85rem; display: flex; gap: 6px; align-items: center; }
.cars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

.car-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.car-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.car-name { font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.car-name .seats-badge { font-size: .72rem; color: var(--text-faint); background: var(--bg-elev2); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-soft); }
.car-del { cursor: pointer; color: var(--text-faint); font-size: 1.1rem; background: none; border: none; }
.car-del:hover { color: var(--red); }

/* Visuelles Auto */
.car-visual {
  position: relative;
  margin-top: 12px;
  background:
    linear-gradient(180deg, var(--bg-elev2), var(--bg-input));
  border: 2px solid var(--border);
  border-radius: 38px 38px 22px 22px;
  padding: 16px;
}
.car-visual::before { /* Windschutzscheibe */
  content: ""; position: absolute; top: 8px; left: 22%; right: 22%; height: 14px;
  background: rgba(110,168,254,.16); border-radius: 12px 12px 4px 4px; border: 1px solid var(--border-soft);
}
.car-seats { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.seat-row { display: flex; gap: 12px; justify-content: center; }
.seat-row .seat { flex: 1 1 0; min-width: 0; }
.seat {
  min-height: 58px;
  border: 2px dashed var(--border);
  border-radius: 12px 12px 16px 16px;
  background: var(--bg-input);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; color: var(--text-faint);
  position: relative; transition: all .15s; padding: 6px;
}
.seat .seat-label { position: absolute; top: 4px; left: 8px; font-size: .62rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .5px; }
.seat.driver { border-color: var(--accent); }
.seat.driver .seat-label { color: var(--accent); }
.seat.dropzone-active { border-color: var(--green); background: rgba(92,201,140,.1); }
.seat.occupied { border-style: solid; border-color: var(--border); }
/* Freie Sitze grün umranden (gilt auch für den freien Fahrersitz) */
.seat:not(.occupied) { border-color: var(--green); }
.seat-guest { cursor: grab; background: linear-gradient(135deg, var(--bg-elev2), var(--bg-elev)); border-radius: 999px; max-width: 100%; }
/* Namen auf den Sitzen gut lesbar: Standard weiß, Fahrer orange */
.seat-guest .chip-name { color: #fff; }
.seat.driver .seat-guest .chip-name { color: var(--orange); }
.seat-guest .x { cursor: pointer; color: var(--text-faint); font-weight: 700; }
.seat-guest .x:hover { color: var(--red); }
.seat-empty-text { color: var(--text-faint); font-style: italic; }

/* ===================================================== */
/* SEITE 3: ZEITPLANUNG                                  */
/* ===================================================== */
.schedule-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.task-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.task-form-row { display: flex; gap: 8px; align-items: flex-end; }
.task-form-row label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--text-dim); flex: 1; }
.task-pool { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 9px; min-height: 40px; }
.task-pool-item {
  background: var(--bg-elev2); border: 1px solid var(--border); border-left: 3px solid var(--blue);
  border-radius: 10px; padding: 10px 12px; cursor: grab; user-select: none; touch-action: none;
}
.task-pool.dropzone-active { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 10px; }
.task-pool-item .t-title { font-weight: 600; font-size: .9rem; }
.task-pool-item .t-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.task-pool-item .t-dur { font-size: .76rem; color: var(--text-dim); }

/* Zuständigen-Pille (Pool + Modal-Liste) */
.task-form-submit { width: 100%; }
.t-who, .assignee-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
  white-space: nowrap;
}
.t-who .dot, .assignee-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: 0 0 7px;
}

/* Zuständige verwalten */
.assignee-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.assignee-box-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin-bottom: 8px; }
.assignee-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.assignee-chip { cursor: default; }
.assignee-chip .a-name { color: var(--text); }
.assignee-chip .x { cursor: pointer; color: currentColor; font-weight: 700; padding: 0 2px; opacity: .8; }
.assignee-chip .x:hover { opacity: 1; }

.timeline-panel { display: flex; flex-direction: column; gap: 22px; }
.day-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.day-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.day-title .badge { background: var(--accent-soft); color: var(--accent-2); padding: 3px 11px; border-radius: 999px; font-size: .78rem; border: 1px solid var(--accent); }

.timeline {
  position: relative;
  display: grid;
  /* Spalten werden per JS gesetzt (Stundenanzahl) */
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, transparent, transparent calc(var(--hour-w) - 1px), var(--border-soft) calc(var(--hour-w) - 1px), var(--border-soft) var(--hour-w));
  min-height: 90px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.timeline-hours { display: grid; }
.timeline-hour-label { font-size: .68rem; color: var(--text-faint); text-align: center; padding: 4px 0; border-left: 1px solid var(--border-soft); }
.timeline-track {
  position: relative;
  height: 78px;
  background-size: var(--hour-w) 100%;
  background-image: repeating-linear-gradient(90deg, var(--border-soft), var(--border-soft) 1px, transparent 1px, transparent var(--hour-w));
}
.timeline-track.dropzone-active { background-color: rgba(201,161,74,.07); }

.timeline-task {
  position: absolute; top: 8px; height: 62px;
  background: linear-gradient(135deg, var(--bg-elev2), var(--bg-elev));
  border: 1px solid var(--blue); border-left: 4px solid var(--blue);
  border-radius: 9px; padding: 6px 9px; overflow: hidden;
  cursor: grab; user-select: none; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; justify-content: center; touch-action: none;
}
.timeline-task .tt-title {
  font-weight: 500; line-height: 1.2;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.timeline-task .tt-edit { position: absolute; top: 3px; right: 5px; font-size: .72rem; color: var(--text-faint); cursor: pointer; opacity: 0; transition: opacity .15s; }
.timeline-task:hover .tt-edit { opacity: 1; }
.timeline-scroll-note { font-size: .72rem; color: var(--text-faint); margin-top: 6px; }

/* ===================================================== */
/* SEITE 4: TODO                                        */
/* ===================================================== */
.todo-form {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 20px;
  max-width: 720px;
}
.todo-form-row { display: flex; gap: 10px; }
.todo-form-row input { flex: 1; min-width: 0; }
.todo-form textarea {
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: var(--radius-sm); font-family: inherit;
  font-size: .9rem; outline: none; resize: vertical; transition: border-color .15s;
}
.todo-form textarea:focus { border-color: var(--accent); }
.todo-form textarea::placeholder { color: var(--text-faint); }
.todo-form .btn-primary { align-self: flex-start; }

.todo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }

/* Gruppen-Überschrift „Verantwortlich“ */
.todo-group-head {
  display: flex; align-items: center; gap: 9px;
  margin-top: 8px; padding: 2px 2px 6px;
  font-weight: 700; font-size: .92rem; color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}
.todo-group-head:first-child { margin-top: 0; }
.todo-group-head .tg-count {
  font-size: .72rem; font-weight: 600; color: var(--accent-2);
  background: var(--accent-soft); border: 1px solid var(--accent);
  padding: 1px 9px; border-radius: 999px;
}
.todo-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm);
  transition: opacity .15s, border-color .15s;
}
.todo-item.done { border-left-color: var(--green); opacity: .72; }
.todo-item.done .todo-title { text-decoration: line-through; color: var(--text-dim); }

/* Eigene Checkbox */
.todo-check { position: relative; flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; cursor: pointer; }
.todo-check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.todo-check .checkmark {
  position: absolute; inset: 0; border: 2px solid var(--border);
  border-radius: 6px; background: var(--bg-input); transition: all .15s;
}
.todo-check input:checked + .checkmark { background: var(--green); border-color: var(--green); }
.todo-check input:checked + .checkmark::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px; border: solid #0f1115; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.todo-check input:focus-visible + .checkmark { border-color: var(--accent); }

.todo-body { flex: 1; min-width: 0; }
.todo-title { font-weight: 600; font-size: 1rem; word-break: break-word; }
.todo-desc { color: var(--text-dim); font-size: .85rem; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.todo-del { cursor: pointer; color: var(--text-faint); font-size: 1.05rem; background: none; border: none; flex: 0 0 auto; align-self: center; }
.todo-del:hover { color: var(--red); }

/* ===== Modals ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,7,11,.7);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 520px; box-shadow: var(--shadow); max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .2s ease;
}
.modal-sm { max-width: 400px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border-soft); }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }

.hidden { display: none !important; }

/* Nur im Druck sichtbar (z. B. die Einkaufsliste) */
.print-only { display: none; }

/* ===== Drag & Drop (Maus + Touch) ===== */
.drag-clone {
  position: fixed;
  left: 0; top: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .92;
  transform: rotate(-1.5deg) scale(1.02);
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
  margin: 0 !important;
}
.drag-source { opacity: .35; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .cars-layout, .schedule-layout { grid-template-columns: 1fr; }
  .guest-panel, .task-panel { position: static; }
}

@media (max-width: 760px) {
  .app-header {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 16px;
  }
  .tabs { order: 3; width: 100%; margin-left: 0; justify-content: center; }
  .tab { flex: 1; text-align: center; padding: 9px 8px; font-size: .82rem; }
  .header-actions { margin-left: auto; }
  .app-main { padding: 18px 14px; }
  h2 { font-size: 1.3rem; }
  .snack-grid { grid-template-columns: 1fr; }
  .cars-grid { grid-template-columns: 1fr; }
  .cars-toolbar { gap: 8px; }
  .cars-toolbar input, .cars-toolbar .btn { flex: 1; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  .todo-form-row { flex-direction: column; }
  .todo-item { flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .brand h1 { font-size: 1.05rem; }
  .brand-sub { font-size: .72rem; }
  .save-status { font-size: .7rem; padding: 4px 8px; }
  .tab { font-size: .76rem; }
  .page-head .btn { width: 100%; }
}

/* ===== Mobile-Optimierung (Sichtbarkeit + Bedienbarkeit) ===== */
/* iOS zoomt automatisch hinein, wenn ein fokussiertes Eingabefeld < 16px hat.
   Auf kleinen Bildschirmen daher alle Felder auf 16px anheben. */
@media (max-width: 760px) {
  input[type="text"], input[type="number"], input[type="time"], select {
    font-size: 16px;
  }
  .timeline-task { height: 66px; }
  .timeline-track { height: 84px; }
  .timeline-task .tt-title { font-size: .85rem; }
}

/* Touch-Geräte: größere Tippflächen, Bearbeiten-Symbol dauerhaft sichtbar */
@media (hover: none) {
  .timeline-task .tt-edit { opacity: 1; font-size: .9rem; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .seat { min-height: 64px; }
  .task-pool-item, .timeline-task { cursor: pointer; }
  /* Lösch-/Schließen-Kreuze leichter treffen */
  .guest-chip .x, .seat-guest .x, .assignee-chip .x,
  .ingredient-list .x, .snack-actions .x, .modal-close {
    padding: 6px 8px;
  }
  .modal-close { font-size: 1.8rem; }
}
