/* ============================================================
   Davids Wunschliste
   Visuelles Thema: moderner schottischer Golfclub.
   Nur Gestaltung – alle Klassen- und ID-Namen, die js/app.js
   verwendet, bleiben unverändert erhalten.
   ============================================================ */

/* ---------- 1. Farben, Maße, Schrift ------------------------ */

:root {
  /* Grün */
  --fairway:      #1f5c3a;   /* tiefes Golfgrün, Primärfarbe    */
  --fairway-dark: #184a2e;
  --fairway-soft: #2f7a4f;
  --pine:         #14301f;   /* dunkles Tannengrün, Navigation  */
  --pine-deep:    #0e2416;

  /* Neutrale Flächen */
  --cream:        #f7f2e7;   /* Seitenhintergrund               */
  --paper:        #fffdf8;   /* Karten                          */
  --sand:         #e9dfc7;
  --sand-deep:    #d8caa9;
  --sand-line:    #ded2b6;

  /* Akzente */
  --claret:       #8f2f28;   /* Rostrot / Bordeaux              */
  --claret-soft:  #b8534a;
  --thistle:      #34617f;   /* gedämpftes Schottisch-Blau      */

  /* Text */
  --ink:          #23282a;   /* Anthrazit                       */
  --ink-soft:     #5a6158;
  --ink-faint:    #6b7364;
  --on-dark:      #f4efe2;
  --on-dark-soft: #cfd8c8;

  /* Form */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 48, 31, .06), 0 2px 6px rgba(20, 48, 31, .05);
  --shadow-md: 0 2px 4px rgba(20, 48, 31, .06), 0 10px 24px -10px rgba(20, 48, 31, .22);
  --shadow-lg: 0 6px 14px rgba(20, 48, 31, .10), 0 26px 50px -24px rgba(20, 48, 31, .34);

  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);

  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ring: 0 0 0 3px rgba(31, 92, 58, .18), 0 0 0 1.5px var(--fairway);
}

/* ---------- 2. Grundlagen ----------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--cream);
  /* sehr feine Papierstruktur, kostet kein Bild */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(31, 92, 58, .045), transparent 42%),
    radial-gradient(circle at 86% 68%, rgba(52, 97, 127, .04), transparent 46%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0;
}

a { color: var(--thistle); }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--fairway);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- 3. Crawford-Tartan ------------------------------ */
/* Nachgewebt nach dem Thread Count des Crawford-Setts
   (Vestiarium Scoticum 1842):  DC/12 W4 DC60 G24 DC6 G24 DC/6
   – an den Pivots gespiegelt ergibt das einen Rapport von 254 Fäden.
   Kette (warp) deckend, Schuss (weft) halbtransparent darüber:
   an den Kreuzungen mischen sich die Farben wie im echten Gewebe.
   1 Faden = 0,30px, Rapport 76.2px.                            */

.tartan,
.tartan-band {
  background-color: #7e2130;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(126, 33, 48, .55) 0.00px, rgba(126, 33, 48, .55) 3.60px,
      rgba(236, 227, 209, .62) 3.60px, rgba(236, 227, 209, .62) 4.80px,
      rgba(126, 33, 48, .55) 4.80px, rgba(126, 33, 48, .55) 22.80px,
      rgba(29, 71, 50, .66) 22.80px, rgba(29, 71, 50, .66) 30.00px,
      rgba(126, 33, 48, .55) 30.00px, rgba(126, 33, 48, .55) 31.80px,
      rgba(29, 71, 50, .66) 31.80px, rgba(29, 71, 50, .66) 39.00px,
      rgba(126, 33, 48, .55) 39.00px, rgba(126, 33, 48, .55) 40.80px,
      rgba(29, 71, 50, .66) 40.80px, rgba(29, 71, 50, .66) 48.00px,
      rgba(126, 33, 48, .55) 48.00px, rgba(126, 33, 48, .55) 49.80px,
      rgba(29, 71, 50, .66) 49.80px, rgba(29, 71, 50, .66) 57.00px,
      rgba(126, 33, 48, .55) 57.00px, rgba(126, 33, 48, .55) 75.00px,
      rgba(236, 227, 209, .62) 75.00px, rgba(236, 227, 209, .62) 76.20px),
    repeating-linear-gradient(90deg,
      #7e2130 0.00px, #7e2130 3.60px,
      #ece3d1 3.60px, #ece3d1 4.80px,
      #7e2130 4.80px, #7e2130 22.80px,
      #1d4732 22.80px, #1d4732 30.00px,
      #7e2130 30.00px, #7e2130 31.80px,
      #1d4732 31.80px, #1d4732 39.00px,
      #7e2130 39.00px, #7e2130 40.80px,
      #1d4732 40.80px, #1d4732 48.00px,
      #7e2130 48.00px, #7e2130 49.80px,
      #1d4732 49.80px, #1d4732 57.00px,
      #7e2130 57.00px, #7e2130 75.00px,
      #ece3d1 75.00px, #ece3d1 76.20px);
}

/* Karo-Band unter dem Kopfbereich: hoch genug, dass die Kreuzungen
   des Setts wirklich zu sehen sind. */
.tartan-band {
  height: 32px;
  box-shadow: inset 0 2px 0 rgba(9, 30, 18, .45),
              inset 0 -2px 0 rgba(9, 30, 18, .3);
}

/* ---------- 5. Kopfbild ------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: clamp(340px, 42vw, 480px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #dfd3b4;
  overflow: hidden;
}

/* Das Foto aus assets/. Fehlt es, bleibt die Ebene leer und die
   gezeichnete Szene darunter übernimmt. */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("../assets/hero.jpg");
  background-image: image-set(url("../assets/hero.webp") type("image/webp"),
                              url("../assets/hero.jpg")  type("image/jpeg"));
  background-size: cover;
  background-position: center 50%;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}

.hero-scene svg { display: block; width: 100%; height: 100%; }

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='4'%20stitchTiles='stitch'%20seed='9'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='180'%20height='180'%20filter='url(%23n)'%20opacity='.55'/%3E%3C/svg%3E") repeat;
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  opacity: .22;
}

/* Heller Schleier links: darauf steht die dunkle Schrift ruhig und lesbar */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(100deg,
    rgba(250, 246, 236, .86) 0%,
    rgba(250, 246, 236, .72) 24%,
    rgba(250, 246, 236, .42) 41%,
    rgba(250, 246, 236, .1) 58%,
    rgba(250, 246, 236, 0) 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 58px) var(--gutter);
}

.hero-text { max-width: 34rem; }

.hero-eyebrow {
  margin: 0 0 10px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fairway-dark);
  text-shadow: 0 1px 2px rgba(253, 250, 241, .8);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  letter-spacing: -.025em;
  color: var(--pine);
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(253, 250, 241, .85);
}

.lede {
  margin: 16px 0 0;
  max-width: 30rem;
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  line-height: 1.62;
  color: #2f3a33;
  text-shadow: 0 1px 2px rgba(253, 250, 241, .8);
}

/* Handschriftlicher Gruß rechts unten im Bild */
.hero-script {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 5vw, 64px);
  bottom: clamp(50px, 7vw, 80px);
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
  color: #fffdf4;
  text-shadow: 0 2px 12px rgba(13, 34, 21, .9), 0 0 4px rgba(13, 34, 21, .55);
}

.hero-script::before {
  content: "";
  position: absolute;
  inset: -26px -34px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(11, 30, 19, .5), rgba(11, 30, 19, 0) 100%);
}

.hero-script::after {
  content: "";
  display: block;
  width: 62%;
  height: 2px;
  margin: 6px auto 0;
  border-radius: 2px;
  background: currentColor;
  opacity: .7;
}

.hero .tartan-band {
  position: relative;
  z-index: 4;
  margin-top: auto;
}

/* ---------- 6. Hauptbereich --------------------------------- */

main {
  position: relative;
  z-index: 1;
  /* Blockabstände getrennt setzen: .wrap steuert nur die Seitenränder */
  padding-block: clamp(34px, 5vw, 56px) clamp(44px, 7vw, 76px);
}

/* Kein Einblenden: Inhalte stehen sofort da. Die Klassen bleiben,
   weil js/app.js sie setzt – sie haben nur keine Wirkung mehr. */
.reveal, .reveal.in { opacity: 1; transform: none; }

/* Die Parallaxe des Titelblocks stilllegen, ohne app.js anzufassen */
.hero-text {
  transform: none !important;
  opacity: 1 !important;
}

/* ---------- 7. Admin-Leiste --------------------------------- */

.adminbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 22px;
  padding: 13px 16px 13px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #1b3d28, var(--pine));
  color: var(--on-dark);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.adminbar::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background-color: #7e2130;
  background-image: repeating-linear-gradient(0deg,
    rgba(9, 30, 18, .62)    0px, rgba(9, 30, 18, .62)   3.6px,
    rgba(0, 0, 0, 0)      3.6px, rgba(0, 0, 0, 0)      11.4px,
    rgba(143, 47, 40, .8) 11.4px, rgba(143, 47, 40, .8) 18.6px,
    rgba(0, 0, 0, 0)     18.6px, rgba(0, 0, 0, 0)      23.4px,
    rgba(52, 97, 127, .62) 23.4px, rgba(52, 97, 127, .62) 27px,
    rgba(0, 0, 0, 0)       27px, rgba(0, 0, 0, 0)       33px,
    rgba(247, 242, 231, .7) 33px, rgba(247, 242, 231, .7) 35.4px,
    rgba(0, 0, 0, 0)     35.4px, rgba(0, 0, 0, 0)       41.4px);
}

.adminbar-label {
  flex: 1 1 auto;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b9cfae;
}

.adminbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 8. Buttons -------------------------------------- */

button {
  font: inherit;
  cursor: pointer;
}

.primary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-align: center;
  transition: background-color .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.primary {
  background: var(--fairway);
  border-color: var(--fairway);
  color: #fdfbf3;
  box-shadow: var(--shadow-sm);
}

.primary:hover {
  background: var(--fairway-dark);
  border-color: var(--fairway-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.primary:active {
  transform: translateY(0);
  background: #123a24;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .22);
}

.primary:focus-visible { outline: none; box-shadow: var(--ring); }

.primary:disabled {
  background: var(--sand-deep);
  border-color: var(--sand-deep);
  color: #7e7663;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Der Gegenpol: alles, was rücknimmt oder abbricht */
.ghost {
  background: transparent;
  border-color: rgba(143, 47, 40, .45);
  color: var(--claret);
}

.ghost:hover {
  background: rgba(143, 47, 40, .08);
  border-color: var(--claret);
}

.ghost:active { background: rgba(143, 47, 40, .16); }

.ghost:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(143, 47, 40, .18), 0 0 0 1.5px var(--claret);
}

/* auf dunklem Grund (Admin-Leiste) */
.adminbar .ghost {
  border-color: rgba(244, 239, 226, .38);
  color: var(--on-dark);
}

.adminbar .ghost:hover {
  background: rgba(244, 239, 226, .12);
  border-color: rgba(244, 239, 226, .7);
}

.primary.small, .ghost.small {
  padding: 8px 15px;
  font-size: .87rem;
}

.linkish {
  padding: 2px 1px;
  border: 0;
  background: none;
  color: var(--thistle);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .15s ease;
}

.linkish:hover { color: var(--claret); }

.icon-btn {
  padding: 6px 12px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-pill);
  background: var(--cream);
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.icon-btn:hover {
  background: var(--sand);
  border-color: var(--sand-deep);
  color: var(--ink);
}

.icon-btn:active { background: var(--sand-deep); }

/* ---------- 9. Formular-Panel ------------------------------- */

.panel {
  position: relative;
  margin: 0 0 26px;
  padding: clamp(22px, 3.6vw, 32px);
  border: 1px solid var(--sand-line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 6px;
  background-color: #7e2130;
  background-image: repeating-linear-gradient(90deg,
    #7e2130 0.00px, #7e2130 2.64px,
    #ece3d1 2.64px, #ece3d1 3.52px,
    #7e2130 3.52px, #7e2130 16.72px,
    #1d4732 16.72px, #1d4732 22.00px,
    #7e2130 22.00px, #7e2130 23.32px,
    #1d4732 23.32px, #1d4732 28.60px,
    #7e2130 28.60px, #7e2130 29.92px,
    #1d4732 29.92px, #1d4732 35.20px,
    #7e2130 35.20px, #7e2130 36.52px,
    #1d4732 36.52px, #1d4732 41.80px,
    #7e2130 41.80px, #7e2130 55.00px,
    #ece3d1 55.00px, #ece3d1 55.88px);
}

.panel h2 {
  margin: 4px 0 20px;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  color: var(--pine);
}

.field { margin: 0 0 16px; }

.field label {
  display: block;
  margin: 0 0 6px;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-soft);
}

.req { color: var(--claret); }

.hint {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: .8rem;
}

input[type="text"],
input[type="url"],
input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--sand-line);
  border-radius: var(--r-sm);
  background: #fffefb;
  color: var(--ink);
  font: inherit;
  font-size: .97rem;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input::placeholder { color: #8c8b78; }

input[type="text"]:hover,
input[type="url"]:hover,
input[type="password"]:hover { border-color: var(--sand-deep); }

input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--fairway);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 92, 58, .14);
}

.row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 0 18px;
  align-items: end;
}

.row .grow { min-width: 0; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--sand-line);
}

.form-msg {
  font-size: .89rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.form-msg.ok    { color: var(--fairway); }
.form-msg.error { color: var(--claret); }

/* Bildsuche */
.imgstatus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: -4px 0 18px;
  padding: 11px 14px;
  border: 1px solid var(--sand-line);
  border-left: 4px solid var(--sand-deep);
  border-radius: var(--r-sm);
  background: #faf6ec;
  font-size: .88rem;
  color: var(--ink-soft);
}

.imgstatus.found  { border-left-color: var(--fairway-soft); background: #f1f6ee; }
.imgstatus.failed { border-left-color: var(--claret-soft);  background: #fbf1ef; }

#image-preview {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  border: 1px solid var(--sand-line);
  object-fit: cover;
  background: #fff;
}

#image-status-text { flex: 1 1 160px; }

/* ---------- 10. Hinweise und leere Liste -------------------- */

.notice {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid rgba(143, 47, 40, .28);
  border-left: 5px solid var(--claret);
  border-radius: var(--r-md);
  background: #fbf2f0;
  color: #6c2822;
  font-size: .95rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.notice strong { color: var(--claret); }

.notice code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(143, 47, 40, .1);
  font-size: .88em;
}

.empty {
  margin: 28px 0 0;
  padding: 40px 24px;
  border: 1px dashed var(--sand-deep);
  border-radius: var(--r-lg);
  background: rgba(255, 253, 248, .6);
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* ---------- 11. Wunschliste: Zeilen untereinander ----------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wish {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px 22px;
  align-items: center;
  padding: 34px 20px 16px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.wish:hover {
  transform: translateY(-2px);
  border-color: var(--sand-deep);
  box-shadow: var(--shadow-md);
}

.wish:focus-within {
  border-color: var(--fairway-soft);
  box-shadow: var(--shadow-md);
}

.thumb {
  grid-row: 1;
  width: 96px;
  height: 96px;
  object-fit: contain;
  padding: 7px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-md);
  background: #fbf8f0;
  transition: transform .3s ease;
}

.wish:hover .thumb { transform: scale(1.03); }

/* Ohne Produktbild steht an gleicher Stelle ein Fairway-Feld mit Golfball,
   damit alle Zeilen sauber in einer Flucht bleiben. */
.wish.no-image::before {
  content: "";
  grid-row: 1;
  width: 96px;
  height: 96px;
  border-radius: var(--r-md);
  border: 1px solid rgba(20, 48, 31, .25);
  background-color: #1e563a;
  background-image:
    radial-gradient(circle 11px at 50% 50%, rgba(253, 251, 245, .95) 98%, rgba(0, 0, 0, 0) 100%),
    repeating-linear-gradient(112deg,
      rgba(255, 255, 255, .06) 0px, rgba(255, 255, 255, .06) 16px,
      rgba(0, 0, 0, 0) 16px, rgba(0, 0, 0, 0) 32px);
}

.wish-body { min-width: 0; }

.wish-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pine);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.wish-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin: 9px 0 0;
  font-size: .87rem;
}

.price {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  background: rgba(31, 92, 58, .1);
  color: var(--fairway-dark);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.wish-meta a {
  color: var(--thistle);
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 97, 127, .35);
  padding-bottom: 1px;
  overflow-wrap: anywhere;
  transition: color .15s ease, border-color .15s ease;
}

.wish-meta a:hover {
  color: var(--claret);
  border-bottom-color: var(--claret);
}

/* Status oben rechts auf der Karte: „Offen" für freie Zeilen,
   „Inaktiv" für ausgeblendete, der Badge für vergebene. Alle drei
   sitzen an derselben Stelle, es erscheint immer nur einer. */
.wish::after {
  position: absolute;
  top: 13px;
  right: 18px;
  padding: 3px 11px 3px 22px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wish:not(.taken):not(.inactive)::after {
  content: "Offen";
  border: 1px solid rgba(31, 92, 58, .3);
  background: rgba(31, 92, 58, .08)
    radial-gradient(circle 3.4px at 12px 50%, var(--fairway) 98%, rgba(0, 0, 0, 0) 100%) no-repeat;
  color: var(--fairway-dark);
}

.wish.inactive::after {
  content: "Inaktiv";
  border: 1px solid var(--sand-deep);
  background: rgba(107, 115, 100, .1)
    radial-gradient(circle 3.4px at 12px 50%, #8b9384 98%, rgba(0, 0, 0, 0) 100%) no-repeat;
  color: var(--ink-soft);
}

.badge {
  position: absolute;
  top: 13px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  background: rgba(143, 47, 40, .1);
  border: 1px solid rgba(143, 47, 40, .26);
  color: var(--claret);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wish-note {
  margin: 9px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--sand-deep);
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.wish-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 190px;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* vergebene Wünsche treten zurück, bleiben aber gut lesbar */
.wish.taken {
  background: #f6f2e8;
  border-color: var(--sand-deep);
  box-shadow: none;
}

.wish.taken:hover { transform: none; box-shadow: var(--shadow-sm); }

/* Ausgeblendete Wünsche – nur im Admin-Modus sichtbar. Der gestrichelte
   Rahmen zeigt auf einen Blick, dass Gäste diese Zeile nicht bekommen. */
.wish.inactive {
  border-style: dashed;
  border-color: var(--sand-deep);
  background: #f4f0e4;
  box-shadow: none;
}

.wish.inactive:hover { transform: none; box-shadow: var(--shadow-sm); }

.wish.inactive .wish-title,
.wish.inactive .price,
.wish.inactive .wish-note { color: var(--ink-faint); }

.wish.inactive .thumb,
.wish.inactive .wish-meta,
.wish.inactive .wish-actions > .primary,
.wish.inactive .wish-actions > .ghost { opacity: .55; }

.wish.inactive .badge { display: none; }

/* Ein ausgeblendeter Wunsch lässt sich nicht reservieren – die
   Datenbank weist es ohnehin ab, also gar nicht erst anbieten. */
.wish.inactive:not(.taken) .wish-actions > .primary { display: none; }

/* Der Umschalter hebt sich leicht von Bearbeiten und Löschen ab */
.toggle-active {
  padding-left: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7364' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.8-6.4 10-6.4S22 12 22 12s-3.8 6.4-10 6.4S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='2.7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 9px 50%;
  background-size: 14px 14px;
}

.wish.inactive .toggle-active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5c3a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 3.5l17 17'/%3E%3Cpath d='M10 5.9a9.6 9.6 0 0 1 2-.2c6.2 0 10 6.3 10 6.3a18 18 0 0 1-3.4 4M6.6 7.3A17.7 17.7 0 0 0 2 12s3.8 6.4 10 6.4c1.5 0 2.8-.4 4-.9'/%3E%3C/svg%3E");
  border-color: rgba(31, 92, 58, .4);
  color: var(--fairway-dark);
  opacity: 1;
}

.wish.taken .thumb { opacity: .65; }

.wish.taken .wish-title { color: var(--ink-soft); }

/* ---------- 12. Übersicht unter der Liste ------------------- */

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.6vw, 16px);
  margin: clamp(26px, 4vw, 40px) 0 0;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 18px 20px 17px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.stat::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--fairway);
}

.stat:nth-child(2)::before { background: var(--thistle); }
.stat:nth-child(3)::before { background: var(--claret); }

.stat-icon {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--ink-faint);
}

.stat:nth-child(1) .stat-icon { color: var(--fairway); }
.stat:nth-child(2) .stat-icon { color: var(--thistle); }
.stat:nth-child(3) .stat-icon { color: var(--fairway); }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.4vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- 13. Schalter unter der Übersicht ---------------- */

.toolbar {
  display: flex;
  justify-content: center;
  margin: 16px 0 0;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  font-size: .89rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: border-color .15s ease, color .15s ease;
}

.switch:hover {
  border-color: var(--sand-deep);
  color: var(--ink);
}

.switch input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 42px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: var(--r-pill);
  background-color: var(--sand-deep);
  background-image: radial-gradient(circle 8.5px at 12px 12px, #fffdf8 99%, rgba(0, 0, 0, 0) 100%);
  background-repeat: no-repeat;
  background-position: 0 0;
  box-shadow: inset 0 1px 3px rgba(20, 48, 31, .2);
  cursor: pointer;
  transition: background-color .2s ease, background-position .2s cubic-bezier(.3, .8, .3, 1);
}

.switch input:checked {
  background-color: var(--fairway);
  background-position: 18px 0;
}

.switch input:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 3px rgba(20, 48, 31, .2), var(--ring);
}


/* ---------- 13b. Kleine Symbole in den Zeilen ---------------- */

.price::before,
.wish-meta a::before,
.wish-note::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 15px;
  height: 15px;
  margin-right: 7px;
  vertical-align: -3px;
  background: center / contain no-repeat;
}

.price::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23184a2e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.4'/%3E%3Cpath d='M12 7.6v8.8M14.4 9.6a2.6 2.6 0 0 0-4.6 1.4c0 2.6 4.8 1.4 4.8 4a2.6 2.6 0 0 1-4.7 1.3'/%3E%3C/svg%3E"); }

.wish-meta a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334617f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.2 13.8a4 4 0 0 0 5.7 0l2.6-2.6a4 4 0 1 0-5.7-5.7l-1.5 1.5'/%3E%3Cpath d='M13.8 10.2a4 4 0 0 0-5.7 0l-2.6 2.6a4 4 0 1 0 5.7 5.7l1.5-1.5'/%3E%3C/svg%3E"); }

.wish-note::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7364' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s6.6-6.2 6.6-11A6.6 6.6 0 0 0 5.4 10c0 4.8 6.6 11 6.6 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E"); }

.wish-note {
  display: flex;
  align-items: flex-start;
  gap: 0;
  border-left: 0;
  padding-left: 0;
}

.wish-note::before { margin-top: 3px; }

/* Symbol im Aktionsbutton */
.wish-actions > .primary::before,
.wish-actions > .ghost::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: center / contain no-repeat;
}

.wish-actions > .primary::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fdfbf3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 21V4M6 5l11 3.4L6 12'/%3E%3C/svg%3E"); }

.wish-actions > .ghost::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f2f28' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h9.5a5.5 5.5 0 1 1 0 11H8'/%3E%3Cpath d='M7.5 5L4 9l3.5 4'/%3E%3C/svg%3E"); }

/* ---------- 14. Reservieren / Aufheben ---------------------- */

.wish-lock {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #f7f2e7, #f3ecdd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.lock-hint {
  margin: 0 0 11px;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.lock-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.lock-line input {
  flex: 1 1 160px;
  max-width: 320px;
  min-width: 0;
  padding: 9px 12px;
  font-size: .92rem;
}

.lock-msg {
  margin: 10px 0 0;
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.lock-msg:empty { display: none; }

.lock-msg.error { color: var(--claret); }

/* ---------- 15. Platzhalter beim Laden ---------------------- */

.skeleton {
  height: 130px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-lg);
  background: #f4eee1;
}

/* ---------- 17. Seitenabschluss ----------------------------- */
/* Unter dem Inhalt nur noch der Zugang zum Admin-Modus, darunter das
   Karo-Band als Schlusskante der Seite. Kein Text, kein Zeichen. */

footer {
  position: relative;
  z-index: 1;
  padding: clamp(30px, 5vw, 48px) var(--gutter) clamp(26px, 4vw, 40px);
  text-align: center;
}

.login { display: inline-block; }

#login-open {
  color: var(--ink-faint);
  font-size: .84rem;
  font-weight: 400;
}

#login-open:hover { color: var(--fairway); }

#login-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
  max-width: 420px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--sand-line);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

#login-pw {
  flex: 1 1 150px;
  min-width: 0;
  padding: 9px 13px;
}

.login-msg {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-size: .84rem;
  color: var(--ink-soft);
}

.login-msg:empty { display: none; }

.login-msg.error { color: var(--claret); }

/* Das Karo schließt die Seite ab */
body > .tartan-band {
  position: relative;
  z-index: 1;
}

/* ---------- 18. Schmale Bildschirme ------------------------- */

@media (max-width: 860px) {
  /* Aktionen rutschen unter Bild und Text, statt die Zeile zu quetschen */
  .wish { grid-template-columns: 84px minmax(0, 1fr); }

  .thumb, .wish.no-image::before { width: 84px; height: 84px; }

  .wish-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
  }

  .wish-actions > .primary,
  .wish-actions > .ghost { flex: 1 1 200px; }

  .admin-row { flex: 1 1 100%; }
}

@media (max-width: 860px) {
  .hero::before {
    background: linear-gradient(178deg,
      rgba(250, 246, 236, .96) 0%, rgba(250, 246, 236, .9) 46%,
      rgba(250, 246, 236, .55) 70%, rgba(250, 246, 236, .1) 100%);
  }
  .hero-script { display: none; }
}

@media (max-width: 760px) {
  .hero-photo {
    background-image: url("../assets/hero-small.jpg");
    background-image: image-set(url("../assets/hero-small.webp") type("image/webp"),
                                url("../assets/hero-small.jpg")  type("image/jpeg"));
  }
}

@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }

  .adminbar { align-items: stretch; flex-direction: column; gap: 12px; }

  .adminbar-actions > .primary,
  .adminbar-actions > .ghost { flex: 1 1 auto; }

  /* die Fahne wird beim Stauchen zum Strich – auf schmalen Geräten weglassen */
  .hero-flag { display: none; }

  .summary { gap: 8px; }

  .stat { padding: 14px 6px 12px; }

  .toolbar { justify-content: stretch; }

  .switch { width: 100%; }

  .lock-line { gap: 8px; }

  .lock-line input { flex: 1 1 100%; }

  .lock-line .primary { flex: 1 1 auto; }
}

@media (max-width: 620px) {
  /* Statuspille läuft in den Fluss, damit sie nie neben den Titel gerät */
  .wish { padding-top: 16px; }

  .wish::after {
    position: static;
    order: -1;
    grid-row: 1;
    grid-column: 1 / -1;
    justify-self: start;
  }

  /* Nur bei offenen Zeilen steht die Statuspille in Zeile 1 – dort rückt
     das Bild eine Zeile nach unten. Vergebene Zeilen bleiben unverändert. */
  .wish:not(.taken) .thumb,
  .wish:not(.taken).no-image::before,
  .wish.inactive .thumb,
  .wish.inactive.no-image::before { grid-row: 2; }

  .badge { position: static; }

  .summary { grid-template-columns: 1fr; }
  .stat { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
  .stat-icon { margin-bottom: 0; }
  .stat-num { min-width: 2ch; }
  .stat-label { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  .wish { gap: 10px 14px; padding: 16px 14px 14px; }

  .wish { grid-template-columns: 68px minmax(0, 1fr); }

  .thumb, .wish.no-image::before { width: 68px; height: 68px; }

  .wish.no-image::before {
    background-image:
      radial-gradient(circle 8px at 50% 50%, rgba(253, 251, 245, .95) 98%, rgba(0, 0, 0, 0) 100%),
      repeating-linear-gradient(112deg,
        rgba(255, 255, 255, .06) 0px, rgba(255, 255, 255, .06) 12px,
        rgba(0, 0, 0, 0) 12px, rgba(0, 0, 0, 0) 24px);
  }

  .wish-title { font-size: 1.12rem; }

  .stat-label { letter-spacing: .07em; font-size: .68rem; }
}

/* ---------- 19. Zeigergeräte vs. Touch ---------------------- */

@media (hover: none) {
  .wish:hover { transform: none; box-shadow: var(--shadow-sm); }
  .primary:hover { transform: none; }
}

/* größere Trefferflächen auf Touchgeräten */
@media (pointer: coarse) {
  .primary, .ghost { padding: 13px 22px; }
  .primary.small, .ghost.small { padding: 10px 17px; }
  .icon-btn { padding: 9px 14px; }
}

/* ---------- 20. Reduzierte Bewegung ------------------------- */

@media (prefers-reduced-motion: reduce) {
  .wish, .primary, .ghost, .icon-btn, .switch input, .stat, .thumb {
    transition: none;
  }

  .wish:hover, .primary:hover, .stat:hover { transform: none; }

  .wish:hover .thumb { transform: none; }
}

/* ---------- 21. Druck --------------------------------------- */

@media print {
  .hero-scene, .hero-photo, .hero-script, .tartan-band,
  .toolbar, .adminbar, .panel, .login { display: none !important; }

  body { background: #fff; }

  .hero { background: none; color: #000; min-height: 0; padding: 0 0 16px; }

  .hero h1 { color: #000; }

  .lede { color: #333; }

  .wish {
    break-inside: avoid;
    box-shadow: none;
  }
}
