:root {
  --blue: #6f8798;
  --blue-dark: #40596b;
  --blue-light: #dce6eb;
  --ivory: #fbfaf6;
  --white: #fff;
  --ink: #33434d;
  --muted: #75818a;
  --line: #dfe5e7;
  --shadow: 0 18px 55px rgba(61, 80, 91, .11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* KANN WEG*/
body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

body > main {
  animation: page-enter .55s ease both;
}

body > main[hidden] {
  display: none;
}

body.wishlist-open {
  background-color: var(--ivory);
}

body.wishlist-open .hero-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transition: background .45s ease, border-color .45s ease, box-shadow .45s ease;
}

body.wishlist-open .hero-card > h1,
body.wishlist-open .hero-card > .names,
body.wishlist-open .hero-card > .date,
body.wishlist-open .hero-card > .floral,
body.wishlist-open .intro {
  opacity: 0 !important;
  transition: opacity .45s ease;
}

body.wishlist-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../assets/Background.png") center / cover no-repeat;
  opacity: .2;
  z-index: 0;
  pointer-events: none;
}

body.page-exit .hero-card {
  animation: hero-card-exit .7s ease both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    filter: blur(2px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes hero-card-exit {
  from {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body > main,
  body.page-exit .hero-card {
    animation: none;
  }

  .wishlist-preview,
  .wishlist-preview.is-expanded {
    transition: none;
    transform: translate(-50%, -50%) rotate(-.2deg);
  }
}

.wishlist-page {
  background-color: var(--ivory);
  position: relative;
}

.wishlist-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../assets/Background.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .2;
  z-index: 0;
  pointer-events: none;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.landing {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 32px 20px;
  background-color: var(--ivory);
  /* Background image moved to ::before so we can control its opacity without affecting children */
}

.hero-stage {
  position: relative;
  width: min(640px, 100%);
  margin-top: -85px;
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/Background.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .2;
  z-index: 0;
  pointer-events: none;
}

.hero-card {
  width: 100%;
  text-align: center;
  padding: 62px 28px;
  position: relative;
  z-index: 3;
  background: var(--ivory);
  border: 1px solid rgba(64, 89, 107, .16);
  box-shadow: 0 8px 24px rgba(64, 89, 107, .12);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .68rem;
  color: var(--blue);
  font-weight: 600;
}

h1,
h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  color: var(--blue-dark);
  margin: 0 0 12px;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.05;
  font-style: italic;
  font-weight: 400;
}

.hero-card h1 {
  font-size: clamp(4.3rem, 15vw, 7rem);
  line-height: 1.02;
  margin: 0 0 28px;
  color: var(--blue-dark);
}

.hero-card h1 span {
  font-style: italic;
  font-weight: 400;
}

.save-date {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  color: var(--blue-dark);
  margin: 0 0 12px;
  letter-spacing: 0;
  text-align: center;
}

.names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  color: #566b78;
  text-transform: uppercase;
  letter-spacing: .32em;
  font-weight: 500;
}

.names span {
  padding: 0 12px;
  color: var(--blue);
  font-style: normal;
  font-weight: 400;
}

.date {
  margin-top: 12px;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: baseline;
  color: var(--muted);
}

.date-month,
.date-year {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .9rem;
  color: var(--blue);
}

.date-day {
  font-size: clamp(1.8rem, 4.8vw, 2.6rem);
  color: var(--blue-dark);
  font-weight: 600;
  padding: 0 18px;
  border-left: 2px solid rgba(51,77,94,0.15);
  border-right: 2px solid rgba(51,77,94,0.15);
}

.intro {
  max-width: 430px;
  margin: 28px auto 0;
  line-height: 1.8;
  color: var(--muted);
  font-size: .9rem;
}

.intro-anchor {
  position: relative;
  width: calc(100% + 56px);
  margin-left: -28px;
}

.wishlist-button {
  position: absolute;
  top: calc(100% - 75px);
  left: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  width: 220px;
  height: 270px;
  padding: 64px 24px 28px;
  background: url("../assets/ripped-paper-mask.svg") center / 100% 100% no-repeat;
  color: var(--blue-dark);
  filter: drop-shadow(0 15px 12px rgba(49, 40, 31, .28)) drop-shadow(0 3px 5px rgba(49, 40, 31, .16));
  transform: translateX(-50%) rotate(1deg);
  transition: transform .2s, filter .2s;
}

.hero-stage > .wishlist-button {
  z-index: 4;
}

.wishlist-button::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #91a5af 0 12%, var(--blue-dark) 38%, #273b47 100%);
  border: 1px solid rgba(39, 59, 71, .55);
  box-shadow: 0 2px 4px rgba(39, 43, 43, .3), inset 1px 1px 2px rgba(255, 255, 255, .35);
  transform: translateX(-50%);
}

.wishlist-label {
  position: relative;
  z-index: 1;
  transform: none;
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  font-style: italic;
}

.wishlist-preview-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 168px;
  margin-top: 24px;
  color: rgba(64, 89, 107, .8);
  font-family: 'Cormorant Garamond', serif;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: left;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.preview-bullet {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: rgba(64, 89, 107, .5);
}

.wishlist-button:hover {
  transform: translateX(-50%) translateY(-4px) rotate(1deg);
  filter: drop-shadow(0 12px 9px rgba(49, 40, 31, .32)) drop-shadow(0 3px 4px rgba(49, 40, 31, .18));
}

.floral {
  position: absolute;
  opacity: 1; /* vollständig sichtbar */
  width: 210px;
  height: 210px;
  background-image: url("../assets/Floral_Element.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  pointer-events: none;
}

.floral-top {
  top: 0;
  left: -25px;
  transform: rotate(0deg);
}

.floral-bottom {
  bottom: 0;
  right: -25px;
  transform: rotate(180deg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px clamp(18px, 5vw, 60px);
  background: rgba(251, 250, 246, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.back-link,
.admin-link {
  text-decoration: none;
  font-size: .75rem;
  color: var(--muted);
}

.admin-link {
  justify-self: end;
}

.header-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  text-align: center;
  color: var(--blue-dark);
}

.header-title span {
  font-style: italic;
  font-weight: 400;
}

.wishlist-wrap,
.admin-wrap {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 70px 0 100px;
}

.wishlist-page > main {
  position: relative;
  z-index: 1;
}

.wishlist-wrap {
  position: relative;
  width: min(640px, calc(100% - 40px));
  margin: 48px auto 0;
  padding: 62px 28px;
  background: transparent;
  isolation: isolate;
  transform: rotate(-.4deg);
}

.wishlist-preview {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(72vh, 660px);
  margin: 0;
  transform: translate(-50%, 0) scale(.36) rotate(1deg);
  transform-origin: top center;
  transition: transform .65s cubic-bezier(.22, .8, .25, 1);
  cursor: pointer;
}

.wishlist-preview.is-expanded {
  position: fixed;
  top: 50%;
  width: min(640px, calc(100% - 40px));
  max-height: calc(100svh - 32px);
  transform: translate(-50%, -50%) scale(1) rotate(-.4deg);
  transform-origin: center center;
  cursor: default;
}

.wishlist-preview .gift-card {
  pointer-events: none;
}

.wishlist-preview.is-expanded .gift-card {
  pointer-events: auto;
}

.wishlist-preview .gift-grid {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 -10px;
  padding: 0 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(64, 89, 107, .38) transparent;
}

.wishlist-preview .gift-grid::-webkit-scrollbar {
  width: 5px;
}

.wishlist-preview .gift-grid::-webkit-scrollbar-thumb {
  background: rgba(64, 89, 107, .38);
  border-radius: 999px;
}

.wishlist-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/ripped-paper-mask.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 22px 20px rgba(49, 40, 31, .34)) drop-shadow(0 5px 8px rgba(49, 40, 31, .2));
  z-index: -1;
}

.wishlist-wrap::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #91a5af 0 12%, var(--blue-dark) 38%, #273b47 100%);
  border: 1px solid rgba(39, 59, 71, .55);
  box-shadow: 0 4px 7px rgba(39, 43, 43, .32), inset 1px 1px 2px rgba(255, 255, 255, .35);
  transform: translateX(-50%);
  z-index: 2;
}

.wishlist-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 42px;
}

.wishlist-intro h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(4.3rem, 15vw, 7rem);
  color: var(--blue-dark);
  margin: 0 0 28px;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.02;
  font-style: italic;
  font-weight: 400;
}

.wishlist-intro p:last-child {
  color: var(--muted);
  line-height: 1.8;
  font-size: .9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 35px;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--muted);
  cursor: pointer;
  font-size: .75rem;
}

.filter.active,
.filter:hover {
  background: var(--blue-dark);
  color: white;
  border-color: var(--blue-dark);
}

.gift-grid {
  display: flex;
  flex-direction: column;
}

.gift-card {
  border-top: 0;
}

.gift-card.reserved {
  opacity: 1;
}

.gift-card.reserved .gift-content h2 {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(64, 89, 107, .72);
}

.gift-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 10px 0;
}

.gift-content h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--blue-dark);
}

.gift-content h2::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--blue-dark);
}

.gift-content p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.7;
}

.gift-meta {
  margin: 16px 0;
  font-size: .78rem;
  color: var(--muted);
}

.gift-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.primary-button {
  border: 0;
  background: var(--blue-dark);
  color: white;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: .7rem;
}

.gift-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  cursor: pointer;
}

.gift-checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox-mark {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--blue-dark);
  border-radius: 4px;
  background: transparent;
  transition: background .2s, border-color .2s, transform .2s;
}

.gift-checkbox input:focus-visible + .checkbox-mark {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.gift-checkbox input:checked + .checkbox-mark {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  transform: scale(1.05);
}

.gift-checkbox input:checked + .checkbox-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(34, 48, 57, .45);
  backdrop-filter: blur(5px);
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  position: relative;
  width: min(470px, 100%);
  background: var(--ivory);
  padding: 38px;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .2);
}

.modal h2 {
  font-size: 2.5rem;
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.modal-description {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 17px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  color: var(--muted);
  cursor: pointer;
}

form label {
  display: block;
  margin: 22px 0 8px;
  font-size: .75rem;
  font-weight: 600;
}

form label span {
  color: var(--muted);
  font-weight: 400;
}

form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  outline: none;
}

form input:focus {
  border-color: var(--blue);
}

.primary-button {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
}

.form-message {
  color: var(--blue-dark);
  font-size: .75rem;
}

.admin-page {
  min-height: 100svh;
}

.admin-dashboard {
  width: min(640px, 100%);
  margin: 0 auto;
}
.admin-heading h1 {
  margin-bottom: 16px;
}
.admin-add-form label {
  display: block;
  margin: 14px 0 7px;
  color: var(--blue-dark);
  font-size: .72rem;
  font-weight: 600;
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.admin-heading .eyebrow {
  margin-bottom: 8px;
}

.add-button,
.delete-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--blue-light);
  border-radius: 50%;
  background: var(--white);
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  transition: background .2s, color .2s, transform .2s;
}

.add-button:hover,
.delete-button:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: scale(1.05);
}

.admin-add-form {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .62);
}

.admin-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.admin-add-row .primary-button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.admin-gift-list {
  display: flex;
  flex-direction: column;
}

.admin-gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-gift-item .gift-content {
  min-height: 52px;
  padding: 4px 0;
}

.admin-gift-title {
  color: var(--blue-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  line-height: 1.1;
}

.delete-button {
  width: 32px;
  height: 32px;
  border-color: transparent;
  color: var(--muted);
  font-size: 1.4rem;
}

.admin-empty {
  color: var(--muted);
  font-size: .85rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.admin-card {
  background: white;
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.admin-card>span {
  font-size: 1.7rem;
}

.admin-card h2 {
  font-size: 1.8rem;
  color: var(--blue-dark);
  margin: 12px 0 5px;
}

.admin-card p {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.6;
}

@media (max-width: 800px) {
  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    padding: 15px;
  }

  .header-title {
    font-size: 1.15rem;
  }

  .wishlist-wrap,
  .admin-wrap {
    padding-top: 50px;
  }

  .wishlist-wrap {
    margin-top: 24px;
    padding: 40px 12px;
    transform: rotate(-.2deg);
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-add-row {
    grid-template-columns: 1fr;
  }

  .admin-add-row .primary-button {
    width: 100%;
  }

  .hero-card {
    padding: 40px 16px;
  }

  .hero-stage {
    width: calc(100% - 24px);
    margin-top: -20px;
  }

  .hero-card h1 {
    font-size: clamp(3.2rem, 17vw, 4.8rem);
    line-height: .98;
    margin-bottom: 22px;
  }

  .names {
    font-size: clamp(1.25rem, 6vw, 1.8rem);
    letter-spacing: .18em;
  }

  .names span {
    padding: 0 6px;
  }

  .date {
    gap: 8px;
  }

  .date-month,
  .date-year {
    font-size: .68rem;
    letter-spacing: .16em;
  }

  .date-day {
    font-size: 2rem;
    padding: 0 10px;
  }

  .floral {
    width: 150px;
    height: 150px;
  }

  .floral-top {
    left: -12px;
  }

  .floral-bottom {
    right: -12px;
  }

  .wishlist-button {
    width: 190px;
    height: 250px;
    padding: 58px 18px 22px;
  }

  .wishlist-preview {
    top: calc(50%);
    max-height: min(64svh, 520px);
    transform: translate(-50%, 0) scale(.4) rotate(1deg);
  }

  .wishlist-preview.is-expanded {
    top: 50%;
    width: calc(100% - 28px);
    max-height: calc(100svh - 44px);
    transform: translate(-50%, -50%) scale(1) rotate(-.4deg);
  }

  .wishlist-preview .wishlist-intro {
    margin-bottom: 22px;
  }

  .wishlist-preview .wishlist-intro h1 {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .wishlist-preview .gift-content {
    min-height: 56px;
  }

  .wishlist-preview .gift-content h2 {
    font-size: 1.2rem;
  }
}