/* Hochzeitsplaner – mobile-first, hell + dunkel */
:root {
  --rose: #b0667a;
  --rose-dark: #8a4c5e;
  --rose-deep: #6f3a4b;
  --rose-light: #f7e9ee;
  --rose-soft: #fbf3f6;
  --gold: #b98d4f;
  --gold-light: #f5ecdb;
  --bg: #f7f3f1;
  --card: #ffffff;
  --text: #2c2226;
  --muted: #8a7c81;
  --green: #3f8a55;
  --green-bg: #e3f2e7;
  --red: #b8465b;
  --red-bg: #f9e4e8;
  --amber: #b8822a;
  --amber-bg: #f8edd8;
  --grey-bg: #eeeaeb;
  --border: #ece3e6;
  --shadow: 0 1px 2px rgba(60, 30, 40, .05), 0 4px 14px rgba(60, 30, 40, .05);
  --shadow-lift: 0 2px 6px rgba(60, 30, 40, .08), 0 10px 24px rgba(60, 30, 40, .08);
  --radius: 16px;
  --radius-sm: 12px;
  --header: rgba(247, 243, 241, .85);
  --on-accent: #ffffff;
  --font: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --rose: #c98a9c;
  --rose-dark: #d9a4b4;
  --rose-deep: #a86d80;
  --rose-light: #3a2a31;
  --rose-soft: #2c2127;
  --gold: #d4ac6c;
  --gold-light: #3a3227;
  --bg: #16121a;
  --card: #211b25;
  --text: #f2eaee;
  --muted: #a5969c;
  --green: #7cc891;
  --green-bg: #23362a;
  --red: #e88397;
  --red-bg: #3e2530;
  --amber: #e2b463;
  --amber-bg: #3b3122;
  --grey-bg: #2d262f;
  --border: #33293a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 10px 24px rgba(0, 0, 0, .35);
  --header: rgba(22, 18, 26, .85);
  --on-accent: #1a1216;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rose: #c98a9c; --rose-dark: #d9a4b4; --rose-deep: #a86d80; --rose-light: #3a2a31; --rose-soft: #2c2127;
    --gold: #d4ac6c; --gold-light: #3a3227;
    --bg: #16121a; --card: #211b25; --text: #f2eaee; --muted: #a5969c;
    --green: #7cc891; --green-bg: #23362a; --red: #e88397; --red-bg: #3e2530; --amber: #e2b463; --amber-bg: #3b3122;
    --grey-bg: #2d262f; --border: #33293a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 10px 24px rgba(0, 0, 0, .35);
    --header: rgba(22, 18, 26, .85); --on-accent: #1a1216;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.has-fab { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font-family: inherit; }

/* ---- Kopfzeile ---- */
#topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--header); color: var(--text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 4px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid var(--border);
}
#topbar h1 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; color: var(--rose-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  background: none; border: none; color: var(--rose-dark);
  font-size: 1.3rem; padding: 4px 8px; cursor: pointer; border-radius: 10px;
  min-width: 40px; min-height: 40px;
}
.icon-btn:active { background: var(--rose-light); }
#btn-back { font-size: 2rem; line-height: 1; margin-left: -8px; }
.icon-btn svg { width: 22px; height: 22px; display: block; margin: 0 auto; }

/* ---- Inhalt ---- */
#view { padding: 14px 14px 24px; max-width: 720px; margin: 0 auto; }
h2.section { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800;
  color: var(--muted); margin: 22px 4px 10px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px;
  border: 1px solid var(--border);
}

/* Dashboard */
#countdown-card { text-align: center; color: #fff; border: none; padding: 26px 16px 24px;
  background: radial-gradient(120% 140% at 0% 0%, #c98499 0%, var(--rose) 45%, var(--rose-deep) 100%);
  box-shadow: 0 12px 30px rgba(140, 70, 90, .28); position: relative; overflow: hidden; }
#countdown-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.08); right: -70px; top: -90px; }
#countdown-card .names { font-family: var(--serif); font-size: 2rem; font-weight: 500; letter-spacing: .01em; line-height: 1.1; position: relative; }
#countdown-card .names .amp { font-style: italic; color: #f5dcb0; margin: 0 8px; }
#countdown-card .days { font-size: 3rem; font-weight: 800; line-height: 1.05; margin-top: 8px; letter-spacing: -0.02em; position: relative; }
#countdown-card .sub { opacity: .9; font-size: .85rem; margin-top: 4px; position: relative; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 6px 12px; text-align: center; box-shadow: var(--shadow); }
.stat .num { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.stat .lbl { font-size: .72rem; color: var(--muted); margin-top: 3px; font-weight: 600; }
.stat.green .num { color: var(--green); }
.stat.red .num { color: var(--red); }
.stat.amber .num { color: var(--amber); }

.progress { height: 8px; background: var(--rose-light); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--rose), var(--rose-deep)); border-radius: 99px; transition: width .4s; }

/* Listenzeilen */
.row {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.row:active { transform: scale(.985); background: var(--rose-soft); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; letter-spacing: -0.005em; }
.row .sub { font-size: .8rem; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.done .title { text-decoration: line-through; color: var(--muted); font-weight: 600; }

.badge { font-size: .72rem; padding: 4px 10px; border-radius: 99px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.badge.tap { padding: 9px 12px; min-width: 80px; text-align: center; margin: -6px -4px -6px 0; }
.tag { font-size: .7rem; color: var(--green); font-weight: 700; }
.badge.zugesagt { background: var(--green-bg); color: var(--green); }
.badge.abgesagt { background: var(--red-bg); color: var(--red); }
.badge.offen    { background: var(--amber-bg); color: var(--amber); }
.badge.grey     { background: var(--grey-bg); color: var(--muted); }
.badge.gold     { background: var(--gold-light); color: var(--gold); }

.check {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: .9rem; background: var(--card); position: relative;
  transition: background .15s, border-color .15s;
}
.check::before { content: ""; position: absolute; inset: -12px; }
.row.done .check { background: var(--green); border-color: var(--green); color: #fff; }

/* Suche, Chips, Sortierleiste */
.searchbar {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card);
  font-size: 1rem; margin-bottom: 10px; color: var(--text); box-shadow: var(--shadow);
}
.searchbar::placeholder { color: var(--muted); }
.searchbar:focus { outline: 2px solid var(--rose); border-color: transparent; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 2px;
  scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 99px; padding: 7px 14px; font-size: .82rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.chip.active { background: var(--rose-dark); border-color: var(--rose-dark); color: var(--on-accent); }
.sortbar { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.sortbar .sortlabel { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; flex-shrink: 0; }
.sortbar .chips { flex: 1; margin: 0; padding-bottom: 6px; }
.sortbar .chip { padding: 6px 12px; font-size: .78rem; }
.sortbar .chip.active { background: var(--rose-light); border-color: var(--rose); color: var(--rose-dark); }
.sort-dir { flex-shrink: 0; width: 34px; height: 34px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--card); color: var(--rose-dark); cursor: pointer; font-size: 1rem; font-weight: 800; }

/* Formulare im Modal */
#modal-backdrop {
  position: fixed; inset: 0; background: rgba(30, 15, 22, .5); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#modal-backdrop.hidden { display: none; }
@keyframes modal-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
#modal {
  background: var(--bg); width: 100%; max-width: 560px;
  border-radius: 22px 22px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; animation: modal-up .22s ease-out;
}
@media (min-width: 600px) {
  #modal-backdrop { align-items: center; }
  #modal { border-radius: 22px; box-shadow: var(--shadow-lift); }
}
#modal h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.01em; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .76rem; color: var(--muted); margin-bottom: 5px; font-weight: 700; letter-spacing: .02em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--card); font-size: 1rem; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--rose); border-color: transparent;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); padding: 3px; gap: 3px; }
.seg button { flex: 1; border: none; background: none; padding: 9px 4px; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--text); border-radius: 9px; }
.seg button.active { background: var(--rose-dark); color: var(--on-accent); }

/* Große -/+ Stepper statt fummeliger Zahlenfelder */
.stepper {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); overflow: hidden;
}
.stepper button {
  width: 52px; height: 46px; border: none; background: none;
  font-size: 1.5rem; color: var(--rose-dark); cursor: pointer; flex-shrink: 0;
}
.stepper button:active { background: var(--rose-light); }
.stepper .val { flex: 1; text-align: center; font-weight: 800; font-size: 1.1rem; }

/* Antippbare Vorschläge unter Eingabefeldern */
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preset {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  border-radius: 99px; padding: 6px 12px; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.preset.active { background: var(--rose-light); border-color: var(--rose);
  color: var(--rose-dark); }

/* Kontakt-Schnellaktionen im Formular */
.contact-actions { display: flex; gap: 8px; margin: 2px 0 12px; }
.contact-actions a {
  flex: 1; text-align: center; text-decoration: none;
  border: 1px solid var(--border); background: var(--card); color: var(--rose-dark);
  border-radius: var(--radius-sm); padding: 10px 4px; font-size: .85rem; font-weight: 700;
}
.contact-actions a:active { background: var(--rose-light); }

#modal-actions { display: flex; gap: 8px; margin-top: 18px; align-items: center; }
.spacer { flex: 1; }
.btn { border: none; border-radius: 99px; padding: 12px 20px; font-size: .95rem; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--rose-dark); color: var(--on-accent); box-shadow: 0 4px 12px rgba(138, 76, 94, .25); }
.btn.primary:active { transform: scale(.98); }
.btn.primary:disabled { opacity: .6; }
.btn.ghost { background: none; color: var(--muted); }
.btn.danger { background: none; color: var(--red); padding-left: 0; }
.hidden { display: none !important; }

/* Tabbar */
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: var(--header); border-top: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; border: none; background: none; padding: 6px 0 5px;
  font-size: .66rem; font-weight: 600; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 12px;
}
.tab .ico { font-size: 1.15rem; line-height: 1; padding: 3px 12px; border-radius: 99px; transition: background .15s; }
.tab.active { color: var(--rose-dark); font-weight: 800; }
.tab.active .ico { background: var(--rose-light); }
#tabbar .brand { display: none; }
#tabbar .lbl { display: block; }

/* FAB */
#fab {
  position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: linear-gradient(145deg, var(--rose), var(--rose-deep)); color: #fff; font-size: 2rem; line-height: 1;
  box-shadow: 0 8px 20px rgba(125, 67, 85, .4); cursor: pointer; transition: transform .12s;
}
#fab:active { transform: scale(.94); }

/* Budget-Summen */
.money-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.num-pos { color: var(--green); }
.num-neg { color: var(--red); }

/* Tische */
.table-card .head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.table-card .head .title { font-weight: 800; flex: 1; }
.table-guest { display: flex; align-items: center; gap: 8px; padding: 8px 2px;
  border-top: 1px solid var(--border); font-size: .92rem; }
.table-guest .x { margin-left: auto; color: var(--muted); border: none; background: none;
  font-size: 1rem; cursor: pointer; padding: 2px 8px; }
.mini-btn { border: 1px dashed var(--rose); color: var(--rose-dark); background: none;
  border-radius: 99px; padding: 7px 14px; font-size: .82rem; font-weight: 700; cursor: pointer; margin-top: 8px; }

.empty { text-align: center; color: var(--muted); padding: 38px 20px; font-size: .92rem; line-height: 1.5; }
.empty .big { font-size: 2.4rem; margin-bottom: 10px; }

.info-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; font-size: .92rem;
  border-bottom: 1px solid var(--border); }
.info-line:last-child { border-bottom: none; }
.info-line .k { color: var(--muted); }
code.url { background: var(--rose-light); color: var(--rose-dark); padding: 3px 10px;
  border-radius: 8px; font-size: .95rem; font-weight: 700; }

/* Hover, Fokus, Tastatur */
@media (hover: hover) {
  .row:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
  .chip:hover:not(.active) { border-color: var(--rose); color: var(--rose-dark); }
  .tab:hover { color: var(--rose-dark); }
  .preset:hover { border-color: var(--rose); }
  .icon-btn:hover { background: var(--rose-light); }
}
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .row:focus-visible {
  outline: 2px solid var(--rose); outline-offset: 2px;
}
.row { outline: none; }

/* Einstiegshinweis auf der Startseite */
.hint-card { background: var(--rose-soft); border-color: var(--rose-light); font-size: .9rem; line-height: 1.45; }
.hint-card b { color: var(--rose-dark); }
.hint-card .hint-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.hint-card .hint-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--rose-dark); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; font-weight: 800; }
.hint-card .close { margin-top: 10px; display: flex; justify-content: flex-end; }

/* Hilfeseite */
.help h3 { font-size: 1rem; font-weight: 800; margin: 0 0 6px; color: var(--rose-dark); }
.help p { font-size: .92rem; line-height: 1.5; margin: 0 0 6px; }
.help kbd { background: var(--rose-light); border-radius: 6px; padding: 1px 7px; font-family: inherit; font-size: .85em; color: var(--rose-dark); font-weight: 700; }

/* Menü-Zeilen unter "Mehr" */
.menu-row { padding: 15px 16px; }
.menu-row .ico { font-size: 1.35rem; width: 40px; height: 40px; border-radius: 12px; background: var(--rose-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-row .arrow { color: var(--muted); font-size: 1.3rem; }

/* Aufklappbare Formularbereiche */
details.group { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card);
  padding: 0 12px; margin-bottom: 12px; }
details.group summary { padding: 12px 0; font-size: .85rem; font-weight: 700; color: var(--rose-dark);
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.group summary::-webkit-details-marker { display: none; }
details.group summary::after { content: "+"; color: var(--muted); }
details.group[open] summary::after { content: "\2212"; }
details.group .field:last-child { margin-bottom: 12px; }

/* Status-Auswahl im Dialog */
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice button { border: 1px solid var(--border); background: var(--card); border-radius: 14px;
  padding: 14px; font-size: 1rem; font-weight: 700; cursor: pointer; color: var(--text); text-align: left; }
.choice button.active { border-color: var(--rose); background: var(--rose-light); color: var(--rose-dark); }

/* Kurze Rückmeldung unten (kein Pop-up, verschwindet von selbst) */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px;
  font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-lift); max-width: 90vw;
  pointer-events: none; opacity: 1; transition: opacity .3s;
}
#toast.error { background: var(--red); color: #fff; }

/* Tische visualisiert: runde Tische mit Stühlen */
.room { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.table-viz { position: relative; aspect-ratio: 1; cursor: pointer; }
.table-viz .disc {
  position: absolute; inset: 22%; border-radius: 50%; background: var(--card); border: 2px solid var(--border);
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px;
}
.table-viz.full .disc { border-color: var(--gold); }
.table-viz.over .disc { border-color: var(--red); background: var(--red-bg); }
.table-viz .disc .name { font-weight: 800; font-size: .85rem; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.table-viz .disc .cnt { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.table-viz .seat {
  position: absolute; width: 14%; height: 14%; border-radius: 50%; background: var(--card); border: 2px solid var(--border);
  transform: translate(-50%, -50%);
}
.table-viz .seat.taken { background: var(--rose); border-color: var(--rose); }
.table-viz .seat.extra { background: var(--red); border-color: var(--red); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: -6px 2px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); display: inline-block; }
.legend i.taken { background: var(--rose); border-color: var(--rose); }
.legend i.extra { background: var(--red); border-color: var(--red); }

/* Kinder im Formular */
.kid-row { display: grid; grid-template-columns: 1fr 88px; gap: 8px; margin-bottom: 6px; }

/* ---- PC-Layout: Seitenleiste statt unterer Leiste ---- */
@media (min-width: 900px) {
  body { padding-left: 240px; padding-bottom: 40px; }
  body.has-fab { padding-bottom: 110px; }
  #tabbar {
    top: 0; right: auto; width: 240px; flex-direction: column; align-items: stretch;
    border-top: none; border-right: 1px solid var(--border); padding: 20px 14px; gap: 4px;
    background: var(--card); backdrop-filter: none;
  }
  #tabbar .brand { display: flex; flex-direction: column; padding: 6px 12px 20px; }
  #tabbar .brand-name { font-family: var(--serif); font-weight: 600; color: var(--rose-dark); font-size: 1.45rem; letter-spacing: .01em; }
  #tabbar .brand-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; font-weight: 600; }
  .tab { flex: 0 0 auto; flex-direction: row; gap: 12px; padding: 11px 14px; font-size: .95rem; border-radius: 12px; text-align: left; }
  .tab.active { background: var(--rose-light); }
  .tab .ico { font-size: 1.1rem; width: 24px; text-align: center; padding: 0; background: none !important; }
  #topbar { padding-left: 28px; padding-right: 28px; }
  #topbar h1 { font-size: 1.35rem; }
  #view { max-width: 900px; padding: 24px 28px 32px; }
  #fab { right: 32px; bottom: 32px; }
  #toast { bottom: 32px; }
  .stat-grid { gap: 12px; }
  .money-summary { grid-template-columns: repeat(4, 1fr); }
  #countdown-card { padding: 34px 16px 30px; }
  #countdown-card .names { font-size: 2.4rem; }
  #countdown-card .days { font-size: 3.6rem; }
}

/* Druck: nur der Inhalt, ohne App-Rahmen */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  #topbar, #tabbar, #fab, #modal-backdrop, #toast, .no-print { display: none !important; }
  #view { max-width: none; padding: 0; }
  .card, .row { box-shadow: none; break-inside: avoid; }
  .print-title { display: block !important; font-size: 1.3rem; margin-bottom: 12px; }
}
.print-title { display: none; }

/* ---- Sitzplan: eckige Tische, reservierte Plätze, Drag & Drop ---- */
.table-viz.eckig .disc { border-radius: 18%; }
.table-viz .seat.reserved { background: var(--gold); border-color: var(--gold); }
.legend i.reserved { background: var(--gold); border-color: var(--gold); }
[data-drag] { cursor: grab; }
[data-drag].dragging { opacity: .4; }
.drop-over { outline: 2px dashed var(--rose); outline-offset: 3px; border-radius: var(--radius); }
.table-viz.drop-over { outline: none; }
.table-viz.drop-over .disc { border-color: var(--rose); background: var(--rose-light); }
.move-btn { border: 1px solid var(--border); background: var(--card); color: var(--rose-dark); border-radius: 99px;
  font-size: .78rem; font-weight: 700; padding: 5px 10px; cursor: pointer; margin-left: auto; }
.seat-actions { display: flex; gap: 8px; margin: 4px 0 12px; }
.seat-actions .btn { flex: 1; padding: 11px 12px; font-size: .88rem; }
.proposal-table { border-top: 1px solid var(--border); padding: 10px 0; }
.proposal-table:first-child { border-top: none; }
.proposal-table .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.proposal-table .who { font-size: .82rem; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* ---- Sitzplan: Plätze mit Initialen, Ablage, Ziehen mit Finger/Maus ---- */
.room-scroll { overflow-x: auto; margin: 0 -14px 8px; padding: 4px 14px 8px; scrollbar-width: thin; }
.room { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 8px; }
.room.fixed { grid-auto-flow: row; }
.table-viz { min-width: 150px; }
.table-viz .disc { inset: 24%; cursor: grab; }
.table-viz .disc .name { font-size: .8rem; }
.table-viz .seat {
  width: 21%; height: 21%; display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 800; letter-spacing: .01em; color: var(--on-accent); user-select: none; -webkit-user-select: none;
  transition: transform .15s, box-shadow .15s;
}
.table-viz .seat.person { background: var(--rose); border-color: var(--rose); color: #fff; cursor: grab; }
.table-viz .seat.person.first { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.table-viz .seat.kid { background: var(--rose-light); border-color: var(--rose); color: var(--rose-dark); }
.table-viz .seat.plus { background: var(--card); border: 2px dashed var(--rose); color: var(--rose-dark); }
.table-viz .seat.reserved { background: var(--gold); border-color: var(--gold); color: #fff; cursor: default; }
.table-viz .seat.free { cursor: copy; }
.table-viz .seat.extra { background: var(--red); border-color: var(--red); color: #fff; }
.table-viz .seat.target { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 4px var(--rose-light), var(--shadow-lift); z-index: 2; }
@keyframes seat-pop { 0% { transform: translate(-50%, -50%) scale(1.5); } 100% { transform: translate(-50%, -50%) scale(1); } }
.table-viz .seat.pop { animation: seat-pop .4s cubic-bezier(.2,.8,.3,1.2); }
.table-viz.drop-target .disc { border-color: var(--rose); background: var(--rose-light); transform: scale(1.04); }
.table-viz.drop-target.swap .disc { border-color: var(--gold); background: var(--gold-light); }
.table-viz .disc { transition: transform .15s, border-color .15s, background .15s; }
.drag-ghost {
  position: fixed; z-index: 100; pointer-events: none; transform: translate(-50%, -50%) scale(1.06);
  background: var(--rose-dark); color: var(--on-accent); padding: 9px 16px; border-radius: 99px; font-weight: 700; font-size: .88rem;
  box-shadow: var(--shadow-lift); white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.drag-ghost .ini { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: .7rem; }
body.dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.dragging * { cursor: grabbing !important; }

.tray {
  position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 25;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 10px 76px 6px 12px; margin-top: 14px; transition: border-color .15s, background .15s;
}
.tray.drop-target { border-color: var(--rose); background: var(--rose-soft); }
.tray .head { display: flex; justify-content: space-between; align-items: center; font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.tray .chips { padding-bottom: 4px; margin: 0; }
.tray-chip {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 99px;
  padding: 5px 12px 5px 5px; background: var(--bg); cursor: grab; user-select: none; -webkit-user-select: none; white-space: nowrap;
  font-size: .85rem; font-weight: 600; flex-shrink: 0;
}
.tray-chip .ini { width: 30px; height: 30px; border-radius: 50%; background: var(--rose); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 800; }
.tray-chip .n { color: var(--muted); font-size: .75rem; font-weight: 700; }
.tray-chip.lifted { opacity: .35; }
.tray .empty-tray { font-size: .85rem; color: var(--green); font-weight: 700; padding: 4px 0 8px; }

.grid-ctl { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.grid-ctl .lbl { font-size: .74rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.grid-ctl .seg { padding: 2px; gap: 2px; display: inline-flex; width: auto; }
.grid-ctl .seg button { flex: 0 0 auto; padding: 6px 12px; font-size: .8rem; min-width: 36px; white-space: nowrap; }
.seat-actions .btn.ghost { flex: 0 0 auto; border: 1px solid var(--border); color: var(--rose-dark); }

#toast.with-action { pointer-events: auto; padding-right: 8px; }
#toast .toast-btn { margin-left: 10px; background: rgba(255,255,255,.15); color: inherit; border: none; border-radius: 99px; padding: 5px 12px; font-weight: 800; cursor: pointer; font-size: .82rem; }
@media (min-width: 900px) { .tray { bottom: 16px; } .table-viz .seat { font-size: .66rem; } }

/* Ablage: Suche, Liste, Auswahl per Antippen */
.hintline { font-size: .78rem; color: var(--muted); line-height: 1.5; margin: -4px 2px 14px; }
.hintline b { color: var(--text); font-weight: 700; }
.tray-search { border: 1px solid var(--border); border-radius: 99px; background: var(--bg); color: var(--text); padding: 6px 12px; font-size: .85rem; width: 150px; font-weight: 600; }
.tray-search:focus { outline: 2px solid var(--rose); border-color: transparent; }
.tray-toggle { width: 32px; height: 32px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg); color: var(--rose-dark); font-size: 1rem; cursor: pointer; }
.tray .chips.wrap { flex-wrap: wrap; overflow: visible; max-height: 40vh; overflow-y: auto; }
.tray.expanded { padding-right: 12px; }
.tray.expanded .chips.wrap { padding-right: 64px; }
.tray-chip.picked { background: var(--rose-dark); color: var(--on-accent); border-color: var(--rose-dark); }
.tray-chip.picked .n { color: inherit; opacity: .8; }
.tray-chip.picked .ini { background: rgba(255,255,255,.25); }
.pick-banner { display: flex; align-items: center; gap: 10px; background: var(--rose-light); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; font-size: .85rem; }
.pick-banner .ini { width: 30px; height: 30px; border-radius: 50%; background: var(--rose-dark); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 800; flex-shrink: 0; }
.pick-banner .grow { flex: 1; min-width: 0; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(176,102,122,.45); } 50% { box-shadow: 0 0 0 6px rgba(176,102,122,0); } }
body.picking .table-viz .seat.free { border-color: var(--rose); animation: pulse 1.4s infinite; cursor: pointer; }
body.picking .table-viz .disc { border-style: dashed; cursor: pointer; }
