/* ── Für uns zwei ─────────────────────────────────────────── */
:root {
  --cream: #faf3ea;
  --cream-card: #f5ece1;
  --rose: #e8d3d3;
  --rose-strong: #c98a96;
  --sage: #dde5d8;
  --sage-strong: #8aa183;
  --ink: #3b2f2a;
  --ink-soft: #6e5f56;
  --choco: #38271f;
  --white: #fffdf9;
  --shadow: 0 10px 30px rgba(59, 47, 42, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Nunito Sans", -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  width: min(960px, 100% - 32px);
  margin: 0 auto;
  flex: 1;
}

h1, h2, h3, .result-title, .brand span {
  font-family: "Playfair Display", Georgia, serif;
}

/* ── Topbar ── */
.topbar {
  width: min(960px, 100% - 32px);
  margin: 0 auto;
  padding: 20px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  background: none; border: none; cursor: pointer;
  color: var(--ink);
  display: flex; align-items: center; gap: 9px;
}
.brand-heart { font-size: 1.15rem; }
.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700; font-size: 1.25rem;
  white-space: nowrap;
}
.brand-tag {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rose-strong);
  background: var(--rose); padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.topnav {
  display: flex; gap: 2px;
  background: var(--white);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}
.nav-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft);
  padding: 8px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { color: var(--ink); }
.nav-btn.active {
  background: linear-gradient(120deg, var(--rose-strong), #b87a8d);
  color: #fff;
  box-shadow: 0 3px 10px rgba(201, 138, 150, 0.35);
}
@media (max-width: 640px) {
  .topbar { flex-direction: column; gap: 12px; padding: 18px 0 6px; }
  .brand { justify-content: center; }
  .brand-name { font-size: 1.45rem; }
  .topnav { width: 100%; border-radius: 18px; }
  .nav-btn {
    flex: 1; flex-direction: column; gap: 2px;
    padding: 8px 4px; border-radius: 14px;
  }
  .nav-ico { font-size: 1.15rem; }
  .nav-label { font-size: 0.74rem; }
}

/* ── Views ── */
.view { display: none; padding-bottom: 40px; animation: fadeIn 0.3s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { text-align: center; padding: 36px 0 24px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 700; white-space: nowrap; }
.hero h1 em { color: var(--rose-strong); }
.hero-tag {
  display: inline-block; margin-top: 10px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--rose-strong);
  background: var(--rose); padding: 4px 14px; border-radius: 999px;
}
.lead { color: var(--ink-soft); margin-top: 12px; font-size: 1.05rem; }

/* ── Filterbar ── */
.filterbar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 24px;
  margin-bottom: 24px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 14px 0 10px;
}
.fcell {
  background: var(--cream);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 9px 4px 8px;
  cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color 0.15s, background 0.15s;
}
.fcell:hover { border-color: var(--rose); }
.fcell.open { border-color: var(--rose-strong); background: var(--white); }
.fcell-label {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
  white-space: nowrap;
}
.fcell-value { font-size: 0.82rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.fcell.set .fcell-value { color: var(--rose-strong); }
.filter-group {
  display: none;
  padding: 4px 0 10px;
  justify-content: center;
  grid-column: 1 / -1; /* im Grid: volle Breite unter der angeklickten Zeile */
}
.filter-group.show { display: flex; animation: fadeIn 0.18s ease; }
.filter-group .chips { justify-content: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--rose);
  background: none; cursor: pointer; font: inherit;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  padding: 5px 13px; border-radius: 999px;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--rose-strong); color: var(--ink); }
.chip.active {
  background: linear-gradient(120deg, var(--rose-strong), #b87a8d);
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(201, 138, 150, 0.35);
}
.filter-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 0 14px;
  border-top: 1px solid var(--cream-card);
}
.filter-count { font-size: 0.85rem; font-weight: 600; color: var(--sage-strong); }
.filter-reset {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
  padding: 4px;
}
.filter-reset:hover { color: var(--rose-strong); }
@media (max-width: 640px) {
  .filterbar { padding: 0 14px; }
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 7.4vw; }
}

/* ── Result card ── */
.result-card, .swipe-card {
  background: linear-gradient(135deg, var(--rose) 0%, var(--cream-card) 50%, var(--sage) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 28px;
  text-align: center;
  margin-bottom: 28px;
}
.result-card.spinning .result-inner { animation: spin-pulse 0.09s linear infinite; }
@keyframes spin-pulse { 0% { opacity: 1; } 50% { opacity: 0.45; } 100% { opacity: 1; } }
.result-emoji { font-size: 2.4rem; margin-bottom: 8px; }
.result-cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px;
}
.result-title { font-size: clamp(1.7rem, 4.5vw, 2.5rem); font-weight: 700; margin-bottom: 12px; }
.result-desc { color: var(--ink-soft); max-width: 560px; margin: 0 auto 16px; line-height: 1.55; }
.result-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.badge {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px; padding: 4px 12px;
  font-size: 0.8rem; font-weight: 600; color: var(--ink-soft);
}
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: none; border-radius: 999px;
  padding: 13px 24px;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59, 47, 42, 0.12); }
.btn:active { transform: none; }
.btn-primary { background: var(--white); color: var(--ink); border: 1.5px solid rgba(59,47,42,0.12); }
.btn-ghost { background: rgba(255,255,255,0.5); color: var(--ink-soft); }
.icon-btn { padding: 13px 16px; font-size: 1rem; }
.icon-btn.on { background: var(--rose-strong); color: #fff; }
.btn-wide { width: 100%; }
.btn-block {
  width: 100%;
  border: none; cursor: pointer; font: inherit;
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-block:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(59, 47, 42, 0.12); }
.bb-title { font-weight: 800; font-size: 1.08rem; }
.bb-sub { font-size: 0.8rem; color: var(--ink-soft); }
.btn-random {
  background: var(--white);
  box-shadow: var(--shadow);
  margin: 40px 0 12px;
}
.btn-random .bb-grad {
  background: linear-gradient(90deg, var(--rose-strong), var(--sage-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cat-card.depleted { opacity: 0.45; }
.cat-all {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, var(--rose) 0%, var(--cream-card) 50%, var(--sage) 100%);
}
.btn-dark {
  background: var(--choco); color: var(--cream);
}
.btn-dark .bb-sub { color: rgba(250, 243, 234, 0.65); }

/* ── Category grid ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.cat-card {
  border: none; cursor: pointer; text-align: left;
  border-radius: var(--radius);
  padding: 22px;
  font: inherit; color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card.tone-rose { background: var(--rose); }
.cat-card.tone-sage { background: var(--sage); }
.cat-card .cat-emoji { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.cat-card h3 { font-size: 1.45rem; font-weight: 700; margin-bottom: 4px; }
.cat-card p { font-size: 0.85rem; color: var(--ink-soft); }

/* ── Progress ── */
.progress-wrap { margin-top: 28px; text-align: center; }
.progress-text { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.progress-bar {
  height: 8px; border-radius: 999px;
  background: var(--cream-card); overflow: hidden;
  max-width: 420px; margin: 0 auto;
}
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--rose-strong), var(--sage-strong));
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ── Match-Modus ── */
.match-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.match-names { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.match-names input { flex: 1; min-width: 160px; }
input, select, textarea {
  font: inherit; color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--rose);
  border-radius: 14px;
  padding: 12px 16px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rose-strong); border-color: transparent; }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 18px; }
.match-section { margin-bottom: 18px; }
.match-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 9px;
}
.mchips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mchip {
  border: 1.5px solid var(--rose);
  background: none; cursor: pointer; font: inherit;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 13px; border-radius: 999px;
  transition: all 0.15s;
}
.mchip:hover { border-color: var(--rose-strong); color: var(--ink); }
.mchip.active {
  background: linear-gradient(120deg, var(--rose-strong), #b87a8d);
  border-color: transparent; color: #fff;
}
#matchFilterSlot .filterbar {
  box-shadow: none;
  border: 1.5px solid var(--cream-card);
  margin-bottom: 0;
}
.match-turn { font-family: "Playfair Display", serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.match-progress { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 16px; }
.swipe-card { margin-bottom: 18px; animation: cardIn 0.25s ease; }
@keyframes cardIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.swipe-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.swipe-no { background: var(--cream-card); color: var(--ink-soft); flex: 1; max-width: 240px; }
.swipe-yes { background: var(--rose-strong); color: #fff; flex: 1; max-width: 240px; }
.handover-emoji { font-size: 3rem; margin-bottom: 10px; }
#matchHandover h2, #matchResult h2 { margin-bottom: 10px; }
#matchHandover p { color: var(--ink-soft); margin-bottom: 20px; }
.match-list { margin: 18px 0; display: grid; gap: 10px; text-align: left; }
.match-item {
  background: var(--cream);
  border-radius: 14px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
}
.match-item.winner { outline: 2.5px solid var(--rose-strong); background: var(--rose); }
.match-item .mi-emoji { font-size: 1.4rem; }
.match-item .mi-title { font-weight: 700; }
.match-item .mi-cat { font-size: 0.78rem; color: var(--ink-soft); }

/* ── Liste ── */
.list-controls { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.list-controls input[type="search"] { flex: 2; min-width: 200px; }
.list-controls select { flex: 1; min-width: 160px; }
.list-cat-header {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem; font-weight: 700;
  margin: 26px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.idea-row {
  background: var(--white);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 8px rgba(59,47,42,0.04);
}
.idea-row.done-row { opacity: 0.62; }
.idea-row.veto-row { opacity: 0.45; }
.idea-main { flex: 1; min-width: 0; }
.idea-title { font-weight: 700; }
.idea-title .done-check { color: var(--sage-strong); }
.idea-desc { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.idea-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.idea-badges .badge { background: var(--cream); font-size: 0.72rem; padding: 2px 9px; }
.idea-actions { display: flex; gap: 4px; flex-shrink: 0; }
.mini-btn {
  background: var(--cream); border: none; cursor: pointer;
  border-radius: 10px; padding: 8px 10px; font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
}
.mini-btn:hover { transform: scale(1.08); }
.mini-btn.on { background: var(--rose-strong); }

/* ── Sammlung ── */
.collection-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; justify-content: center; }
.tab {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--cream-card); color: var(--ink-soft);
  border: none; border-radius: 999px; padding: 10px 18px;
  transition: all 0.15s;
}
.tab.active { background: var(--choco); color: var(--cream); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }
.empty-note { text-align: center; color: var(--ink-soft); padding: 24px; font-style: italic; }
.done-date { font-size: 0.78rem; color: var(--sage-strong); font-weight: 700; }

.custom-form {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.custom-form h3 { font-size: 1.2rem; }
.custom-row { display: flex; gap: 8px; flex-wrap: wrap; }
.custom-row select { flex: 1; min-width: 120px; }

/* ── Toast & Footer ── */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(80px);
  background: var(--choco); color: var(--cream);
  padding: 12px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

footer {
  text-align: center; color: var(--ink-soft);
  font-size: 0.82rem; padding: 28px 16px;
}

@media (max-width: 560px) {
  .result-card, .swipe-card { padding: 28px 18px; }
  .match-panel { padding: 20px 16px; }
  .idea-actions { flex-direction: column; }
}
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-card { padding: 14px; border-radius: 18px; }
  .cat-card .cat-emoji { font-size: 1.35rem; margin-bottom: 6px; }
  .cat-card h3 { font-size: 1.08rem; }
  .cat-card p { font-size: 0.74rem; }
}
