@font-face {
  font-family: "DM Sans";
  src: url("/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/playfair.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f8f3ec;
  --paper: #fffbf6;
  --ink: #2f201d;
  --muted: #6d5850;
  --wine: #802b38;
  --wine-dark: #64212b;
  --line: #e3d6c9;
  --display: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
}

body:has(.admin-main), body:has(.site-footer) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { color: var(--wine-dark); background: #f0d0ce; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.16; }
a { color: var(--wine-dark); text-underline-offset: .24em; }
button, input, textarea { font: inherit; }

.container { width: min(74rem, calc(100% - 6rem)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 4.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  gap: .7rem;
  align-items: center;
  color: var(--ink);
  font: 600 1.42rem/1.1 var(--display);
  text-decoration: none;
  letter-spacing: -.045em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  background: var(--wine);
  color: #ffebd4;
  font: 400 1.02rem/1 var(--sans);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .58rem;
  min-height: 2.8rem;
  padding: .56rem 1.05rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.button-outline { border-color: #dfcec2; background: transparent; color: var(--wine-dark); }
.button-outline:hover, .button-text:hover { background: #f1e4dc; border-color: #dbc6bb; }
.button-primary { background: var(--wine); color: #fff8ec; }
.button-primary:hover { background: var(--wine-dark); }
.button-cream { background: #fff0d8; color: #581e26; padding-inline: 1.22rem; }
.button-cream:hover { background: #ffe0aa; }
.button-text { background: transparent; color: var(--wine-dark); }
.button:disabled { opacity: .65; cursor: wait; }

.link-icon {
  position: relative;
  width: 1rem;
  height: .86rem;
  transform: rotate(-38deg);
}

.link-icon::before, .link-icon::after {
  content: "";
  position: absolute;
  top: .18rem;
  width: .65rem;
  height: .46rem;
  border: 1.4px solid currentColor;
  border-radius: 1rem;
}

.link-icon::before { left: -.05rem; border-right-color: transparent; }
.link-icon::after { right: -.05rem; border-left-color: transparent; }

.hero {
  display: flex;
  align-items: center;
  margin-top: 1.7rem;
  min-height: 29rem;
  overflow: hidden;
  border-radius: 1rem;
  background-color: #521415;
  background-image: linear-gradient(90deg, #28070ac2 0%, #35080b90 44%, transparent 72%), url("/weihnachten.webp");
  background-position: center, right 53%;
  background-size: cover;
  color: #fff6e9;
}

.hero-content { padding: 3.2rem clamp(2rem, 5.25vw, 5.2rem); width: 100%; }
.eyebrow {
  margin-bottom: 1.15rem;
  color: #f3d2a3;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow span { margin-right: .33rem; }
.hero h1 {
  max-width: 8.4em;
  font-size: clamp(3.2rem, 6.6vw, 5.8rem);
  letter-spacing: -.062em;
  line-height: 1.01;
  text-wrap: balance;
}
.hero h1 span { color: #f1bb8c; }
.hero-intro { max-width: 23rem; margin-top: 1.33rem; color: #ffecdd; font-size: 1.05rem; }
.hero .button { margin-top: 1.65rem; }
.hero :focus-visible { outline-color: #ffe0aa; }

.wishes { padding: 2.8rem 0 3.25rem; scroll-margin-top: 1rem; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.27rem;
}
.section-heading h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); letter-spacing: -.05em; }
.count {
  border: 1px solid #e5d6cc;
  border-radius: 2rem;
  padding: .3rem .85rem;
  color: var(--wine-dark);
  background: #f4eae3;
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: .48rem;
  padding: 2.25rem 1.15rem;
  border: 1px dashed #d9c7ba;
  border-radius: .8rem;
  background: var(--paper);
  text-align: center;
}
.empty-state h3 { font-size: clamp(1.26rem, 3vw, 1.55rem); letter-spacing: -.034em; }
.empty-state p, .loading, .muted { color: var(--muted); }
.empty-state p { max-width: 31rem; }
.empty-state .button { margin-top: .4rem; }

.stamp {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.7rem;
  margin-bottom: .45rem;
  color: var(--wine);
  background: #f4e3da;
  border: 1px dashed #bf8e89;
  outline: 3px solid #f4e3da;
  transform: rotate(-9deg);
}
.stamp-sparkle, .stamp-star { position: absolute; font-size: .7rem; line-height: 1; }
.stamp-sparkle { top: .4rem; right: .33rem; }
.stamp-star { left: .32rem; bottom: .27rem; }
.gift {
  position: relative;
  display: block;
  width: 1.38rem;
  height: 1.12rem;
  margin-top: .28rem;
  border: 1.4px solid currentColor;
  border-radius: .12rem;
  background: linear-gradient(90deg, transparent 46%, currentColor 46% 53%, transparent 53%),
    linear-gradient(transparent 25%, currentColor 25% 34%, transparent 34%);
}
.gift::before, .gift::after {
  content: "";
  position: absolute;
  top: -.48rem;
  width: .44rem;
  height: .46rem;
  border: 1.3px solid currentColor;
}
.gift::before { right: 50%; border-radius: 75% 75% 0 75%; transform: skew(18deg, 8deg); }
.gift::after { left: 50%; border-radius: 75% 75% 75% 0; transform: skew(-18deg, -8deg); }

.wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1rem;
}
.wish-grid:has(.wish-image) {
  grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
}
.paper { background: var(--paper); border: 1px solid var(--line); border-radius: .82rem; }
.wish-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .7rem;
  padding: 1.25rem 1.35rem;
  min-width: 0;
}
.wish-top { display: flex; align-items: center; gap: .65rem; }
.wish-image {
  width: 100%;
  max-height: 15rem;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: .55rem;
  padding: .75rem;
  background: #fff;
}
.wish-symbol {
  display: grid;
  place-items: center;
  height: 2.35rem;
  width: 2.35rem;
  border-radius: .5rem;
  background: #f3e1d9;
  color: var(--wine);
  font-size: 1.2rem;
}
.favorite { color: var(--wine-dark); font-size: .87rem; font-weight: 700; }
.wish-card h3 { font-size: 1.55rem; overflow-wrap: anywhere; }
.wish-description { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.wish-details {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .5rem;
}
.wish-price { font-weight: 700; }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .6rem 1rem;
  min-height: 4.25rem;
  padding-block: .8rem;
  color: var(--muted);
  font-size: .88rem;
}
.footer-inner a { color: var(--muted); }
.footer-mark { color: var(--wine); margin-right: .35rem; }

.admin-main { padding: clamp(2rem, 5vw, 4rem) 0 4rem; }
.auth-panel { max-width: 29rem; margin-inline: auto; padding: clamp(1.4rem, 5vw, 2.5rem); }
.auth-panel h1, .admin-heading h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.045em; }
.auth-panel h1 { margin-block: .65rem .6rem; }
.auth-panel > p { color: var(--muted); margin-bottom: 1.2rem; }
.auth-panel form { display: grid; gap: .95rem; }
.auth-panel form .button { justify-self: start; }
.toolbar, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .52rem; }
.admin-wishes { display: grid; gap: .75rem; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.2rem; }
.admin-row h2 { font-size: 1.28rem; overflow-wrap: anywhere; }
.admin-row .muted { margin-top: .25rem; font-size: .9rem; }
.admin-row .toolbar { flex-shrink: 0; }
.admin-summary { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.admin-summary img, .product-preview img {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: #fff;
}

.dialog {
  width: min(100% - 1.6rem, 31rem);
  max-height: calc(100dvh - 1.6rem);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 75px #2f0b1738;
}
.dialog::backdrop { background: #2f131cc0; }
.dialog-content { padding: clamp(1.1rem, 4vw, 1.7rem); display: grid; gap: .78rem; }
.dialog h2 { font-size: 1.65rem; letter-spacing: -.035em; }
.editor-note { margin-top: -.3rem; }
.product-link { display: flex; align-items: stretch; gap: .42rem; margin-top: -.5rem; }
.product-link .button { flex: 0 0 auto; min-height: 2.5rem; padding-inline: .65rem; }
.product-status { font-size: .9rem; }
.product-preview { display: flex; align-items: center; gap: .5rem; }
.form-actions { justify-content: flex-end; margin-top: .35rem; }
label { display: grid; gap: .25rem; font-size: .91rem; font-weight: 700; }
input, textarea {
  min-width: 0;
  width: 100%;
  border-radius: .42rem;
  border: 1px solid #c9b7ab;
  padding: .48rem .65rem;
  background: #fffdf9;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}
textarea { resize: vertical; }
.checkbox { display: flex; gap: .55rem; align-items: center; }
.checkbox input { width: 1.07rem; height: 1.07rem; margin: 0; accent-color: var(--wine); }
.form-message { color: var(--wine-dark); font-weight: 700; }
.admin-heading + .form-message { margin-bottom: 1rem; }
.toast {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%);
  border-radius: .55rem;
  background: var(--wine-dark);
  color: var(--paper);
  padding: .7rem 1.05rem;
  box-shadow: 0 4px 18px #2f0b1733;
}

@media (max-width: 740px) {
  .container { width: calc(100% - 2rem); }
  .hero { min-height: 26rem; background-position: center, 66% center; }
  .hero-content { padding: 2.5rem 1.65rem; }
  .hero h1 { font-size: clamp(2.9rem, 9.3vw, 4.6rem); }
  .hero-intro { max-width: 19rem; }
  .admin-heading, .admin-row { flex-wrap: wrap; align-items: center; }
}

@media (max-width: 470px) {
  .container { width: calc(100% - 1.5rem); }
  .header-inner { min-height: 4.35rem; gap: .6rem; }
  .brand { font-size: 1.22rem; gap: .4rem; }
  .brand-mark { width: 1.7rem; height: 1.7rem; }
  .header-inner .button { padding-inline: .65rem; font-size: .83rem; }
  .hero {
    min-height: 34rem;
    margin-top: 1rem;
    align-items: flex-end;
    background-image: linear-gradient(0deg, #32090d 8%, #39090ddd 36%, #39090d12 76%),
      url("/weihnachten.webp");
    background-position: center, 87% top;
    background-size: cover, auto 80%;
    background-repeat: no-repeat;
  }
  .hero-content { padding: 2rem 1.2rem 1.55rem; }
  .eyebrow { margin-bottom: .67rem; font-size: .76rem; }
  .hero h1 { font-size: clamp(2.32rem, 10.4vw, 3.35rem); }
  .hero-intro { margin-top: .85rem; font-size: 1rem; }
  .hero .button { margin-top: 1.12rem; }
  .wishes { padding-block: 1.8rem 2.2rem; }
  .count { padding-inline: .57rem; }
  .empty-state { padding: 1.75rem .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
