/* Aufbau und Bausteine. Farben, Größen usw. kommen aus tokens.css */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-size);
  line-height: var(--line-height);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--clover-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--clover-dark); outline-offset: 3px; }

/* Überschriften im Skizzen-Stil des Logos */
h1, h2, h3, .tile-label {
  font-family: var(--font-hand);
  font-weight: var(--heading-weight);
  text-shadow: var(--heading-sketch);
  letter-spacing: 0.02em;
}h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--space-s); }
h1 {
  position: relative; display: inline-block;
  font-size: clamp(2.3rem, 5vw, 3.2rem);
  padding: 0 0.4em 0.35em 0.1em;
  margin-bottom: var(--space-m);
}
/* langer, doppelt gezogener Strich unter der Überschrift – wie im Logo */
h1::before, h1::after {
  content: ""; position: absolute; left: -0.3em; right: -0.6em; bottom: 0.12em;
  height: 2.5px; border-radius: 2px; background: var(--ink);
  transform: rotate(-0.6deg);
}
h1::after { background: var(--pencil); height: 1.5px; bottom: 0.02em; left: -0.1em; right: -0.9em; transform: rotate(0.4deg); }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Vorschau-Hinweis ---------- */
.preview-banner {
  background: var(--heart-tint);
  font-size: 0.875rem;
  text-align: center;
  padding: var(--space-xs) var(--space-m);
}

/* ---------- Online-Modus: "Work in progress" ---------- */
.wip-banner {
  background: var(--clover-tint); border-bottom: 1.5px dashed var(--clover-dark);
  text-align: center; font-size: 0.9rem; padding: var(--space-xs) var(--space-m);
}
.wip-hero {
  display: grid; gap: var(--space-l); align-items: center;
  margin-bottom: var(--space-xl); padding: var(--space-m);
  border: 2px solid var(--ink); border-radius: var(--wobbly);
}
.wip-hero img { width: 100%; max-width: 320px; margin: 0 auto; }
@media (min-width: 640px) { .wip-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.reach-links { display: flex; flex-wrap: wrap; gap: var(--space-s); margin: 0; }
.reach-links .btn svg, .wip-hero .btn svg { width: 20px; height: 20px; }
.reach-links .btn, .wip-hero .btn { white-space: nowrap; }
/* fehlende Bilder online einfach weglassen statt Platzhalter zu zeigen */
body.online .fairy-img.missing, body.online .portrait.missing,
body.online .deco.missing, body.online .fee.missing { display: none; }

/* ---------- Platzhalter (eindeutig gekennzeichnet) ---------- */
.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.25rem;
  background: var(--placeholder-bg);
  border: 2px dashed var(--pencil);
  color: #5f5f5b;
  font-size: 0.875rem;
  text-align: center;
  padding: var(--space-s);
}
.placeholder small { font-size: 0.75rem; }
.placeholder-text { color: #6a6a66; font-style: italic; }

/* ---------- Kopfbereich ---------- */
.site-header {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-m) 16px 0;
  text-align: center;
}
.logo { display: inline-block; text-decoration: none; color: inherit; }
.logo img { width: min(var(--logo-width), 88vw); height: auto; margin: 0 auto; }
.logo-placeholder { width: min(480px, 88vw); height: 150px; border-radius: var(--wobbly-soft); }

.lang-switch {
  display: flex; justify-content: center; gap: var(--space-m);
  margin: var(--space-s) 0;
  font-size: 0.95rem;
}
.lang-switch a { color: var(--ink); text-decoration: none; padding: 0.15rem 0.5rem; border-radius: var(--wobbly-soft); }
.lang-switch a[aria-current="true"] { background: var(--button-tint); font-weight: 700; box-shadow: inset 0 -2px 0 var(--button-line); }

.main-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs);
  padding: var(--space-s) 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  border-radius: 2px 6px 3px 5px;
}
.nav-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-size: 1rem;
  color: var(--ink); background: none;
  border: 1.5px solid transparent; border-radius: var(--wobbly-soft);
  padding: 0.4rem 0.8rem;
  min-height: 44px;
  cursor: pointer; text-decoration: none;
}
.nav-btn:hover { border-color: var(--ink); color: var(--ink); }
.nav-btn[aria-current="page"] { border-color: var(--button-line); background: var(--button-tint); }
.nav-btn svg { width: 20px; height: 20px; flex: none; }
.only-mobile { display: inline-flex; }

/* ---------- Grundlayout: Inhalt + rechte Seitenleiste ---------- */
.layout {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-l) 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
}
main:focus { outline: none; }

@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) var(--sidebar-width); }
  .only-mobile { display: none; }
  .fee-fab { display: none; }
}

/* ---------- Brotkrumen ---------- */
.breadcrumb { font-size: 0.875rem; margin-bottom: var(--space-s); color: #5f5f5b; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.3rem; color: var(--pencil); }

/* ---------- Text ---------- */
.prose { max-width: 65ch; margin-bottom: var(--space-l); }
.prose p { margin: 0 0 var(--space-s); }
.lang-missing {
  background: var(--heart-tint); border-left: 4px solid var(--heart);
  padding: var(--space-s); margin-bottom: var(--space-m); font-size: 0.95rem;
}

/* ---------- RECHTECKE (wiederverwendbar) ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--tile-gap);
  margin-bottom: var(--space-l);
}
@media (min-width: 640px) {
  .tile-grid { grid-template-columns: repeat(var(--tile-columns), minmax(0, 1fr)); }
}
.tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: var(--tile-min-height);
  padding: var(--space-m);
  background: var(--tile-bg);
  border: var(--tile-border);
  border-radius: var(--tile-radius);
  box-shadow: var(--tile-shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.tile:nth-child(2n) { border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px; }
.tile:hover, .tile:focus-visible {
  transform: rotate(var(--tile-hover-tilt)) translateY(-3px);
  border-color: var(--tile-hover-border-color);
  color: var(--ink);
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; }
.tile { container-type: inline-size; }
/* Schrift passt sich der Breite des Rechtecks an, lange Wörter brechen sauber um */
.tile-label {
  font-family: var(--font-hand); font-size: min(var(--tile-label-size), 20cqi); font-weight: 700;
  text-align: center; line-height: 1.1; hyphens: auto; overflow-wrap: anywhere;
}
.tile-label::after {
  content: ""; display: block; width: 40%; height: 3px; margin: 0.35rem auto 0;
  background: var(--clover); border-radius: 3px;
  transform: scaleX(0); transition: transform 0.25s ease;
}
.tile:hover .tile-label::after, .tile:focus-visible .tile-label::after { transform: scaleX(1); }

/* ---------- BILDRAHMEN + Galerie ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--space-l); margin-bottom: var(--space-l);
}
.frame {
  display: block; width: 100%;
  padding: var(--frame-padding);
  background: var(--frame-bg);
  border: var(--frame-border);
  border-radius: var(--frame-radius);
  box-shadow: var(--frame-shadow);
  transform: rotate(var(--frame-tilt));
  cursor: zoom-in; font: inherit; color: inherit;
  transition: transform 0.2s ease;
}
.frame:nth-child(2n) { transform: rotate(calc(var(--frame-tilt) * -1)); }
.frame:hover { transform: rotate(0) scale(1.03); }
.frame .placeholder { aspect-ratio: 4 / 3; border-radius: 6px; }
.frame-caption { display: block; font-size: 0.85rem; margin-top: 0.35rem; text-align: center; }

/* ---------- Karten (Menü, Preise, Sonderangebot) ---------- */
.card {
  border: 1.5px solid var(--ink);
  border-radius: var(--wobbly-soft);
  padding: var(--space-m);
  margin-bottom: var(--space-l);
}
.card ul { margin: 0; padding-left: 1.2rem; }
/* Specials: dezente Leiste, dominiert die Seite nicht */
.specials {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem;
  margin: 0 0 var(--space-l);
  padding: 0.35rem 0.2rem;
  border-top: 1px dashed var(--pencil); border-bottom: 1px dashed var(--pencil);
  font-size: 0.95rem;
}
.specials-tag { font-family: var(--font-hand); font-weight: 700; font-size: 1.35rem; color: var(--heart); }
.price-row { display: flex; justify-content: space-between; gap: var(--space-m); padding: var(--space-xs) 0; border-bottom: 1px dashed var(--pencil); }
.price-row:last-child { border-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-weight: 700;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: 0.6rem 1.2rem; min-height: 44px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--paper); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--button-tint); color: var(--ink); }
.btn-small { padding: 0.35rem 0.8rem; font-size: 0.9rem; min-height: 38px; }

/* ---------- Bausteine: ganze oder halbe Breite ---------- */
.blocks { display: flex; flex-wrap: wrap; column-gap: var(--space-l); align-items: flex-start; }
.blk { flex: 1 1 100%; min-width: 0; container-type: inline-size; }
.blk.w-half { flex: 0 1 calc(50% - var(--space-l) / 2); }
@media (max-width: 639px) { .blk.w-half { flex-basis: 100%; } }

/* ---------- Baustein: Menü mit Aufzählung + Foto ---------- */
.menu-block {
  display: grid; gap: var(--space-l); align-items: center;
  margin-bottom: var(--space-xl);
}
/* Text und Foto nebeneinander, sobald der Baustein breit genug ist */
@container (min-width: 520px) {
  .menu-block { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .menu-block.no-photo { grid-template-columns: minmax(0, 1fr); }
}
.menu-photo .placeholder { aspect-ratio: 4 / 3; border-radius: 6px; }
.menu-photo img, .gallery .frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.clover-list { list-style: none; margin: 0; padding: 0; }
.clover-list li { position: relative; padding-left: 2.1rem; margin: 0.55rem 0; }
/* Aufzählungszeichen: deine Zeichnungen (Kleeblatt, Herz), ein Punkt oder keins */
.clover-list li::before {
  content: ""; position: absolute; left: 0; top: 0.1em;
  width: var(--bullet-size); height: var(--bullet-size);
  background: url("../assets/kleeblatt.png") center / contain no-repeat;
}
.bullets-herz li::before { background-image: url("../assets/herz.png"); }
.bullets-punkt li::before {
  background: var(--ink); border-radius: 50%;
  width: 0.45rem; height: 0.45rem; left: 0.5rem; top: 0.65em;
}
.bullets-none li { padding-left: 0; }
.bullets-none li::before { display: none; }

/* ---------- Baustein: Slideshow ---------- */
.slideshow { margin: 0 0 var(--space-xl); }
.ss-viewport {
  position: relative; overflow: hidden; touch-action: pan-y;
  padding: var(--frame-padding); background: var(--frame-bg);
  border: var(--frame-border); border-radius: var(--frame-radius); box-shadow: var(--frame-shadow);
}
.ss-track { display: flex; list-style: none; margin: 0; padding: 0; transition: transform var(--slideshow-speed) ease; }
.ss-slide { flex: 0 0 100%; min-width: 0; }
.ss-img {
  display: block; width: 100%; aspect-ratio: var(--slideshow-ratio);
  padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--paper); cursor: zoom-in;
}
.ss-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ss-img .placeholder { height: 100%; border-radius: 6px; }
.ss-caption { margin: 0.6rem 0 0.2rem; text-align: center; font-size: 0.95rem; color: #4a4a48; }
.ss-nav {
  position: absolute; top: calc(50% - 24px); width: 44px; height: 44px;
  display: grid; place-items: center; padding: 0 0 4px;
  font-size: 1.8rem; line-height: 1; color: var(--ink);
  background: rgba(255, 255, 255, 0.92); border: 2px solid var(--ink); border-radius: 50%; cursor: pointer;
}
.ss-nav:hover { background: var(--clover-tint); }
.ss-prev { left: 14px; }
.ss-next { right: 14px; }
.ss-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-m); margin-top: var(--space-s); }
.ss-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; }
.ss-dot {
  width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.ss-dot::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--paper);
}
.ss-dot[aria-current="true"]::before { background: var(--clover-dark); border-color: var(--clover-dark); }

/* Slideshow im Bearbeiten-Modus: alle Bilder als Kacheln */
.slideshow-edit { margin: 0 0 var(--space-l); }
.ss-edit-list { list-style: none; margin: var(--space-s) 0; padding: 0; display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ss-edit-item { display: grid; gap: 0.4rem; align-content: start; }
.ss-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.ss-thumb .placeholder { aspect-ratio: 3 / 2; }
.ss-edit-cap { font-size: 0.9rem; min-height: 1.5em; }
.ss-edit-cap:empty::before { content: attr(data-placeholder); color: var(--pencil); font-style: italic; }
.ss-edit-tools { display: flex; flex-wrap: wrap; gap: 0.3rem; }

/* ---------- Baustein: Bild mit optionaler Unterschrift ---------- */
.image-block { margin: 0 0 var(--space-xl); }
.image-frame img { width: 100%; height: auto; border-radius: 6px; }
.image-frame .placeholder { aspect-ratio: 4 / 3; border-radius: 6px; }
.image-block figcaption { margin-top: 0.8rem; text-align: center; font-size: 0.95rem; color: #4a4a48; }
body.editing .image-block figcaption:empty::before { content: attr(data-placeholder); color: var(--pencil); font-style: italic; }

/* ---------- Baustein: Unterschrift (ohne Rahmen) ---------- */
.signature-block { display: flex; margin: var(--space-m) 0 var(--space-xl); }
.signature-block.align-center { justify-content: center; }
.signature-block.align-right { justify-content: flex-end; }
.signature-block img { height: auto; }
body.online .signature-block.missing { display: none; }

/* ---------- Baustein: großes Fee-Bild ---------- */
.fairy-block { display: flex; justify-content: center; margin: 0 0 var(--space-xl); }
.fairy-block.align-left { justify-content: flex-start; }
.fairy-block.align-right { justify-content: flex-end; }
.fairy-img { width: min(var(--size), 100%); aspect-ratio: 1 / 1.1; }
.fairy-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fairy-img.missing {
  display: grid; place-items: center; text-align: center; padding: var(--space-s);
  border: 2px dashed var(--pencil); border-radius: var(--wobbly-soft); background: var(--placeholder-bg);
}
.fairy-img.missing::after { content: "Platzhalter: " attr(data-label); font-size: 0.85rem; font-weight: 700; color: #5f5f5b; }

/* ---------- Bausteine bearbeiten (Vorschau) ---------- */
body.editing .blk { outline: 1.5px dashed var(--clover); outline-offset: 6px; margin-bottom: var(--space-l); }
.blk.dragging { opacity: 0.4; }
.blk.drop-before { box-shadow: 0 -5px 0 var(--heart); }
.blk.drop-after { box-shadow: 0 5px 0 var(--heart); }
.blk.w-half.drop-before { box-shadow: -5px 0 0 var(--heart); }
.blk.w-half.drop-after { box-shadow: 5px 0 0 var(--heart); }
.drag-handle {
  cursor: grab; touch-action: none; user-select: none;
  font-size: 1.2rem; line-height: 1; padding: 0.2rem 0.35rem;
  border: 1.5px solid var(--ink); border-radius: var(--wobbly-soft); background: var(--paper);
}
.drag-handle:active { cursor: grabbing; }
body.editing [contenteditable] {
  outline: 1px dashed var(--pencil); outline-offset: 2px; border-radius: 4px; cursor: text;
}
body.editing [contenteditable]:focus { outline: 2px solid var(--clover-dark); background: var(--paper); }
.prose-edit { white-space: pre-wrap; min-height: 1.6em; }
/* Einfache Zeilenumbrüche im Text behalten (z. B. Anschrift im Impressum) */
.prose p { white-space: pre-line; }
.item-del {
  margin-left: 0.5rem; padding: 0 0.3rem; border: 0; background: none;
  color: var(--heart); cursor: pointer; font-size: 0.85rem;
}
.pick-btn { display: contents; cursor: pointer; }
body.editing .frame-caption { font-weight: 700; color: var(--clover-dark); }
.block-tools, .block-add {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  margin-bottom: var(--space-s); padding: 0.35rem 0.5rem; font-size: 0.85rem;
  background: var(--clover-tint); border-radius: var(--wobbly-soft);
}
.block-tools strong { margin-right: 0.3rem; }
.block-add { margin-top: var(--space-l); border: 1.5px dashed var(--clover-dark); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn.btn-danger, .btn.btn-danger:hover { background: var(--heart); border-color: var(--heart); color: #fff; }
.edit-notice { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 70; max-width: min(520px, calc(100vw - 32px)); }

/* ---------- Fragen & Antworten ---------- */
.faq details { border-bottom: 1px dashed var(--pencil); padding: var(--space-s) 0; }
.faq summary { cursor: pointer; font-weight: 700; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: var(--space-m); max-width: 640px; }
.field { display: grid; gap: 0.3rem; }
.field label, .field legend { font-weight: 700; }
.field .hint { font-size: 0.85rem; color: #5f5f5b; }
.req { color: var(--heart); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: 0.55rem 0.7rem; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--clover-dark); }
.field-error { color: #b00045; font-size: 0.875rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; }
.check input { width: auto; margin-top: 0.35rem; }
.trap { position: absolute; left: -9999px; }
.notice { padding: var(--space-s) var(--space-m); border-radius: var(--wobbly-soft); }
.notice-ok { background: var(--clover-tint); border: 1.5px solid var(--clover-dark); }
.notice-err { background: var(--heart-tint); border: 1.5px solid var(--heart); }

/* ---------- Seitenleiste ---------- */
.sidebar { display: grid; gap: var(--space-l); align-content: start; }
.side-box { border: 1.5px solid var(--ink); border-radius: var(--wobbly-soft); padding: var(--space-m); }
.side-box h2 { font-size: 1.6rem; }

/* Foto von dir: rechts im Info-Kasten, Hochformat wie eine Briefmarke, schlichter schwarzer Rahmen */
.info-row { display: flex; align-items: flex-start; gap: var(--space-s); }
.info-main { flex: 1; min-width: 0; }
.portrait {
  flex: none; width: var(--portrait-width); aspect-ratio: 3 / 4;
  overflow: hidden; background: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--wobbly-soft);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.missing { display: grid; place-items: center; text-align: center; background: var(--placeholder-bg); }
.portrait.missing::after { content: attr(data-label); font-size: 0.65rem; font-weight: 700; color: #5f5f5b; padding: 0 0.3rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a {
  display: block; padding: 0.45rem 0.25rem; color: var(--ink); text-decoration: none;
  border-bottom: 1px dashed var(--pencil-light);
}
.side-nav a:hover, .side-nav a[aria-current="page"] { color: var(--clover-dark); padding-left: 0.6rem; }
.side-nav a { transition: padding 0.2s ease; }
.insta { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--ink); }
.insta svg { width: 22px; height: 22px; color: var(--heart); flex: none; }
/* als Link in der Seitenleiste: Symbol und Text nebeneinander, mittig ausgerichtet */
.side-nav a.insta { display: inline-flex; align-items: center; gap: 0.5rem; border-bottom: 0; }

/* Kommentare: einer nach dem anderen, Klick zeigt den nächsten */
.comment-card {
  display: block; width: 100%; min-height: 96px;
  font: inherit; font-size: 0.95rem; text-align: left; color: var(--ink);
  background: var(--clover-tint);
  border: 1.5px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: var(--space-s) var(--space-m); cursor: pointer;
  transition: transform 0.2s ease;
}
.comment-card:hover { transform: rotate(-0.6deg); }
.comment-text { display: block; margin-bottom: 0.3rem; }
.comment-meta { display: block; font-size: 0.8rem; color: #5f5f5b; }
.comment-nav { display: flex; align-items: center; justify-content: center; gap: var(--space-s); margin: var(--space-s) 0; font-size: 0.9rem; }
.comment-write { margin-top: var(--space-xs); }

/* ---------- Fee und Deko (frei platziert) ---------- */
#main { position: relative; }
.page-art { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.deco {
  position: absolute;
  width: calc(var(--s) * 1px * var(--deco-scale));
  height: calc(var(--s) * 1px * var(--deco-scale));
  transform: translate(-50%, -50%) rotate(var(--r));
}
.deco img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Fee: Höhe fest, Breite ergibt sich aus deinem Bild (Hoch- oder Querformat) */
.fee img { height: var(--fee-size); width: auto; max-width: none; display: block; }
.fee.missing { width: var(--fee-size); }
.fee.flipped img { transform: scaleX(-1); } /* gespiegelte Fee */
.fee {
  position: absolute; pointer-events: auto;
  height: var(--fee-size);
  transform: translate(-50%, -50%);
  padding: 0; border: 0; background: none; cursor: pointer;
  animation: fee-float 4s ease-in-out infinite;
}
.fee:hover { rotate: -8deg; }
@keyframes fee-float { 50% { translate: 0 -6px; } }
/* Platzhalter, solange deine Bilddatei fehlt */
.deco.missing, .fee.missing {
  display: grid; place-items: center;
  border: 1.5px dashed var(--pencil); border-radius: 50%;
  background: var(--placeholder-bg);
}
.deco-feebild.missing { border-radius: var(--wobbly-soft); }
.deco.missing::after, .fee.missing::after {
  content: attr(data-label); font-size: 0.65rem; font-weight: 700; color: #5f5f5b;
}
.fee-say {
  position: absolute; z-index: 3; transform: translateY(-50%);
  max-width: 230px; margin: 0;
  background: var(--clover-tint); border: 1.5px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: 0.45rem 0.7rem; font-size: 0.9rem; pointer-events: none;
}

/* Bearbeiten-Modus der Vorschau */
body.editing .deco, body.editing .fee {
  pointer-events: auto; cursor: grab; touch-action: none; animation: none;
  outline: 1.5px dashed var(--clover-dark); outline-offset: 3px;
}
body.editing .selected { outline: 2.5px solid var(--heart); }
.fee-off { opacity: 0.4; }
.edit-toolbar {
  position: fixed; left: 12px; bottom: 12px; z-index: 60;
  width: min(360px, calc(100vw - 24px));
  display: grid; gap: 0.5rem;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--wobbly-soft);
  box-shadow: 3px 4px 0 var(--pencil-light);
  padding: var(--space-s); font-size: 0.9rem;
}
.edit-toolbar .row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.edit-toolbar .tb-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.edit-toolbar.collapsed { width: auto; }
.edit-toolbar.collapsed > :not(.tb-head) { display: none; }
.edit-toolbar label { display: grid; gap: 0.25rem; font-weight: 700; }
.preview-banner button {
  font: inherit; font-size: 0.8rem; margin-left: 0.5rem;
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: 0.1rem 0.6rem; cursor: pointer;
}

/* ---------- Fußzeile ---------- */
.site-footer {
  max-width: var(--page-max); margin: 0 auto; padding: var(--space-m) 16px var(--space-l);
  border-top: 1.5px solid var(--ink);
  display: flex; flex-wrap: wrap; gap: var(--space-m); justify-content: center;
  font-size: 0.9rem;
}

/* ---------- Dialoge: Suche, Großansicht, Spiel ---------- */
dialog {
  border: 2px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: var(--space-m); background: var(--paper); color: var(--ink);
  width: min(640px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(29, 29, 27, 0.45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-s); margin-bottom: var(--space-s); }
.dialog-head h2 { margin: 0; }
.search-results { list-style: none; padding: 0; margin: var(--space-s) 0 0; max-height: 55vh; overflow: auto; }
.search-results li { padding: var(--space-s) 0; border-bottom: 1px dashed var(--pencil); }
.search-results a { font-weight: 700; }
.search-results p { margin: 0.2rem 0 0; font-size: 0.9rem; }
mark { background: var(--clover-tint); color: inherit; }

.lightbox { width: min(900px, calc(100vw - 32px)); }
.lightbox .placeholder { aspect-ratio: 4 / 3; font-size: 1rem; }

/* ---------- Effekte der Fee ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.fx-clover { position: absolute; display: block; }
.fx-clover svg { width: 100%; height: 100%; display: block; }
.fx-heart { position: absolute; left: 0; top: 0; width: 30px; height: 30px; }
.fx-heart svg { width: 100%; height: 100%; display: block; }
.basket { position: absolute; left: 0; bottom: 8px; width: var(--basket-w); height: var(--basket-h); }
.basket img, .basket svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.hearts-hud {
  position: fixed; top: 12px; right: 12px; z-index: 55;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--wobbly-soft);
  padding: 0.3rem 0.4rem 0.3rem 0.8rem; font-size: 0.9rem;
  box-shadow: 2px 3px 0 var(--pencil-light);
}
.fx-bubble {
  position: absolute; border-radius: 50%;
  /* Regenbogen-Pastell: die Farbe (--hue) bekommt jede Blase aus fee.js */
  border: 2px solid hsla(var(--hue, 120), 70%, 62%, 0.6);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), hsla(var(--hue, 120), 90%, 85%, 0.5));
}

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