/* ═══════════════════════════════════════════════════════════════
   ERINNERUNGSBUCH  –  style.css
   Gleiches romantisches Design wie die Hauptseite
   ═══════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────
   1. RESET & BASIS
   ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  min-height: 100dvh;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ────────────────────────────────────────
   2. DESIGN-TOKENS (identisch mit Hauptseite)
   ──────────────────────────────────────── */
:root {
  --cream:        #FDF6F0;
  --warm-white:   #FFFBF7;
  --rose-50:      #FFF5F7;
  --rose-100:     #FFCDD8;
  --rose-200:     #FFB6C1;
  --rose-300:     #F4A0B0;
  --rose-400:     #E88FA0;
  --rose-500:     #D4799A;
  --blush:        #F8D0D8;
  --beige-light:  #FAF0E6;
  --beige:        #F5E6D3;
  --beige-dark:   #E8D5C0;
  --gold:         #F5D78E;

  --text-dark:    #3A2828;
  --text-medium:  #6B4F4F;
  --text-light:   #9B7E7E;
  --text-muted:   #C4A8A8;

  --glass-fill:   rgba(255, 255, 255, 0.22);
  --glass-fill-s: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.42);
  --glass-shadow: 0 8px 40px rgba(160, 80, 100, 0.14),
                  0 2px 10px rgba(255, 255, 255, 0.55) inset;

  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 32px;
  --r-xl: 40px;

  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ────────────────────────────────────────
   3. APP-SECTIONS (Seitennavigation)
   ──────────────────────────────────────── */
.app-section {
  display: none;
  min-height: 100dvh;
  background: var(--cream);
  animation: sectionFadeIn 0.38s var(--ease-out) both;
}

.app-section.active {
  display: block;
}

@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────────────
   4. APP-HEADER
   ──────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(env(safe-area-inset-top, 0px), 18px) 20px 16px;
  background: rgba(253, 246, 240, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(244, 160, 176, 0.22);
  box-shadow: 0 1px 12px rgba(160, 80, 100, 0.06);
}

.header-left {
  flex: 1;
  min-width: 0;
}

.app-title {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: clamp(20px, 5.5vw, 26px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* + Button */
.btn-add {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-300), var(--rose-400), var(--rose-500));
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(212, 121, 154, 0.45);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}

.btn-add:active {
  transform: scale(0.91);
  box-shadow: 0 2px 8px rgba(212, 121, 154, 0.30);
}

/* ────────────────────────────────────────
   5. LEERER ZUSTAND
   ──────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  min-height: calc(100dvh - 80px);
}

.empty-icon {
  font-size: 68px;
  margin-bottom: 22px;
  animation: iconWiggle 3s ease-in-out infinite;
}

@keyframes iconWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20%       { transform: rotate(-10deg) scale(1.08); }
  40%       { transform: rotate(10deg) scale(1.08); }
  60%       { transform: rotate(-5deg) scale(1.04); }
  80%       { transform: rotate(5deg) scale(1.04); }
}

.empty-title {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.empty-text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ────────────────────────────────────────
   6. KACHELRASTER DER ERINNERUNGEN
   ──────────────────────────────────────── */
.memories-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Einzelne Kachel */
.memory-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--beige);
  box-shadow: 0 4px 22px rgba(160, 80, 100, 0.13);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  animation: cardIn 0.5s var(--ease-out) both;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.memory-card:active {
  transform: scale(0.965);
  box-shadow: 0 2px 10px rgba(160, 80, 100, 0.10);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Cover-Bild / -Video */
.memory-card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Platzhalter wenn keine Medien */
.memory-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--beige-light), var(--rose-50));
  font-size: 44px;
}

/* Gradient-Overlay → Titel gut lesbar */
.memory-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 44px 12px 13px;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.70) 0%,
    rgba(0, 0, 0, 0.20) 65%,
    transparent 100%
  );
  color: #fff;
}

.memory-card-title {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: clamp(12px, 3.5vw, 15px);
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.memory-card-meta {
  font-size: clamp(10px, 2.5vw, 11px);
  opacity: 0.82;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Aktions-Buttons auf der Kachel */
.memory-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
  z-index: 10;
}

.card-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s var(--ease-spring);
}

.card-action-btn:active {
  transform: scale(0.88);
  background: rgba(0, 0, 0, 0.55);
}

/* ────────────────────────────────────────
   7. EDIT-HEADER
   ──────────────────────────────────────── */
.app-header-edit {
  gap: 10px;
}

.header-center-title {
  flex: 1;
  text-align: center;
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-back {
  font-size: 14px;
  font-weight: 500;
  color: var(--rose-500);
  white-space: nowrap;
  padding: 8px 0;
  flex-shrink: 0;
}

.btn-save {
  font-size: 14px;
  font-weight: 700;
  color: var(--rose-500);
  white-space: nowrap;
  padding: 8px 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.btn-save:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ────────────────────────────────────────
   8. FORMULAR
   ──────────────────────────────────────── */
.edit-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 40px);
}

.edit-form {
  padding: 22px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-medium);
  margin-bottom: 9px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid rgba(244, 160, 176, 0.38);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--rose-300);
  box-shadow: 0 0 0 3px rgba(244, 160, 176, 0.18);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input.input-error {
  border-color: var(--rose-400);
  box-shadow: 0 0 0 3px rgba(232, 143, 160, 0.22);
  animation: inputShake 0.45s ease;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.form-textarea {
  resize: none;
  min-height: 120px;
}

.form-char-count {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ────────────────────────────────────────
   9. UPLOAD-BEREICH
   ──────────────────────────────────────── */
.upload-area {
  border: 2px dashed rgba(244, 160, 176, 0.55);
  border-radius: var(--r-md);
  padding: 34px 20px;
  text-align: center;
  background: rgba(255, 245, 247, 0.60);
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s var(--ease-spring);
}

.upload-area:active,
.upload-area.dragover {
  background: rgba(255, 205, 216, 0.38);
  border-color: var(--rose-400);
  transform: scale(0.99);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
}

.upload-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.upload-hint {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ────────────────────────────────────────
   10. MEDIA-VORSCHAURASTER
   ──────────────────────────────────────── */
.media-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.media-thumb {
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--beige);
  animation: cardIn 0.32s var(--ease-out) both;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.media-thumb-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
}

.media-thumb-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, transform 0.15s var(--ease-spring);
}

.media-thumb-remove:active {
  transform: scale(0.86);
  background: rgba(190, 40, 40, 0.82);
}

/* ────────────────────────────────────────
   11. GALERIE-ANSICHT  (Raster)
   ──────────────────────────────────────── */

.app-header-gallery {
  gap: 10px;
}

.gallery-header-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.gallery-header-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Story-Öffnen-Button */
.btn-story-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--rose-300), var(--rose-500));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(212, 121, 154, 0.38);
  white-space: nowrap;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}

.btn-story-open:active {
  transform: scale(0.94);
  box-shadow: 0 1px 6px rgba(212, 121, 154, 0.28);
}

/* Beschreibungs-Banner */
.gallery-desc-bar {
  background: linear-gradient(135deg,
    rgba(244, 160, 176, 0.14),
    rgba(255, 205, 216, 0.18)
  );
  border-bottom: 1px solid rgba(244, 160, 176, 0.22);
  padding: 12px 20px;
}

.gallery-desc-text {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.6;
  text-align: center;
}

/* Scroll-Container */
.gallery-media-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 24px);
}

/* 3-Spalten-Raster */
.gallery-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
}

/* Einzelne Kachel */
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--beige);
  cursor: pointer;
  animation: cardIn 0.35s var(--ease-out) both;
  transition: opacity 0.15s ease;
}

.gallery-item:active {
  opacity: 0.80;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Video-Play-Overlay */
.gallery-item-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gallery-item-play-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  padding-left: 2px; /* visuelles Zentrum ▶ */
}

/* Download-Button (immer sichtbar auf Mobile, Hover auf Desktop) */
.gallery-item-download {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s var(--ease-spring);
  z-index: 5;
}

.gallery-item-download:active {
  transform: scale(0.88);
  background: rgba(0, 0, 0, 0.72);
}

@media (hover: hover) {
  .gallery-item-download {
    opacity: 0;
    transition: opacity 0.18s ease, background 0.18s ease, transform 0.15s var(--ease-spring);
  }
  .gallery-item:hover .gallery-item-download {
    opacity: 1;
  }
}

/* Kein-Medien-Zustand */
.gallery-no-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  gap: 10px;
  font-size: 48px;
}

.gallery-no-media p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-medium);
}

.gallery-no-media-sub {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

/* ────────────────────────────────────────
   12. STORY-VOLLBILD (wie Instagram Stories)
   ──────────────────────────────────────── */
.story-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  flex-direction: column;
  /* display gesteuert per JS */
}

/* Oberer Gradient-Overlay mit Schließen + Titel */
.story-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: max(env(safe-area-inset-top, 0px), 22px) 18px 44px;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.68) 0%,
    transparent 100%
  );
  display: flex;
  align-items: flex-start;
  gap: 13px;
  pointer-events: none;
}

.story-close {
  pointer-events: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: background 0.2s ease, transform 0.15s var(--ease-spring);
}

.story-close:active {
  transform: scale(0.90);
  background: rgba(255, 255, 255, 0.28);
}

.story-header-info {
  flex: 1;
  pointer-events: none;
}

.story-title {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: clamp(16px, 5vw, 22px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.50);
  line-height: 1.28;
}

.story-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 3px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.38);
}

/* Fortschrittsbalken-Segmente ganz oben */
.story-progress-bar {
  position: absolute;
  top: max(env(safe-area-inset-top, 0px), 10px);
  left: 14px; right: 14px;
  z-index: 25;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.story-progress-seg {
  flex: 1;
  height: 2.5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.30);
  overflow: hidden;
  position: relative;
}

.story-progress-fill {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.90);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: inherit;
  transition: transform 0.32s var(--ease-smooth);
}

.story-progress-seg.done   .story-progress-fill { transform: scaleX(1); }
.story-progress-seg.active .story-progress-fill { transform: scaleX(1); }

/* Slide-Track (horizontal, kein CSS-Scroll → JS steuert transform) */
.story-overflow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.story-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  touch-action: none;
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.story-slide {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  -webkit-touch-callout: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  background: #111;
}

.story-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.story-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

/* Kein-Medien-Slide */
.story-no-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #160808, #2a0f0f);
}

.story-no-media-inner {
  text-align: center;
  padding: 40px;
}

.story-no-media-emoji {
  font-size: 62px;
  display: block;
  margin-bottom: 22px;
}

.story-no-media-title {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: clamp(18px, 5.5vw, 28px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 12px;
}

.story-no-media-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.6;
}

/* Beschreibungs-Overlay (unten) */
.story-desc-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 15;
  padding: 60px 22px max(calc(env(safe-area-inset-bottom, 0px) + 60px), 60px);
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.62) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.story-desc-text {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: clamp(13px, 4vw, 16px);
  font-style: italic;
  color: rgba(255, 255, 255, 0.90);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.52);
  line-height: 1.58;
}

/* Dot-Navigation */
.story-dots {
  position: absolute;
  bottom: max(env(safe-area-inset-bottom, 22px), 22px);
  left: 0; right: 0;
  z-index: 20;
  display: flex;
  gap: 7px;
  justify-content: center;
  padding: 8px;
  pointer-events: none;
}

.story-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  transition: width 0.3s var(--ease-spring),
              border-radius 0.3s var(--ease-spring),
              background 0.3s ease;
}

.story-dot.active {
  width: 22px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
}

/* Pfeiltasten (nur Desktop) */
.story-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s var(--ease-spring);
}

.story-nav:active {
  transform: translateY(-50%) scale(0.92);
  background: rgba(255, 255, 255, 0.28);
}

.story-nav-prev { left:  14px; }
.story-nav-next { right: 14px; }

@media (max-width: 520px) {
  .story-nav { display: none; }
}

/* ────────────────────────────────────────
   12. BENACHRICHTIGUNGS-BANNER + THINK-BUTTON
   ──────────────────────────────────────── */

/* Banner oben */
.notify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(244, 160, 176, 0.18), rgba(255, 205, 216, 0.24));
  border-bottom: 1px solid rgba(244, 160, 176, 0.30);
  padding: 11px 18px;
  font-size: 13px;
  color: var(--text-medium);
  line-height: 1.4;
}

.notify-banner span {
  flex: 1;
}

.notify-banner button {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--rose-300), var(--rose-500));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(212, 121, 154, 0.38);
  transition: transform 0.15s var(--ease-spring);
}

.notify-banner button:active {
  transform: scale(0.94);
}

/* "Ich denke an dich"-Button am unteren Rand */
.think-btn-wrap {
  position: sticky;
  bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  pointer-events: none;
}

.btn-think {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--rose-300), var(--rose-400), var(--rose-500));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 28px rgba(212, 121, 154, 0.50);
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
  animation: ctaPulse 2.5s ease-in-out infinite;
}

.btn-think:active {
  transform: scale(0.95);
  box-shadow: 0 3px 14px rgba(212, 121, 154, 0.35);
  animation-play-state: paused;
}

.btn-think:disabled {
  opacity: 0.75;
  animation-play-state: paused;
  pointer-events: none;
}

.think-heart {
  font-size: 18px;
  display: inline-block;
  animation: heartBeat 1.4s ease-in-out infinite;
}

.btn-think.sent {
  background: linear-gradient(135deg, #64c480, #3a9e60);
  box-shadow: 0 6px 28px rgba(80, 180, 110, 0.45);
  animation: none;
}

/* ────────────────────────────────────────
   13. LÖSCHEN-DIALOG
   ──────────────────────────────────────── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 max(env(safe-area-inset-bottom, 0px), 16px);
  animation: overlayFadeIn 0.22s ease both;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dialog-card {
  background: var(--warm-white);
  border-radius: var(--r-lg) var(--r-lg) var(--r-md) var(--r-md);
  padding: 30px 24px 22px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: dialogSlideUp 0.38s var(--ease-out) both;
}

@keyframes dialogSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.dialog-icon {
  font-size: 42px;
  margin-bottom: 14px;
}

.dialog-title {
  font-family: 'Playfair Display', Palatino, Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.dialog-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 22px;
}

.dialog-btns {
  display: flex;
  gap: 10px;
}

.btn-dialog-cancel,
.btn-dialog-confirm {
  flex: 1;
  padding: 15px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), opacity 0.15s ease;
}

.btn-dialog-cancel {
  background: var(--beige);
  color: var(--text-medium);
}

.btn-dialog-confirm {
  background: linear-gradient(135deg, #e05555, #c02828);
  color: #fff;
  box-shadow: 0 4px 16px rgba(200, 50, 50, 0.38);
}

.btn-dialog-cancel:active,
.btn-dialog-confirm:active {
  transform: scale(0.96);
  opacity: 0.86;
}
