:root {
  /* Palette: Gold, Orange, Altrosa, Schiefergrau */
  --gold: #E0B451;
  --orange: #EE9452;
  --rose: #D39BA0;
  --slate: #777E88;

  --paper: #FBF7F1;
  --surface: #FFFFFF;
  --ink: #2C2E33;
  --ink-soft: #6E747E;
  --line: #ECE3D7;

  --brand: var(--orange);
  --brand-dark: #D9722E;
  --brand-ink: #B25A20;        /* dunkles Orange für lesbaren Text/Icons auf Hell */
  --brand-soft: #FCEAD9;
  --warm-grad: linear-gradient(150deg, #E7B656 0%, #EE9452 100%);

  --champagne: var(--gold);
  --champagne-soft: #FBEFD6;
  --gold-soft: #FBEFD6;
  --rose-soft: #F4E3E5;
  --slate-soft: #EAECEF;
  --blush: var(--rose-soft);

  --confirm: var(--gold);
  --pending: var(--slate);
  --decline: var(--rose);
  --danger: #C26A62;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 8px 30px rgba(44, 46, 51, 0.10);
  --shadow-sm: 0 2px 10px rgba(44, 46, 51, 0.06);
  --maxw: 680px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 66px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body { padding-bottom: calc(var(--nav-h) + 28px + var(--safe-b)); }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + var(--safe-t)) 18px 14px;
  background: rgba(251,247,241,0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: var(--warm-grad);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 28px;
  line-height: 1;
  padding-bottom: 3px;
  box-shadow: var(--shadow-sm);
  text-shadow: 0 1px 2px rgba(120, 60, 10, 0.35);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
}
.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Main ---------- */
.app-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 16px 0;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: "Fraunces", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}
.stat.accent .stat-num { color: var(--brand-ink); }
.stat.headcount {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  background: var(--warm-grad);
  border: none;
  color: var(--ink);
}
.stat.headcount .stat-num { color: var(--ink); font-size: 26px; }
.stat.headcount .stat-label { color: rgba(44,46,51,0.68); margin: 0; font-size: 12.5px; }

/* ---------- Toolbar ---------- */
.toolbar { margin-bottom: 14px; }
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.search input {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 0;
  font: inherit;
  color: var(--ink);
  outline: none;
}
.search input::placeholder { color: var(--ink-soft); }

.filters { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--ink); font-weight: 600; }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Guest list ---------- */
.guest-list { display: flex; flex-direction: column; gap: 10px; }
.group-head {
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 14px 4px 2px;
  font-weight: 600;
}
.group-head:first-child { margin-top: 0; }

.guest-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.guest-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #e0d8cd; }
.guest-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-size: 17px;
  font-weight: 500;
  background: var(--champagne-soft);
  color: var(--champagne);
}
.guest-main { flex: 1; min-width: 0; }
.guest-name {
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guest-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guest-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.tag.plus { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); }
.tag.age { background: #eef0f3; border-color: transparent; color: #5b6470; }
.tag.kids { background: var(--blush); border-color: transparent; color: #7c544c; }
.tag.diet { background: var(--champagne-soft); border-color: transparent; color: #8a6a36; }

.status-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 1px; }
.status-zugesagt { background: var(--confirm); }
.status-offen { background: var(--pending); }
.status-abgesagt { background: var(--decline); }
.guest-card.is-abgesagt { opacity: 0.62; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 54px 24px;
  color: var(--ink-soft);
}
.empty-mark {
  font-family: "Fraunces", serif;
  font-size: 46px;
  color: var(--champagne);
  line-height: 1;
}
.empty h3 { font-family: "Fraunces", serif; font-weight: 500; font-size: 21px; color: var(--ink); margin: 14px 0 6px; }
.empty p { margin: 0 auto; max-width: 280px; font-size: 14.5px; }
.empty .btn-primary { margin-top: 20px; display: inline-flex; }

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  right: max(18px, calc(50% - var(--maxw) / 2 + 18px));
  bottom: calc(var(--nav-h) + 14px + var(--safe-b));
  z-index: 25;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: none;
  background: var(--warm-grad);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(217,114,46,0.34);
  transition: transform 0.14s;
}
.fab:hover { transform: scale(1.05); }
.fab:active { transform: scale(0.96); }
.fab:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }

/* ---------- Sheet ---------- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 39, 48, 0.42);
  z-index: 30;
  animation: fade 0.2s ease;
}
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--maxw);
  max-height: 92vh;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  z-index: 31;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(43, 39, 48, 0.22);
  animation: slideup 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideup { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 2px; }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-family: "Fraunces", serif; font-weight: 500; font-size: 20px; margin: 0; }
.text-btn { background: none; border: none; color: var(--brand-ink); font: inherit; font-weight: 500; cursor: pointer; padding: 6px; }
.text-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.sheet-body { padding: 16px 20px calc(24px + var(--safe-b)); overflow-y: auto; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink); }
.field > span em { color: var(--ink-soft); font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(217,114,46,0.16);
}
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Felder müssen in der Spalte schrumpfen dürfen (sonst überlaufen native Datum/Uhrzeit-Felder) */
.row.two > *, .row.plz > * { min-width: 0; }
.field input, .field select, .field textarea, .subfield input, .euro input { min-width: 0; max-width: 100%; }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; }
.field.group { border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: rgba(255,255,255,0.5); gap: 9px; }
.field.group .group-label { font-size: 13px; font-weight: 500; }
.row.plz { display: grid; grid-template-columns: 90px 1fr; gap: 9px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 10px; padding: 12px 0; }
.field.checkbox input { width: 20px; height: 20px; accent-color: var(--brand); }
.field.checkbox span { font-weight: 400; }

.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.btn-primary {
  flex: 1;
  border: none;
  background: var(--warm-grad);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 14px;
  border-radius: 13px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(0.99); }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  padding: 13px 16px;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: var(--brand-soft); }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: #f7ece9; border-color: var(--danger); }
:focus-visible { outline-offset: 2px; }
.btn-primary:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--brand); }

/* ---------- Menu sheet ---------- */
.menu-section { padding: 18px 0; border-top: 1px solid var(--line); }
.menu-section:first-of-type { border-top: none; padding-top: 8px; }
.menu-section-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 10px;
}
.field-label { display: block; font-size: 13px; font-weight: 500; margin: 14px 0 6px; }
.field-label em { color: var(--ink-soft); font-style: normal; font-weight: 400; }
.menu-hint { font-size: 13px; color: var(--ink-soft); margin: 4px 0 14px; line-height: 1.5; }
.menu-actions { display: flex; flex-direction: column; gap: 10px; }
.menu-actions .btn-ghost, .menu-actions .btn-primary { width: 100%; text-align: center; }

.connect-row { display: flex; gap: 8px; margin-top: 12px; }
.connect-row input {
  flex: 1; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 12px 13px; outline: none;
}
.connect-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217,114,46,0.16); }
.connect-row .btn-ghost { flex: none; }

.sync-state { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.sync-status { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sync-status.ok { background: var(--confirm); }
.sync-status.syncing { background: var(--pending); animation: pulse 1s ease-in-out infinite; }
.sync-status.offline { background: var(--decline); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.code-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--champagne-soft); border: 1px solid #ecdfc8;
  border-radius: 11px; padding: 8px 8px 8px 13px;
}
.code-box code {
  flex: 1; font-family: "DejaVu Sans Mono", ui-monospace, monospace;
  font-size: 12.5px; color: #7a5e2e; word-break: break-all; line-height: 1.4;
}
.btn-ghost.small { padding: 8px 13px; font-size: 13px; flex: none; }
.text-btn.danger { color: var(--danger); display: inline-block; margin-top: 14px; padding-left: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 80px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 40;
  box-shadow: var(--shadow);
  animation: toastin 0.25s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat.headcount { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  z-index: 22; display: flex;
  background: rgba(251,247,241,0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border: none; background: none; color: var(--ink-soft);
  font: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer; padding: 8px 0;
  transition: color 0.15s;
}
.nav-item svg { opacity: 0.8; }
.nav-item.is-active { color: var(--brand-ink); }
.nav-item.is-active svg { opacity: 1; }
.nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; border-radius: 8px; }

/* ---------- Locations: Kalkulationsgrundlage ---------- */
.loc-basis {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.loc-basis-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.loc-basis-row label { color: var(--ink-soft); }
.loc-basis-row input {
  width: 76px; font: inherit; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; text-align: center; outline: none;
}
.loc-basis-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217,114,46,0.16); }
.loc-basis-hint { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 0; }
.sort-label { font-size: 13px; color: var(--ink-soft); align-self: center; margin-right: 2px; flex: none; }

/* ---------- Location cards ---------- */
.loc-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  text-align: left; width: 100%; font: inherit; color: inherit;
}
.loc-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #e0d8cd; }
.loc-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.loc-card.is-best { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm); }
.loc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.loc-headline { min-width: 0; }
.loc-name { font-weight: 600; font-size: 16px; line-height: 1.25; }
.loc-rating { color: var(--champagne); font-size: 13px; letter-spacing: 1px; margin-top: 2px; }
.loc-city { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.loc-price { text-align: right; flex: none; }
.loc-price .amount { font-family: "Fraunces", serif; font-weight: 500; font-size: 21px; line-height: 1; color: var(--brand-dark); white-space: nowrap; }
.loc-price .amount.empty { color: var(--ink-soft); font-size: 15px; }
.loc-price .per { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.loc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.loc-status { font-size: 11.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); }
.loc-status.gebucht { background: var(--gold-soft); border-color: transparent; color: #9A6A12; }
.loc-status.angebot, .loc-status.besichtigt { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.loc-status.abgesagt { background: var(--rose-soft); border-color: transparent; color: #9b5d61; }
.best-badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: var(--ink); }
.cap-info { font-size: 12px; color: var(--ink-soft); }
.cap-info.warn { color: var(--danger); font-weight: 600; }
.loc-card.is-abgesagt { opacity: 0.6; }
.price-breakdown { font-size: 12px; color: var(--ink-soft); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* Euro-Eingaben */
.subfield { display: flex; flex-direction: column; gap: 6px; }
.subfield > span { font-size: 13px; font-weight: 500; }
.subfield > span em { color: var(--ink-soft); font-style: normal; font-weight: 400; }
.euro { position: relative; }
.euro input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 12px 30px 12px 13px; outline: none; }
.euro input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217,114,46,0.16); }
.euro i { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-style: normal; }

/* ---------- Erweiterte Location-Felder ---------- */
.group-total { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.trauung-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: end; }
.trauung-row + .trauung-row { margin-top: 10px; }
.trauung-row .field.checkbox { padding: 10px 0; margin: 0; }
.trauung-cost { }
.trauung-cost > span { font-size: 12px; color: var(--ink-soft); }

/* Kalkulationsgrundlage mit Kategorien */
.basis-title { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 10px; }
.basis-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.basis-cat { display: flex; flex-direction: column; gap: 5px; }
.basis-cat > span { font-size: 11.5px; color: var(--ink-soft); text-align: center; }
.basis-cat input {
  width: 100%; font: inherit; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 6px; text-align: center; outline: none;
}
.basis-cat input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217,114,46,0.16); }

/* ---------- Alterskategorien (Altersgrenze + Preis) ---------- */
.cat-row { display: grid; grid-template-columns: 86px 96px 1fr; gap: 8px; align-items: center; }
.cat-row + .cat-row { margin-top: 10px; }
.cat-name { font-size: 13.5px; font-weight: 500; }
.cat-age { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.cat-age input {
  width: 44px; text-align: center; padding: 9px 4px; font: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); outline: none;
}
.cat-age input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217,114,46,0.16); }
.cat-hint { margin: 9px 0 0; font-size: 12px; color: var(--ink-soft); }
.basis-title em { font-style: normal; color: var(--ink-soft); font-weight: 400; font-size: 12px; }
.loc-counts { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Budget / Ausgaben ---------- */
.budget-bar {
  height: 9px; border-radius: 999px; background: var(--slate-soft);
  overflow: hidden; margin: 12px 0 4px;
}
.budget-bar span {
  display: block; height: 100%; width: 0;
  background: var(--warm-grad); border-radius: 999px;
  transition: width 0.35s ease;
}
.budget-bar.over span { background: var(--danger); }
#budgetBox .euro input { width: 130px; text-align: right; padding-right: 28px; }
#budgetBox .loc-basis-row { justify-content: space-between; }

.exp-group-sub { font-weight: 500; color: var(--ink-soft); }

.exp-card {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  width: 100%; font: inherit; color: inherit; text-align: left;
}
.exp-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #e0d8cd; }
.exp-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.exp-card.is-paid { opacity: 0.78; }
.exp-main { min-width: 0; }
.exp-title { font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.exp-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.exp-right { text-align: right; flex: none; }
.exp-amount { font-family: "Fraunces", serif; font-weight: 500; font-size: 18px; color: var(--ink); white-space: nowrap; }
.exp-status { display: block; font-size: 11.5px; font-weight: 500; margin-top: 4px; }
.exp-status.paid { color: #9A6A12; }
.exp-status.partial { color: var(--brand-ink); }
.exp-status.open { color: var(--ink-soft); }

/* Status 'Termin geplant' + Besichtigungs-Datum-Tag */
.loc-status.termin { background: var(--slate-soft); border-color: transparent; color: #565b64; }
.tag.tag-date { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- Visionboard / Ideen ---------- */
.idea-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.idea-grid.is-empty { display: block; }

.idea-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  text-align: left; font: inherit; color: inherit; padding: 0;
}
.idea-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #e0d8cd; }
.idea-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.idea-photo { width: 100%; aspect-ratio: 1 / 1; background: var(--paper); overflow: hidden; }
.idea-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idea-photo--empty { display: grid; place-items: center; color: #cbb9a3; background: var(--gold-soft); }

.idea-fav {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 999px;
  background: rgba(255,255,255,0.9); color: var(--ink-soft);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(4px);
}
.idea-fav.is-on { color: var(--rose); }
.idea-fav:hover { color: var(--rose); }

.idea-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.idea-title { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.idea-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.idea-cat { font-size: 11px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.idea-price { font-family: "Fraunces", serif; font-size: 14px; color: var(--brand-dark); margin-left: auto; }

/* Foto-Upload im Formular */
.photo-area {
  position: relative; width: 100%; min-height: 150px; border-radius: var(--radius-sm);
  border: 1.5px dashed #d8cdbb; background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--ink-soft); cursor: pointer; overflow: hidden;
}
.photo-area span { font-size: 13.5px; }
.photo-area.has-photo { border-style: solid; cursor: default; min-height: 0; }
.photo-area.has-photo img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: none;
  border-radius: 999px; background: rgba(44,46,51,0.62); color: #fff; cursor: pointer;
  font-size: 15px; line-height: 1; display: grid; place-items: center;
}

/* ---------- PDF-Upload (Location) ---------- */
.pdf-area {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px dashed #d8cdbb; background: var(--paper);
  color: var(--ink-soft); cursor: pointer;
}
.pdf-area.has-file { border-style: solid; cursor: default; }
.pdf-area span { font-size: 13.5px; }
.pdf-icon {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--decline);
  padding: 3px 7px; border-radius: 6px; flex: none; letter-spacing: 0.3px;
}
.pdf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pdf-open { border: none; background: var(--brand-soft); color: var(--brand-ink); font: inherit; font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 9px; cursor: pointer; flex: none; }
.pdf-remove { border: none; background: none; color: var(--ink-soft); font-size: 15px; cursor: pointer; flex: none; padding: 4px; }
.tag.tag-pdf { background: var(--rose-soft); color: #9b5d61; font-weight: 600; }

/* ---------- Navigation: fünf Punkte etwas kompakter ---------- */
.bottom-nav .nav-item { font-size: 10.5px; gap: 2px; }

/* ---------- Kalender / Termine ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-title { font-family: "Fraunces", serif; font-size: 19px; font-weight: 500; text-transform: capitalize; }
.cal-nav {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.cal-nav:hover { border-color: var(--brand); color: var(--brand-ink); }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-weekdays span { text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-soft); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; border: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font: inherit;
  color: var(--ink); font-size: 14px; display: grid; place-items: center;
  transition: background 0.12s, border-color 0.12s;
}
.cal-day.out { color: #c3bcb1; background: transparent; border-color: transparent; }
.cal-day.today { border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
.cal-day.selected { background: var(--warm-grad); border-color: transparent; color: var(--ink); font-weight: 700; }
.cal-day.has-event::after {
  content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 999px; background: var(--brand);
}
.cal-day.selected.has-event::after { background: var(--ink); }
.cal-day.out.has-event::after { background: #d3c3b0; }

.cal-today-btn {
  margin: 12px auto 0; display: block; border: 1px solid var(--line); background: var(--surface);
  color: var(--brand-ink); font: inherit; font-weight: 600; font-size: 13px;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.cal-day-head { margin: 18px 0 10px; font-weight: 600; font-size: 15px; text-transform: capitalize; }
.cal-empty { color: var(--ink-soft); font-size: 14px; }

.cal-day-list { display: flex; flex-direction: column; gap: 8px; }
.cal-event {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.cal-event.manual { cursor: pointer; }
.cal-event.manual:hover { border-color: #e0d8cd; }
.cal-event.location { border-left: 3px solid var(--brand); }
.cal-event-time { font-size: 12.5px; font-weight: 600; color: var(--brand-ink); flex: none; min-width: 64px; padding-top: 1px; }
.cal-event-main { min-width: 0; flex: 1; }
.cal-event-title { display: block; font-weight: 600; font-size: 14.5px; }
.cal-event-notes { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.cal-event-tag { flex: none; font-size: 10.5px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; align-self: center; }

/* ---------- Navigation: sechs Punkte ---------- */
.bottom-nav .nav-item { font-size: 10px; gap: 2px; }

/* ---------- To-Dos / Aufgaben ---------- */
.todo-prog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.todo-prog-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.todo-prog-count { font-weight: 600; font-size: 15px; }
.todo-prog-pct { font-family: "Fraunces", serif; font-size: 20px; color: var(--brand-dark); }
.todo-prog-bar { height: 9px; border-radius: 999px; background: var(--paper); overflow: hidden; border: 1px solid var(--line); }
.todo-prog-bar > span { display: block; height: 100%; background: var(--warm-grad); border-radius: 999px; transition: width 0.3s ease; }
.todo-prog-stats { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.todo-prog-stats strong { color: var(--ink); font-weight: 600; }
.todo-prog-stats .is-overdue strong, .todo-prog-stats .is-overdue { color: var(--decline); }

.todo-card { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.todo-card.done { opacity: 0.62; }
.todo-check { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 8px; border: 1.8px solid #d8cdbb; background: var(--paper); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; }
.todo-check svg { opacity: 0; }
.todo-check.on { background: var(--warm-grad); border-color: transparent; color: var(--ink); }
.todo-check.on svg { opacity: 1; }
.todo-main { flex: 1; min-width: 0; cursor: pointer; }
.todo-title { font-weight: 600; font-size: 15px; line-height: 1.3; display: flex; align-items: center; gap: 7px; }
.todo-card.done .todo-title { text-decoration: line-through; text-decoration-color: var(--ink-soft); }
.todo-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; align-items: center; }
.todo-cat, .todo-assignee { font-size: 11px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.todo-due { font-size: 12px; color: var(--ink-soft); }
.todo-due.overdue { color: var(--decline); font-weight: 600; }
.todo-prio { flex: none; width: 9px; height: 9px; border-radius: 999px; background: var(--slate); }
.todo-prio.hoch { background: var(--decline); }
.todo-prio.mittel { background: var(--gold); }
.todo-prio.niedrig { background: var(--slate); }
