:root {
      --bg-main: #fffefc;
      --bg-soft-yellow: #fff7b8;
      --bg-card: #fffef8;
      --border-yellow: #ffe066;
      --accent-pink: #00376c;
      --text-main: #3a3a3a;
      --text-soft: #666;
      --text-nav: #5a5a5a;
      --text-footer: #3a4a3a;
      --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.06);
      --shadow-strong: 0 18px 40px rgba(0, 0, 0, 0.12);
      --paper: #fffdf4;
      --paper-line: rgba(0, 55, 108, 0.10);
      --book-brown: #9b6b45;
      --book-dark: #6c4428;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }

    body {
      font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
      background-color: var(--bg-main);
      color: var(--text-main);
      line-height: 1.7;
      overflow-x: hidden;
    }

    body::before {
      content: none;
    }

header {
  background-color: white;
  padding: 18px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.logo {
  margin-left: -25px;
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 35px !important;
  max-height: 35px !important;
  width: auto !important;
  max-width: 320px;
  object-fit: contain;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

nav ul li {
  position: relative;
}

nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 18px;
  z-index: 999;
}

nav ul li:hover > ul {
  display: block;
}

.dropdown-inner {
  background-color: white;
  padding: 8px 0;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
  min-width: 190px;
  border: 1px solid var(--border-yellow);
}

nav ul li ul li a {
  display: block;
  padding: 9px 18px;
  color: var(--text-nav);
  font-weight: normal;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

nav ul li ul li a:hover {
  background-color: var(--bg-soft-yellow);
  color: var(--accent-pink);
}

nav a {
  text-decoration: none;
  color: var(--text-nav);
  font-weight: 600;
  font-size: 0.97rem;
  transition: color 0.25s ease;
}

nav > ul > li > a {
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--accent-pink);
}

nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  background-color: var(--border-yellow);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav > ul > li > a:hover::after,
nav > ul > li > a.active::after {
  transform: scaleX(1);
}
  .hero {
      position: relative;
      min-height: 720px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 90px 60px;
      overflow: hidden;
      text-align: left;
      background-image: url("images/header-trauertagebuch.jpg");
      background-size: cover;
      background-position: center 70%;
      background-repeat: no-repeat;
    }

    .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(
        90deg,
        rgba(255, 254, 248, 0.86) 0%,
        rgba(255, 254, 248, 0.62) 34%,
        rgba(255, 254, 248, 0.18) 58%,
        rgba(255, 254, 248, 0.00) 100%
      );
      z-index: 1;
      pointer-events: none;
    }

    .hero::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -75px;
      transform: translateX(-50%);
      width: 120%;
      height: 145px;
      background: var(--bg-main);
      border-radius: 50% 50% 0 0;
      z-index: 2;
      pointer-events: none;
    }

    .hero-content {
      position: relative;
      z-index: 3;
      max-width: 560px;
      text-align: left;
      background: rgba(255, 254, 248, 0.84);
      border: 2px solid rgba(255, 224, 102, 0.82);
      border-radius: 26px;
      padding: 34px 36px;
      box-shadow: 0 18px 42px rgba(0, 55, 108, 0.14);
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
    }

    .eyebrow {
      display: inline-block;
      margin-bottom: 12px;
      padding: 7px 15px;
      border-radius: 999px;
      background-color: var(--bg-soft-yellow);
      border: 1.5px solid var(--border-yellow);
      color: var(--accent-pink);
      font-weight: 700;
      font-size: 0.88rem;
    }

    .hero h1 {
      color: var(--accent-pink);
      font-size: clamp(2rem, 4vw, 3.25rem);
      line-height: 1.08;
      margin-bottom: 16px;
      letter-spacing: -0.03em;
      text-shadow: none;
    }

    .hero p {
      color: #4f4f4f;
      font-size: 1.08rem;
      line-height: 1.65;
      margin: 0;
      max-width: 500px;
    }

    @media (max-width: 800px) {
      .hero {
        min-height: 560px;
        padding: 50px 20px 130px 20px;
        align-items: flex-end;
        background-position: center 70%;
      }

      .hero::before {
        background: linear-gradient(
          to bottom,
          rgba(255, 254, 248, 0.10) 0%,
          rgba(255, 254, 248, 0.58) 48%,
          rgba(255, 254, 248, 0.90) 100%
        );
      }

      .hero-content {
        max-width: 100%;
        padding: 26px 22px;
        border-radius: 22px;
      }

      .hero h1 {
        font-size: 2.1rem;
      }

      .hero p {
        font-size: 1rem;
      }
    }

    .btn-primary,
    .btn-secondary,
    .book-btn,
    .small-btn {
      border: none;
      cursor: pointer;
      font-family: inherit;
      text-decoration: none;
      border-radius: 999px;
      font-weight: bold;
      transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    }

    .btn-primary,
    .book-btn.primary,
    .small-btn.primary {
      display: inline-block;
      padding: 13px 28px;
      background-color: var(--accent-pink);
      color: white;
      box-shadow: 0 4px 16px rgba(0,55,108,0.25);
    }

    .btn-primary:hover,
    .book-btn.primary:hover,
    .small-btn.primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,55,108,0.35);
    }

    .btn-secondary,
    .book-btn.secondary,
    .small-btn.secondary {
      display: inline-block;
      padding: 13px 28px;
      background-color: transparent;
      color: var(--accent-pink);
      border: 2px solid var(--accent-pink);
    }

    .btn-secondary:hover,
    .book-btn.secondary:hover,
    .small-btn.secondary:hover {
      background-color: var(--accent-pink);
      color: white;
    }

    .section-wrapper {
      max-width: 1200px;
      margin: 70px auto 80px auto;
      padding: 0 20px;
    }

    .section-title {
      text-align: center;
      color: var(--accent-pink);
      font-size: 2rem;
      margin-bottom: 10px;
    }

    .section-subtitle {
      text-align: center;
      color: var(--text-soft);
      font-size: 1.05rem;
      max-width: 760px;
      margin: 0 auto 42px auto;
    }

    .book-lock {
      max-width: 1120px;
      margin: 0 auto 58px auto;
      background: linear-gradient(135deg, #edf5ff 0%, #fffdf2 55%, #fff6be 100%);
      border: 2px solid var(--border-yellow);
      border-radius: 28px;
      box-shadow: var(--shadow-soft);
      padding: 44px;
      display: grid;
      grid-template-columns: minmax(500px, 1.15fr) minmax(310px, 0.85fr);
      gap: 44px;
      align-items: center;
    }

    .closed-book {
      width: min(520px, 100%);
      height: 690px;
      margin: 0 auto;
      border-radius: 8px 18px 18px 8px;
      background:
        linear-gradient(90deg, rgba(0,0,0,0.24) 0 3%, transparent 3% 100%),
        linear-gradient(90deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 100%),
        radial-gradient(circle at 76% 18%, rgba(255,255,255,0.16), transparent 22%),
        linear-gradient(135deg, #00376c 0%, #002f5c 45%, #00264a 100%);
      box-shadow:
        10px 12px 0 -4px #e8dec6,
        18px 20px 0 -8px #cdbb96,
        0 28px 58px rgba(0, 39, 72, 0.25),
        inset 34px 0 30px rgba(0, 35, 55, 0.42),
        inset -18px 0 28px rgba(255,255,255,0.08),
        inset 0 0 0 1px rgba(255,255,255,0.14);
      border: 1px solid rgba(0, 50, 78, 0.34);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(255,255,255,0.95);
      text-align: center;
      overflow: visible;
      transform: rotate(-1deg);
      cursor: pointer;
      transition: transform 0.35s ease, box-shadow 0.35s ease;
      transform-style: preserve-3d;
    }

    .closed-book.opening {
      animation: closeBookOpen 0.9s ease forwards;
      transform-origin: left center;
    }

    @keyframes closeBookOpen {
      0% { transform: rotate(-1.5deg) rotateY(0deg) scale(1); opacity: 1; }
      55% { transform: rotate(-1.5deg) rotateY(-42deg) scale(1.02); opacity: 1; }
      100% { transform: rotate(-1.5deg) rotateY(-95deg) scale(0.96); opacity: 0; }
    }

    .closed-book::before {
      content: '';
      position: absolute;
      left: -13px;
      top: 0;
      width: 31px;
      height: 100%;
      border-radius: 8px 0 0 8px;
      background:
        linear-gradient(90deg, rgba(0,0,0,0.46), rgba(255,255,255,0.18) 45%, rgba(0,0,0,0.22)),
        linear-gradient(180deg, #00376c, #00264a);
      box-shadow:
        inset -5px 0 8px rgba(0,0,0,0.36),
        6px 0 10px rgba(0,0,0,0.18);
    }

    .closed-book::after {
      content: '';
      position: absolute;
      inset: 24px 26px 24px 56px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 6px 14px 14px 6px;
      box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.08),
        inset 0 0 60px rgba(255,255,255,0.035);
      pointer-events: none;
    }

    .book-spine-line {
      position: absolute;
      left: 26px;
      top: 18px;
      bottom: 18px;
      width: 10px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(0,0,0,0.36), rgba(255,255,255,0.24), rgba(0,0,0,0.14));
      box-shadow: 18px 0 0 rgba(0,0,0,0.08);
      z-index: 1;
    }

    .book-cover-content {
      position: relative;
      z-index: 2;
      width: 66%;
      margin-left: 44px;
      padding: 42px 28px;
      border-radius: 4px 14px 14px 4px;
      background: rgba(255,255,255,0.055);
      border: 1px solid rgba(255,255,255,0.12);
      backdrop-filter: blur(1px);
    }

    .closed-book h2 {
      font-size: 2.35rem;
      line-height: 1.12;
      color: white;
      text-shadow: 0 3px 12px rgba(0,0,0,0.30);
      font-weight: 700;
      letter-spacing: 0.01em;
    }

    .book-cover-content p {
      margin-top: 16px;
      font-size: 0.92rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.76);
    }

    .lock-panel h3 {
      color: var(--accent-pink);
      font-size: 1.45rem;
      margin-bottom: 10px;
    }

    .lock-panel p {
      color: var(--text-soft);
      margin-bottom: 18px;
    }

    .code-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }

    .code-row input {
      flex: 1;
      min-width: 190px;
      padding: 12px 15px;
      border: 2px solid var(--border-yellow);
      border-radius: 999px;
      font-family: inherit;
      outline: none;
      background-color: var(--bg-card);
      color: var(--text-main);
    }

    .code-row input:focus { border-color: var(--accent-pink); }

    .hint {
      display: block;
      color: var(--text-soft);
      font-size: 0.88rem;
      margin-top: 8px;
    }

    .pin-feedback {
      min-height: 24px;
      margin: 6px 0 12px 0;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text-soft);
    }

    .pin-feedback.error { color: #b44444; }
    .pin-feedback.success { color: #3f7f4a; }

    .pin-mode {
      display: inline-block;
      margin-bottom: 12px;
      padding: 7px 14px;
      border-radius: 999px;
      background: #edf5ff;
      color: var(--accent-pink);
      font-weight: 700;
      font-size: 0.84rem;
    }

    .book-stage {
      display: none;
      perspective: 1900px;
      animation: fadeIn 0.55s ease both;
      max-width: 1200px;
      margin-left: auto;
      margin-right: auto;
      background: linear-gradient(135deg, #edf5ff 0%, #fffdf2 55%, #fff6be 100%);
      border: 2px solid var(--border-yellow);
      border-radius: 28px;
      padding: 42px 30px;
      box-shadow: var(--shadow-soft);
    }

    .book-stage.open { display: block; }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .diary-book {
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: 760px;
      border-radius: 34px;
      background: linear-gradient(90deg, #d3b985 0%, #f3e5bd 2.5%, #fffdf4 5%, #fffdf4 48.5%, #ccb079 50%, #fffdf4 51.5%, #fffdf4 95%, #eeddb1 97.5%, #c8a972 100%);
      box-shadow: 0 34px 90px rgba(70, 45, 26, 0.28), 0 0 0 8px rgba(155,107,69,0.10);
      border: 5px solid rgba(126,82,48,0.34);
      overflow: hidden;
      position: relative;
      transform-origin: center;
      animation: bookOpen 0.8s ease both;
    }

    @keyframes bookOpen {
      from { transform: rotateX(8deg) scale(0.96); opacity: 0; }
      to { transform: rotateX(0) scale(1); opacity: 1; }
    }

    .book-stage.closing .diary-book {
      animation: bookClose 0.45s ease both;
    }

    @keyframes bookClose {
      from { transform: rotateX(0) scale(1); opacity: 1; }
      to { transform: rotateX(8deg) scale(0.96); opacity: 0; }
    }

    .diary-book::before {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      width: 46px;
      transform: translateX(-50%);
      background: linear-gradient(90deg, rgba(0,0,0,0.17), rgba(255,255,255,0.46), rgba(0,0,0,0.15));
      z-index: 2;
      pointer-events: none;
      box-shadow: 0 0 28px rgba(70,45,26,0.18);
    }

    .diary-book::after {
      content: '';
      position: absolute;
      inset: 18px;
      border-radius: 25px;
      border: 1px solid rgba(155,107,69,0.18);
      pointer-events: none;
      z-index: 3;
    }

    .page {
      padding: 44px 46px 40px;
      background:
        repeating-linear-gradient(to bottom, transparent 0 38px, rgba(0, 55, 108, 0.07) 39px 40px),
        linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,253,244,0.94));
      position: relative;
      border-radius: 22px;
      border: 1px solid rgba(255,224,102,0.55);
      box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    }

    .page::before {
      content: '';
      position: absolute;
      top: 34px;
      bottom: 34px;
      width: 2px;
      background: rgba(232, 128, 119, 0.20);
      pointer-events: none;
    }

    .page.left::before { left: 40px; }
    .page.right::before { left: 34px; }

    .page::after {
      content: '';
      position: absolute;
      inset: 18px 18px 18px 18px;
      border-radius: 20px;
      border: 1px solid rgba(155,107,69,0.10);
      pointer-events: none;
    }

    .page.left { border-right: 1px solid rgba(0,0,0,0.06); }
    .page.right { border-left: 1px solid rgba(0,0,0,0.05); }

    .page-label {
      color: var(--accent-pink);
      font-weight: bold;
      letter-spacing: 0.04em;
      font-size: 0.83rem;
      text-transform: uppercase;
      margin-bottom: 14px;
    }

    .page h2 {
      color: var(--accent-pink);
      font-size: 1.75rem;
      margin-bottom: 10px;
      line-height: 1.25;
    }

    .page-intro {
      color: var(--text-soft);
      margin-bottom: 22px;
      font-size: 0.98rem;
    }

    .prompt-card {
      background: rgba(255,255,255,0.68);
      border: 1.5px solid rgba(255,224,102,0.75);
      border-radius: 18px;
      padding: 18px;
      margin-bottom: 16px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    }

    .prompt-card label {
      display: block;
      color: var(--accent-pink);
      font-weight: bold;
      margin-bottom: 8px;
    }

    .prompt-card textarea,
    .prompt-card input[type="text"] {
      width: 100%;
      border: none;
      border-bottom: 2px solid rgba(0,55,108,0.18);
      background: transparent;
      font-family: inherit;
      color: var(--text-main);
      resize: vertical;
      min-height: 72px;
      outline: none;
      line-height: 1.55;
      font-size: 0.98rem;
    }

    .prompt-card input[type="text"] { min-height: unset; padding: 8px 0; }
    .prompt-card textarea:focus,
    .prompt-card input[type="text"]:focus { border-bottom-color: var(--accent-pink); }

    .diary-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 18px;
    }

    .book-stage-top {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 18px;
    }

    .small-btn { padding: 10px 18px; font-size: 0.9rem; }

    .tracker-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }

    .month-nav {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,255,255,0.7);
      border: 1.5px solid rgba(255,224,102,0.75);
      border-radius: 999px;
      padding: 8px;
    }

    .month-nav button {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: none;
      background: var(--bg-soft-yellow);
      color: var(--accent-pink);
      cursor: pointer;
      font-weight: bold;
      font-size: 1rem;
    }

    .month-nav span {
      min-width: 140px;
      text-align: center;
      color: var(--accent-pink);
      font-weight: bold;
      font-size: 0.95rem;
    }


    .tracker-sticker-note {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      margin: 2px 0 16px;
      border-radius: 4px 18px 18px 18px;
      background: #fff7b8;
      color: var(--accent-pink);
      font-weight: 700;
      font-size: 0.9rem;
      box-shadow: 0 8px 18px rgba(0,0,0,0.08);
      transform: rotate(-1deg);
      position: relative;
    }

    .tracker-sticker-note::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 22px;
      width: 62px;
      height: 18px;
      background: rgba(255,255,255,0.55);
      border: 1px solid rgba(255,224,102,0.85);
      transform: rotate(4deg);
      border-radius: 3px;
    }

    .emotion-picker {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      margin-bottom: 22px;
    }

    .emotion-btn {
      border: 2px solid rgba(255,255,255,0.9);
      border-radius: 6px 18px 18px 18px;
      padding: 11px 13px;
      background: rgba(255,255,255,0.80);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 9px;
      font-family: inherit;
      color: var(--text-main);
      transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
      text-align: left;
      box-shadow: 0 7px 14px rgba(0,0,0,0.055);
      position: relative;
      transform: rotate(var(--tilt, -1deg));
    }

    .emotion-btn::before {
      content: '';
      position: absolute;
      top: -7px;
      left: 18px;
      width: 42px;
      height: 14px;
      border-radius: 3px;
      background: rgba(255,255,255,0.55);
      border: 1px solid rgba(255,224,102,0.72);
      transform: rotate(5deg);
    }

    .emotion-btn:nth-child(even) { --tilt: 1.2deg; }

    .emotion-btn:hover,
    .emotion-btn.active {
      transform: translateY(-3px) rotate(0deg);
      border-color: var(--accent-pink);
      background: white;
      box-shadow: 0 12px 22px rgba(0,55,108,0.10);
    }

    .dot {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      flex: 0 0 auto;
      box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
    }

    .calender-note {
      color: var(--text-soft);
      font-size: 0.9rem;
      margin-bottom: 12px;
    }

    .tracker-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 8px;
      padding: 18px;
      background:
        linear-gradient(135deg, rgba(255,255,255,0.86), rgba(255,250,224,0.82));
      border: 1.5px dashed rgba(0,55,108,0.18);
      border-radius: 22px;
      box-shadow: inset 0 0 0 4px rgba(255,255,255,0.28), 0 8px 20px rgba(0,0,0,0.05);
    }

    .weekday {
      text-align: center;
      font-weight: bold;
      color: var(--accent-pink);
      font-size: 0.82rem;
      padding-bottom: 5px;
    }

    .day {
      min-height: 48px;
      border-radius: 9px 16px 16px 16px;
      border: 1px solid rgba(0,55,108,0.08);
      background: rgba(255,255,255,0.82);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      color: rgba(58,58,58,0.72);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      position: relative;
      box-shadow: 0 3px 8px rgba(0,0,0,0.035);
    }

    .day:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-soft);
    }

    .day.empty { visibility: hidden; cursor: default; }
    .day.today { outline: 2px solid var(--accent-pink); outline-offset: 2px; }
    .day.selected-day {
      outline: 3px solid var(--border-yellow);
      outline-offset: 3px;
      transform: translateY(-2px) rotate(-1deg);
      box-shadow: 0 10px 22px rgba(0,55,108,0.13);
    }
    .day.has-note::after {
      content: '✦';
      position: absolute;
      top: 3px;
      right: 7px;
      color: rgba(0,55,108,0.65);
      font-size: 0.75rem;
    }

    .calendar-overview {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 14px;
    }

    .calendar-card {
      background: rgba(255,255,255,0.76);
      border: 1.5px solid rgba(255,224,102,0.75);
      border-radius: 16px;
      padding: 13px 14px;
      box-shadow: 0 5px 14px rgba(0,0,0,0.04);
    }

    .calendar-card strong {
      color: var(--accent-pink);
      font-size: 0.9rem;
      display: block;
      margin-bottom: 7px;
    }

    .emotion-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .legend-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.78rem;
      color: var(--text-soft);
      background: rgba(255,255,255,0.78);
      border-radius: 999px;
      padding: 5px 8px;
    }

    .mini-dot {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
    }

    #monthStats {
      color: var(--text-soft);
      font-size: 0.86rem;
      line-height: 1.55;
    }

    .reflection-box {
      margin-top: 18px;
      background: rgba(255,255,255,0.72);
      border: 1.5px solid rgba(255,224,102,0.75);
      border-radius: 18px;
      padding: 18px;
    }

    .reflection-box strong { color: var(--accent-pink); }
    .reflection-box p { color: var(--text-soft); margin-top: 6px; }


    .daily-summary-box {
      margin-top: 14px;
      background: linear-gradient(135deg, rgba(232,240,248,0.92), rgba(255,247,184,0.62));
      border: 1.5px solid rgba(0,55,108,0.16);
      border-radius: 18px;
      padding: 16px 18px;
      box-shadow: 0 7px 18px rgba(0,0,0,0.045);
      position: relative;
    }

    .daily-summary-box::before {
      content: '✎';
      position: absolute;
      top: 12px;
      right: 16px;
      color: rgba(0,55,108,0.28);
      font-size: 1.3rem;
    }

    .daily-summary-box strong {
      display: block;
      color: var(--accent-pink);
      margin-bottom: 6px;
    }

    .daily-summary-box p {
      color: var(--text-soft);
      font-size: 0.93rem;
    }

    .day.has-mood::before {
      content: '×';
      position: absolute;
      left: 6px;
      top: 2px;
      font-size: 0.78rem;
      color: rgba(0,55,108,0.48);
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .day.has-mood:hover::before { opacity: 1; }

    .support-card {
      max-width: 980px;
      margin: 42px auto 0;
      padding: 36px 34px;
      background: linear-gradient(135deg, #edf5ff 0%, #fffdf2 55%, #fff6be 100%);
      border: 2px solid var(--border-yellow);
      border-radius: 28px;
      box-shadow: var(--shadow-soft);
      display: grid;
      grid-template-columns: 0.9fr 1.1fr;
      gap: 26px;
      align-items: center;
    }

    .support-card h2 { color: var(--accent-pink); margin-bottom: 10px; }
    .support-card p { color: var(--text-soft); }

    .saved-toast {
      position: fixed;
      right: 22px;
      bottom: 22px;
      background: var(--accent-pink);
      color: white;
      padding: 14px 18px;
      border-radius: 16px;
      box-shadow: var(--shadow-strong);
      transform: translateY(120px);
      opacity: 0;
      transition: 0.3s ease;
      z-index: 2000;
    }

    .saved-toast.show {
      transform: translateY(0);
      opacity: 1;
    }

    footer {
      background-color: var(--bg-soft-yellow);
      color: var(--text-footer);
      padding: 55px 20px 32px 20px;
      margin-top: 40px;
    }

    .footer-content {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 30px;
    }

    .footer-column h3 {
      color: var(--accent-pink);
      margin-bottom: 14px;
      font-size: 1.05rem;
    }

    .footer-column p,
    .footer-column li,
    .footer-column a {
      color: var(--text-footer);
      font-size: 0.97rem;
      line-height: 1.75;
      text-decoration: none;
    }

    .footer-column ul { list-style: none; }
    .footer-column a:hover { text-decoration: underline; color: var(--accent-pink); }

    .footer-bottom {
      max-width: 1200px;
      margin: 30px auto 0 auto;
      padding-top: 20px;
      border-top: 1px solid rgba(0,55,108, 0.15);
      text-align: center;
      font-size: 0.93rem;
      color: var(--text-footer);
    }

    @media (max-width: 1000px) {
      .book-lock,
      .support-card { grid-template-columns: 1fr; }

      .closed-book { width: min(440px, 100%); height: 590px; transform: rotate(0); }
      .closed-book h2 { font-size: 2rem; }

      .diary-book {
        grid-template-columns: 1fr;
      }

      .diary-book::before { display: none; }
      .page.left { border-right: none; border-bottom: 2px solid rgba(155,107,69,0.2); }
      .page { padding: 34px 26px; }
    }

@media (max-width: 800px) {
  header {
    flex-direction: column;
    gap: 15px;
    padding: 18px 20px;
  }

  .logo {
    margin-left: 0;
  }

  .logo img {
    height: 45px !important;
    max-height: 45px !important;
  }

  nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }

  .hero h1 { font-size: 2.1rem; }
  .hero-content { padding: 40px 24px; }
  .emotion-picker { grid-template-columns: 1fr; }
  .tracker-grid { gap: 6px; padding: 10px; }
  .calendar-overview { grid-template-columns: 1fr; }
  .day { min-height: 42px; border-radius: 11px; }
}


    @media (max-width: 560px) {
      .closed-book { width: min(320px, 100%); height: 430px; border-radius: 6px 14px 14px 6px; }
      .closed-book h2 { font-size: 1.45rem; }
      .book-cover-content { width: 72%; margin-left: 32px; padding: 26px 18px; }
      .closed-book::before { width: 24px; left: -10px; }
      .book-lock { padding: 24px; }
      .tracker-top { align-items: flex-start; }
      .month-nav { width: 100%; justify-content: space-between; }
      .month-nav span { min-width: unset; }
      .weekday { font-size: 0.72rem; }
      .day { min-height: 36px; font-size: 0.82rem; }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      *, *::before, *::after {
        animation: none !important;
        transition: none !important;
      }
    }

/* Einheitliche Textgrößen – Abschlusskorrektur */
body { font-family: 'Segoe UI', Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.7; }
nav a { font-size: 0.97rem; }
.hero p, .section-subtitle, .intro p, .journal-card p, .prompt-card p, .closed-book p { font-size: 1.05rem; line-height: 1.75; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
.section-title, section h2, .closed-book h2 { font-size: clamp(1.75rem, 2.6vw, 2.1rem); line-height: 1.25; }
.panel h3, .journal-card h3, .prompt-card h3 { font-size: 1.22rem; line-height: 1.3; }
.helper-text, .form-hint, .small-btn, .weekday, .day-note { font-size: 0.9rem; line-height: 1.5; }
button, .btn, input, textarea, select { font-size: 1rem; }
.footer-column p, .footer-column li, .footer-column a { font-size: 0.97rem; line-height: 1.75; }


/* --- Anpassung: Passwort zurücksetzen im geschlossenen PIN-Bereich --- */
.reset-pin-lock-btn {
  margin-top: 10px;
}

/* --- Wieder kompakteres geöffnetes Tagebuch + ursprüngliche Übersicht --- */
.book-stage {
  max-width: 1280px;
  padding: 24px;
  overflow: hidden;
}

.diary-book {
  width: 100%;
  max-width: 1220px;
  min-height: auto;
  max-height: none;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  margin: 0 auto;
  align-items: stretch;
}

.page {
  padding: 24px 30px 24px;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page > * {
  max-width: 100%;
}

.page-label {
  margin-bottom: 8px;
  font-size: 0.76rem;
}

.page h2 {
  font-size: 1.38rem;
  margin-bottom: 6px;
}

.page-intro {
  font-size: 0.86rem;
  line-height: 1.42;
  margin-bottom: 10px;
}

.prompt-card {
  padding: 10px 13px;
  margin-bottom: 8px;
  border-radius: 15px;
}

.prompt-card label {
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.prompt-card textarea,
.prompt-card input[type="text"] {
  min-height: 44px;
  font-size: 0.88rem;
  line-height: 1.42;
}

.prompt-card input[type="text"] {
  padding: 5px 0;
}

.tracker-top {
  gap: 10px;
  margin-bottom: 8px;
}

.month-nav {
  padding: 5px;
}

.month-nav button {
  width: 30px;
  height: 30px;
}

.month-nav span {
  min-width: 120px;
  font-size: 0.86rem;
}

.tracker-sticker-note {
  padding: 7px 11px;
  margin-bottom: 9px;
  font-size: 0.8rem;
}

.emotion-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}

.emotion-btn {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 9px;
  font-size: 0.82rem;
}

.dot {
  width: 15px;
  height: 15px;
}

.calender-note {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-bottom: 8px;
}

.tracker-grid {
  width: 100%;
  min-width: 0;
  gap: 5px;
  padding: 10px;
  border-radius: 18px;
}

.weekday {
  font-size: 0.74rem;
  padding-bottom: 2px;
}

.day {
  min-height: 32px;
  font-size: 0.78rem;
  border-radius: 8px 13px 13px 13px;
}

.day.future-day {
  cursor: not-allowed;
  opacity: 0.48;
  background: rgba(255,255,255,0.55);
}

.day.future-day:hover {
  transform: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.035);
}

.calendar-overview {
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
}

.calendar-card {
  padding: 8px 10px;
  overflow-wrap: break-word;
}

.calendar-card strong,
#monthStats {
  font-size: 0.78rem;
  line-height: 1.35;
}

.emotion-legend {
  gap: 5px;
}

.legend-chip {
  font-size: 0.72rem;
  padding: 4px 7px;
}

.reflection-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 15px;
  overflow-wrap: break-word;
}

.reflection-box p,
.daily-summary-box p {
  font-size: 0.82rem;
  line-height: 1.38;
}

.daily-summary-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 15px;
}

.diary-actions {
  margin-top: 10px;
  gap: 8px;
}

.page.right .diary-actions {
  margin-top: auto;
}

.small-btn {
  padding: 7px 13px;
  font-size: 0.82rem;
}

@media (max-width: 1000px) {
  .diary-book {
    overflow: hidden;
  }

  .page {
    min-height: auto;
  }

  .calendar-overview {
    grid-template-columns: 1fr;
  }
}



.calendar-overview.single {
  grid-template-columns: 1fr;
}


/* --- Feinkorrektur geöffnetes Tagebuch: rosa Linien raus + gleichmäßige Abstände --- */
.book-stage .page::before {
  content: none !important;
}

.book-stage .page.left,
.book-stage .page.right {
  gap: 12px;
}

.book-stage .page .page-label,
.book-stage .page h2,
.book-stage .page .page-intro,
.book-stage .prompt-card,
.book-stage .tracker-top,
.book-stage .tracker-sticker-note,
.book-stage .emotion-picker,
.book-stage .calender-note,
.book-stage .tracker-grid,
.book-stage .calendar-overview,
.book-stage .daily-summary-box,
.book-stage .diary-actions {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.book-stage .page.right .diary-actions {
  margin-top: auto !important;
}
