:root {
  --bg: #fbeff0;
  --card: #fffafa;
  --ink: #3d2b2f;
  --muted: #8a7276;
  --rose: #d9667b;
  --rose-soft: #f6d3d9;
  --line: #efd9dc;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(160, 80, 95, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, #fff6f2 0, transparent 50%), var(--bg);
  min-height: 100vh;
}
#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
small { color: var(--muted); }

/* ---------- Start ---------- */
.hero { text-align: center; padding: 36px 0 12px; }
.script {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(64px, 20vw, 96px);
  line-height: 1;
  margin: 0;
  color: var(--rose);
  text-shadow: 0 3px 0 rgba(217, 102, 123, .12);
}
.since { margin: 10px 0 0; color: var(--muted); }
.since b { color: var(--rose); font-size: 1.2em; }
.since-form { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; }
.since-form label { width: 100%; color: var(--muted); }

.banner {
  display: block;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--rose);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.banner.ok { background: #e7f4ea; color: #2f6b3d; box-shadow: none; text-align: center; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 14px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
  transition: transform .15s;
}
.tile:active { transform: scale(.97); }
.tile span { font-size: 28px; }

.section { margin: 28px 0 10px; font-size: 1rem; color: var(--muted); font-weight: 600; }
.dump-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.dump-row .dump-card { flex: 0 0 140px; scroll-snap-align: start; }
.dump-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dump-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dump-card img, .cover-empty { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: var(--rose-soft); font-size: 32px; }
.dump-card span { padding: 10px 12px 2px; font-weight: 600; }
.dump-card small { padding: 0 12px 10px; }
.notify { text-align: center; margin-top: 28px; }

/* ---------- Kopfzeile / Buttons ---------- */
.bar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 14px; }
.bar h2 { margin: 0; text-align: center; font-size: 1.25rem; }
.back { font-size: 34px; line-height: 1; color: var(--rose); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 18px;
  background: var(--rose); color: #fff; font-weight: 700; cursor: pointer;
}
.btn.ghost, button.ghost { background: transparent; color: var(--rose); border: 2px solid var(--rose-soft); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn.danger { background: transparent; color: #b0384e; border: 2px solid #f0c4cc; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; background: var(--card); border-radius: var(--radius); }

input, select {
  width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff;
}
input:focus, select:focus { outline: none; border-color: var(--rose); }
.since-form input { width: auto; }
.inline { display: flex; gap: 8px; margin-bottom: 16px; }
.inline .btn { flex-shrink: 0; }

/* ---------- Fotos ---------- */
.week { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.week h3 { margin: 0 0 10px; font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumb { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--rose-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(30, 18, 20, .94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 12px 70px;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-cap { color: #fff; text-align: center; margin-top: 10px; }
.lb-cap small { color: #d6c3c6; display: block; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; cursor: pointer; }
.lb-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 18px; }
.lb-prev, .lb-next { top: 50%; width: 44px; height: 44px; font-size: 28px; transform: translateY(-50%); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-del { bottom: 18px; padding: 8px 16px; }

/* ---------- Upload ---------- */
.upload { display: flex; flex-direction: column; gap: 14px; }
.upload label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.drop {
  border: 2px dashed var(--rose); border-radius: var(--radius); background: var(--card);
  padding: 28px; text-align: center; cursor: pointer; color: var(--rose);
}
.drop input { display: none; }
.preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.status { text-align: center; color: var(--muted); min-height: 1.2em; margin: 0; }

/* ---------- Kalender ---------- */
.cal { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head h3 { margin: 0; text-transform: capitalize; }
.cal-head button { border: 0; background: var(--rose-soft); color: var(--rose); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .wd { font-size: .75rem; color: var(--muted); padding-bottom: 4px; }
.day {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-weight: 600;
}
.day.today { outline: 2px solid var(--rose); }
.day.sel { background: var(--rose); color: #fff; }
.day.anniv::after { content: '♥'; position: absolute; top: 2px; right: 4px; font-size: 10px; color: var(--rose); }
.day.sel.anniv::after { color: #fff; }
.dots { font-size: 9px; line-height: 1; height: 9px; }
.day-panel { margin-top: 14px; background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.day-panel h3 { margin: 0 0 10px; font-size: 1rem; }
.events { list-style: none; padding: 0; margin: 0 0 12px; }
.events li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.events button { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
