@font-face {
  font-family: "Fraunces"; src: url(fonts/fraunces.woff2) format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Nunito"; src: url(fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000; font-display: swap;
}

:root {
  --creme: #fdf4ea;
  --papier: #fffaf3;
  --tinte: #4d3a33;
  --leise: #a8928a;
  --koralle: #e46f73;
  --koralle-dunkel: #c9555c;
  --rosa: #fbd8d3;
  --pfirsich: #f8c4a4;
  --butter: #f8dd95;
  --salbei: #8fc49b;
  --salbei-hell: #dcefdf;
  --schatten: 0 1px 2px rgba(110, 60, 40, .06), 0 12px 32px -8px rgba(110, 60, 40, .22);
  --rund: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: Nunito, system-ui, sans-serif; font-size: 17px; color: var(--tinte);
  background: var(--creme);
}
/* feine Papierstruktur über allem */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* weiche Farbwolken im Hintergrund, die langsam wandern */
.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; filter: blur(60px); }
.blobs i { position: absolute; border-radius: 50%; opacity: .55; animation: wandern 26s ease-in-out infinite alternate; }
.blobs i:nth-child(1) { width: 46vmax; height: 46vmax; background: var(--pfirsich); left: -14vmax; top: -12vmax; }
.blobs i:nth-child(2) { width: 38vmax; height: 38vmax; background: var(--rosa); right: -12vmax; top: 18vh; animation-duration: 32s; animation-delay: -8s; }
.blobs i:nth-child(3) { width: 34vmax; height: 34vmax; background: var(--butter); left: 10vw; bottom: -16vmax; animation-duration: 29s; animation-delay: -15s; }
.blobs i:nth-child(4) { width: 22vmax; height: 22vmax; background: var(--salbei-hell); right: 8vw; bottom: 6vh; animation-duration: 35s; }
@keyframes wandern {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.08); }
  100% { transform: translate(-4vw, 8vh) scale(.95); }
}

.wrap { max-width: 600px; margin: 0 auto; padding: 28px 16px 150px; }

/* Kopf */
.kopf { text-align: center; margin-bottom: 22px; animation: rein .8s cubic-bezier(.2, .9, .3, 1.3) both; }
.kopf h1 {
  font-family: Fraunces, Georgia, serif; font-weight: 750; font-style: normal;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: clamp(2.6rem, 10vw, 3.8rem); line-height: 1; letter-spacing: -.02em;
  color: var(--koralle); margin: 0;
}
.schwung { display: block; width: 180px; height: 16px; margin: 6px auto 0; }
.schwung path {
  fill: none; stroke: var(--butter); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 260; animation: zeichnen 1.2s .4s ease-out forwards;
}
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
.unterzeile { margin: 10px 0 0; color: var(--leise); font-weight: 700; }
.unterzeile strong { color: var(--tinte); }

/* Reiter */
.reiter {
  display: flex; gap: 4px; justify-content: center; margin: 0 auto 26px; padding: 5px; width: max-content; max-width: 100%;
  background: rgba(255, 250, 243, .7); backdrop-filter: blur(8px); border-radius: 999px; box-shadow: var(--schatten);
}
.reiter a {
  display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
  color: var(--tinte); text-decoration: none; font-weight: 800; font-size: .95rem; transition: background .2s, transform .2s;
}
.reiter a:hover { background: var(--rosa); }
.reiter a.aktiv { background: var(--koralle); color: #fff; }
.reiter svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Abreißblock */
.block {
  position: relative; transform: rotate(-.8deg);
  animation: rein .7s .1s cubic-bezier(.2, .9, .3, 1.25) both;
}
.block::before, .block::after { /* Blätter darunter */
  content: ""; position: absolute; left: 8px; right: 8px; top: 40px; bottom: -7px; z-index: -1;
  background: var(--papier); border-radius: 0 0 var(--rund) var(--rund); box-shadow: var(--schatten); transform: rotate(1.6deg);
}
.block::after { left: 16px; right: 14px; bottom: -13px; transform: rotate(-1.2deg); z-index: -2; background: #f6ece1; }
.bindung {
  position: relative; z-index: 3; height: 52px; border-radius: var(--rund) var(--rund) 6px 6px;
  background: linear-gradient(180deg, #ec8287, var(--koralle) 60%, var(--koralle-dunkel));
  display: flex; justify-content: space-evenly; align-items: center; box-shadow: 0 6px 12px -6px rgba(150, 50, 50, .5);
}
.bindung span {
  width: 13px; height: 32px; border-radius: 10px; transform: translateY(-16px);
  background: linear-gradient(90deg, #cdbfb6, #fff 45%, #b8aaa1);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .18);
}
.blatt {
  position: relative; background: var(--papier); border-radius: 0 0 var(--rund) var(--rund);
  box-shadow: var(--schatten); padding: 26px 26px 26px; transform-origin: 50% 0;
}
.blatt::before { /* Perforation */
  content: ""; position: absolute; left: 14px; right: 14px; top: 8px; height: 2px;
  background: radial-gradient(circle, #e4d6ca 1.2px, transparent 1.6px) 0 0 / 9px 2px repeat-x;
}
.blatt.abreissen { animation: abreissen .6s cubic-bezier(.5, 0, .9, .6) forwards; }
@keyframes abreissen {
  30%  { transform: rotate(-3deg) translateY(4px); }
  100% { transform: rotate(-14deg) translate(-30px, 110vh); opacity: .8; }
}
@keyframes rein {
  from { opacity: 0; transform: translateY(18px) scale(.97) rotate(-.8deg); }
}

/* Tagesblatt */
.blatt-kopf { text-align: center; padding: 6px 0 14px; }
.wochentag { font-weight: 800; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); }
.zahl {
  font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100, "opsz" 144; font-weight: 800;
  font-size: clamp(5rem, 24vw, 7.5rem); line-height: .95; color: var(--koralle); letter-spacing: -.04em;
}
.zahl-text { font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; font-size: 1.25rem; font-weight: 500; }
.inhalt {
  display: block; width: calc(100% + 52px); margin: 6px -26px 0; border: 0; height: 240px; overflow: hidden;
  border-top: 2px dashed #efe3d8; border-bottom: 2px dashed #efe3d8; background: transparent;
}

/* Häkchen */
.haken {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 20px; padding: 14px 18px;
  border: 0; border-radius: 18px; background: var(--rosa); color: var(--tinte);
  font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; text-align: left;
  transition: background .3s, transform .15s;
}
.haken:hover { transform: translateY(-2px); }
.haken:active { transform: scale(.98); }
.haken .kaestchen {
  flex: none; width: 34px; height: 34px; border-radius: 11px; border: 3px solid var(--koralle); background: #fff;
  display: grid; place-items: center; transition: .3s cubic-bezier(.3, 1.6, .5, 1);
}
.haken svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s .1s; }
.haken .haken-text::before { content: "Hab ich schon gemacht!"; }
.haken.erledigt { background: var(--salbei-hell); }
.haken.erledigt .kaestchen { background: var(--salbei); border-color: var(--salbei); transform: rotate(-8deg) scale(1.08); }
.haken.erledigt svg { stroke-dashoffset: 0; }
.haken.erledigt .haken-text::before { content: "Erledigt, super gemacht!"; }

/* Notizen */
.notiz { display: block; margin-top: 14px; }
.notiz-titel { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: .85rem; color: var(--leise); margin: 0 4px 6px; }
.notiz-titel em { font-style: normal; font-weight: 700; font-size: .78rem; color: var(--salbei); }
.notiz textarea {
  display: block; width: 100%; resize: vertical; min-height: 3.6em; padding: 10px 14px; border-radius: 14px;
  border: 2px solid #f0e2d6; background: #fffdf9; color: var(--tinte); font: inherit; font-size: 1rem; line-height: 1.45;
  background-image: repeating-linear-gradient(transparent 0 calc(1.45em - 1px), #f3e7dc calc(1.45em - 1px) 1.45em);
  background-position: 0 10px; background-attachment: local; transition: border-color .2s;
}
.notiz textarea:focus { outline: none; border-color: var(--pfirsich); }

.blaettern { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 22px; }
.knopf {
  padding: 12px 18px; border-radius: 16px; background: var(--papier); box-shadow: var(--schatten);
  color: var(--tinte); text-decoration: none; font-weight: 800; transition: transform .2s;
}
.knopf:hover { transform: translateY(-2px) rotate(-1deg); }
.knopf.gesperrt { background: transparent; box-shadow: none; color: var(--leise); font-weight: 700; }

/* Brief */
.brief h2 {
  font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 700;
  font-size: 2rem; margin: 10px 0 14px; color: var(--koralle);
}
.brief p { line-height: 1.65; }
.gruss { text-align: right; font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; font-size: 1.4rem; font-weight: 600; }

/* Kalender */
.kalender-info { text-align: center; margin: 0 0 18px; }
.pille { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--salbei-hell); font-weight: 800; }
.monat {
  background: rgba(255, 250, 243, .82); backdrop-filter: blur(6px); border-radius: var(--rund); box-shadow: var(--schatten);
  padding: 18px 16px 20px; margin-bottom: 18px; animation: rein .6s both;
}
.monat:nth-of-type(2) { animation-delay: .08s; } .monat:nth-of-type(3) { animation-delay: .16s; }
.monat:nth-of-type(4) { animation-delay: .24s; } .monat:nth-of-type(5) { animation-delay: .32s; }
.monat h3 {
  margin: 0 0 12px 4px; font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100;
  font-size: 1.5rem; font-weight: 700; color: var(--koralle);
}
.monat h3 span { color: var(--leise); font-weight: 400; font-size: 1.1rem; }
.woche, .tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.woche span { text-align: center; font-size: .75rem; font-weight: 800; color: var(--leise); text-transform: uppercase; margin-bottom: 4px; }
.kachel {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px;
  font-weight: 800; font-size: 1rem; text-decoration: none; color: var(--tinte);
}
.kachel.aussen { color: #ddd0c6; font-weight: 600; }
.kachel.zukunft { background: #f1e9e2; color: #c9bab0; }
.kachel.offen {
  background: #fff; box-shadow: 0 2px 0 #f1e3d6, 0 4px 10px -4px rgba(110, 60, 40, .3); transform: rotate(var(--dreh, 0deg));
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
.kachel.offen:hover { transform: rotate(0) scale(1.12); z-index: 1; }
.kachel.heute { background: var(--koralle); color: #fff; animation: pulsieren 2.4s ease-in-out infinite; }
@keyframes pulsieren { 50% { box-shadow: 0 0 0 7px rgba(228, 111, 115, .2); } }
.kachel.erledigt::after {
  content: "✓"; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--salbei); color: #fff; font-size: .72rem; display: grid; place-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
}
.kachel.rentenstart { background: var(--butter); line-height: 1; text-align: center; }
.kachel.rentenstart b, .kachel.rentenstart small { display: block; }
.kachel.rentenstart small { font-size: .6rem; }

/* Countdown, immer sichtbar */
.countdown {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px; width: max-content; max-width: calc(100% - 24px);
  background: rgba(255, 250, 243, .88); backdrop-filter: blur(12px); border-radius: 999px; box-shadow: var(--schatten);
  animation: hoch .7s .5s cubic-bezier(.2, .9, .3, 1.3) both;
}
@keyframes hoch { from { transform: translate(-50%, 140%); } }
.countdown .countdown-titel { font-weight: 800; font-size: .82rem; line-height: 1.15; color: var(--leise); max-width: 7.5em; }
.ziffern { display: flex; gap: 6px; }
.ziffern .feld {
  min-width: 52px; padding: 5px 6px 4px; border-radius: 14px; background: var(--koralle); color: #fff; text-align: center;
}
.ziffern .feld b {
  display: block; font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100; font-weight: 700;
  font-size: 1.45rem; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.ziffern .feld small { display: block; font-size: .62rem; font-weight: 800; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.ziffern .feld.sek { background: var(--pfirsich); color: var(--tinte); }
.ziffern b.hops { animation: hops .35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes hops { from { transform: translateY(-5px) scale(1.12); } }

/* große Variante auf der Begrüßungsseite */
.ansicht-willkommen .countdown-gross ~ * {}
.countdown-gross { margin-top: 28px; padding: 22px 12px; border-radius: 20px; background: var(--rosa); text-align: center; }
.countdown-gross .countdown-titel { font-weight: 800; margin-bottom: 12px; }
.countdown-gross .ziffern { justify-content: center; gap: 10px; }
.countdown-gross .feld { min-width: 74px; padding: 10px 6px 8px; border-radius: 18px; }
.countdown-gross .feld b { font-size: 2.4rem; }
body:has(.countdown-gross) .countdown { display: none; }

/* Vorschau-Hinweis */
.vorschau-banner {
  position: sticky; top: 0; z-index: 60; padding: 8px 14px; text-align: center; font-size: .85rem; font-weight: 700;
  background: var(--butter); color: var(--tinte);
}
.vorschau-banner a { color: inherit; }
.zeitreise { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; max-width: 560px; margin: 6px auto 2px; }
.zeitreise span { min-width: 15em; }
.zeitreise input { flex: 1 1 220px; accent-color: var(--koralle); }

/* Konfetti */
.konfetti { position: fixed; z-index: 90; pointer-events: none; width: 9px; height: 13px; border-radius: 3px; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  .blatt { padding: 22px 18px; }
  .inhalt { width: calc(100% + 36px); margin: 6px -18px 0; }
  .countdown { gap: 10px; padding-left: 14px; }
  .countdown .countdown-titel { font-size: .74rem; max-width: 6.5em; }
  .ziffern .feld { min-width: 46px; }
  .countdown-gross .feld { min-width: 64px; }
  .tage, .woche { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
