@font-face { font-family: "Alfa Slab One"; src: url(fonts/AlfaSlabOne-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/Barlow-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/Barlow-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/BarlowCondensed-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(fonts/Caveat.ttf) format("truetype"); font-display: swap; }

:root {
  --holz: #24170e;
  --holz-hell: #4a2f1c;
  --brett: #6b4428;
  --creme: #f1e4c8;
  --senf: #e5a823;
  --rost: #c4441c;
  --papier: #f7efdc;
  --tinte: #2a1a10;
  --nacht: #16202e;
  --rand: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--holz);
  color: var(--creme);
  font: 400 17px/1.5 "Barlow", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--senf); }
h1, h2, h3 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; line-height: 1.05; margin: 0; }
.hand { font-family: "Caveat", cursive; font-size: 1.6rem; line-height: 1.2; }

.knopf {
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: 1.05rem; letter-spacing: .01em;
  background: var(--senf); color: var(--tinte);
  border: 0; border-radius: 4px; padding: 12px 20px; cursor: pointer;
  box-shadow: 0 4px 0 #8a5f0c;
  transition: transform .12s ease, box-shadow .12s ease;
}
.knopf:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #8a5f0c; }
.knopf:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a5f0c; }
.knopf:disabled { background: #b9a37a; box-shadow: none; cursor: default; transform: none; }
.knopf-gross { width: 100%; font-size: 1.2rem; padding: 15px 20px; }

/* Dialogbox wie im Spiel */
.dialog {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(94vw, 760px);
  background: rgba(14, 22, 36, .92);
  border: 3px solid var(--creme);
  border-radius: 8px;
  padding: 26px 22px 18px;
}
.dialog-name {
  position: absolute; top: -16px; left: 18px;
  background: var(--senf); color: var(--tinte);
  font: 600 1rem/1 "Barlow Condensed", sans-serif; text-transform: none;
  padding: 7px 12px; border-radius: 4px;
}
.dialog p { margin: 0 0 12px; font-size: clamp(1.1rem, 3.6vw, 1.35rem); min-height: 3em; }
.dialog-weiter {
  float: right; background: none; border: 0; color: var(--senf); cursor: pointer;
  font: 600 1.05rem "Barlow Condensed", sans-serif;
}
.dialog-weiter:hover { text-decoration: underline; }

.leiste-alt {
  background: var(--senf); color: var(--tinte);
  font: 600 1rem/1.3 "Barlow Condensed", sans-serif;
  text-align: center; padding: 10px var(--rand);
}

.wissen { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 64px; }
.wissen h3 { font-size: 1.2rem; color: var(--senf); margin-bottom: 6px; }
.wissen p { margin: 0; color: #e4d6b8; }

.fuss { padding: 32px var(--rand) calc(40px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; color: #cdbb97; font-size: .95rem; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.fuss a { color: var(--creme); }

/* Korb-Knopf */
.korb-knopf {
  position: fixed; right: var(--rand); top: calc(var(--rand) + env(safe-area-inset-top, 0px)); z-index: 5;
  font: 600 1.05rem "Barlow Condensed", sans-serif;
  background: var(--holz); color: var(--creme); border: 2px solid var(--senf); border-radius: 4px; padding: 8px 14px; cursor: pointer;
}
.korb-knopf span { display: inline-block; min-width: 1.4em; margin-left: 4px; background: var(--senf); color: var(--tinte); border-radius: 3px; text-align: center; }

/* Dialoge */
dialog { border: 0; padding: 0; color: var(--tinte); background: var(--papier); border-radius: 6px; max-width: min(96vw, 980px); width: 100%; max-height: 92svh; }
dialog::backdrop { background: rgba(10, 6, 3, .72); }
.zu { position: absolute; right: 12px; top: 10px; z-index: 2; background: var(--papier); border: 0; font: 600 1rem "Barlow Condensed", sans-serif; color: var(--tinte); cursor: pointer; padding: 6px 8px; }
.produkt-innen { display: grid; grid-template-columns: 1fr; }
@media (min-width: 820px) { .produkt-innen { grid-template-columns: 1.05fr 1fr; } }
.produkt-bild img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.produkt-info { padding: 28px 24px 26px; }
.produkt-info h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.produkt-info .folge { color: var(--rost); font-weight: 600; margin: 0 0 6px; }
.preis-gross { font: 600 1.6rem "Barlow Condensed", sans-serif; margin: 10px 0; }
.preis-gross small { font: 400 .9rem "Barlow", sans-serif; color: #6d5a44; }
.feld-titel { font-weight: 600; margin: 18px 0 8px; }
.feld-titel small { font-weight: 400; color: #6d5a44; }
.groessen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.groessen button {
  min-width: 54px; padding: 10px 12px; border: 2px solid var(--tinte); background: transparent; border-radius: 4px;
  font: 600 1.05rem "Barlow Condensed", sans-serif; color: var(--tinte); cursor: pointer;
}
.groessen button[aria-checked="true"] { background: var(--tinte); color: var(--papier); }
.fakten { padding-left: 18px; margin: 18px 0 0; color: #4e3d2b; }

.korb-dialog { max-width: min(96vw, 520px); padding: 28px 22px; }
.korb-dialog h2 { font-size: 1.9rem; margin-bottom: 14px; }
.korb-liste { list-style: none; padding: 0; margin: 0; }
.korb-liste li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #d8c8a6; }
.korb-liste img { width: 64px; height: 80px; object-fit: cover; border-radius: 3px; }
.korb-liste .klein, .klein { font-size: .9rem; color: #6d5a44; }
.menge { display: flex; gap: 6px; align-items: center; }
.menge button { width: 30px; height: 30px; border: 2px solid var(--tinte); background: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.korb-summe p { display: flex; justify-content: space-between; margin: 14px 0 6px; }
.korb-summe .klein { display: block; margin: 0 0 14px; }
.land { width: 100%; padding: 10px; margin: 6px 0 14px; font: inherit; border: 2px solid var(--tinte); border-radius: 4px; background: #fff; }
.fehler { color: var(--rost); font-weight: 600; }

.nur-gross { display: none; }
@media (min-width: 900px) { .nur-gross { display: block; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .ware, .knopf { transition: none; } }

/* Rechtsseiten */
.recht { max-width: 760px; margin: 0 auto; padding: 48px var(--rand) 64px; }
.recht h1 { font-size: 2.2rem; margin-bottom: 20px; }
.recht h2 { font-size: 1.3rem; margin: 28px 0 8px; color: var(--senf); }
.recht p, .recht li { color: #eadcbc; }
.zurueck { display: inline-block; margin-bottom: 24px; }

/* Reinlaufen: Bildfolge klebt, Scrollen spult */
.rein { position: relative; height: 560svh; }
.rein.lang { height: 820svh; }

.klebt { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#film-ersatz { z-index: 0; }
canvas.film { z-index: 1; }
.aussen-schild {
  position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 3;
  transform: translateX(-50%);
  width: min(92vw, 420px); padding: 20px 22px 16px;
  background: var(--holz); border: 3px solid var(--senf); border-radius: 6px; text-align: center;
  box-shadow: 0 12px 0 rgba(0,0,0,.35);
  transition: opacity .35s ease, transform .35s ease;
}
@media (min-width: 900px) { .aussen-schild { left: 6vw; transform: none; bottom: 8vh; } }
.aussen-schild h1 { font-size: clamp(2rem, 7vw, 2.8rem); color: var(--creme); }
.aussen-schild .hand { color: var(--senf); margin: 6px 0 10px; }
.scroll-hinweis { margin: 0; font: 600 1rem "Barlow Condensed", sans-serif; color: var(--creme); animation: wippen 1.6s ease-in-out infinite; }
@keyframes wippen { 50% { transform: translateY(5px); } }
.aus { opacity: 0; pointer-events: none; }
.dialog { z-index: 3; opacity: 0; transform: translate(-50%, 16px); transition: opacity .35s, transform .35s; }
.dialog.an { opacity: 1; transform: translate(-50%, 0); }

/* Kleiderstange */
.wand { position: absolute; top: 0; left: 0; height: max(100svh, calc(100vw / 1.787)); aspect-ratio: 1344 / 752; will-change: transform; }
.wand-bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wand picture { position: absolute; inset: 0; }
.buegel {
  position: absolute; top: 46.2%; width: 13.5%; transform-origin: 50% 1%;
  background: none; border: 0; padding: 0; cursor: pointer;
  animation: schaukeln 4.6s ease-in-out infinite alternate;
}
.buegel img {
  width: 100%; display: block;
  filter: drop-shadow(0 18px 14px rgba(20, 8, 0, .45));
  transition: transform .25s ease;
  animation: leuchten 3.2s ease-in-out infinite;
}
.buegel:nth-child(2), .buegel:nth-child(2) img { animation-delay: -1.4s; }
.buegel:nth-child(3), .buegel:nth-child(3) img { animation-delay: -2.6s; }
.buegel:hover, .buegel:focus-visible { animation-duration: 1.1s; outline: none; }
.buegel:hover img, .buegel:focus-visible img {
  animation: none;
  filter: brightness(1.15) drop-shadow(0 0 14px rgba(255, 205, 110, .95)) drop-shadow(0 0 38px rgba(255, 170, 60, .75)) drop-shadow(0 18px 14px rgba(20, 8, 0, .45));
  transform: scale(1.06);
}
@keyframes schaukeln { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes leuchten { 50% { filter: brightness(1.06) drop-shadow(0 0 16px rgba(255, 196, 92, .55)) drop-shadow(0 18px 14px rgba(20, 8, 0, .45)); } }
.etikett {
  position: absolute; left: 50%; bottom: -7%; transform: translateX(-50%) rotate(-3deg);
  background: var(--papier); color: var(--tinte); white-space: nowrap;
  font-family: "Caveat", cursive; font-size: clamp(1.05rem, 1.6vw, 1.45rem); line-height: 1.05;
  padding: 6px 12px 4px; border-radius: 3px; box-shadow: 0 3px 0 rgba(0,0,0,.3);
}
.etikett small { display: block; font-size: .8em; color: #6d5a44; }
.stange-titel {
  position: absolute; left: var(--rand); top: calc(var(--rand) + env(safe-area-inset-top, 0px)); margin: 0; z-index: 2;
  font: 400 clamp(1.6rem, 5vw, 2.4rem)/1 "Alfa Slab One", Georgia, serif; color: var(--creme);
  text-shadow: 0 3px 0 rgba(0,0,0,.45);
}
.wissen { max-width: 1180px; margin: 0 auto; padding: 56px var(--rand) 8px; }

/* Produkt */
.galerie-gross { background: #e8dcc2; }
.galerie-gross img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; }
.galerie-klein { display: flex; gap: 8px; padding: 10px; background: #e8dcc2; overflow-x: auto; }
.galerie-klein button { flex: 0 0 64px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: 3px; background: #f3ead6; cursor: pointer; }
.galerie-klein button[aria-current="true"] { border-color: var(--tinte); }
.galerie-klein img { width: 100%; height: 100%; object-fit: contain; }
.masse { margin: 4px 0 14px; }
.masse summary { cursor: pointer; font-weight: 600; }
.masse table { border-collapse: collapse; margin-top: 8px; width: 100%; max-width: 320px; }
.masse th, .masse td { text-align: left; padding: 4px 8px 4px 0; }
.kauf-leiste { position: sticky; bottom: 0; background: var(--papier); padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-top: 16px; }
.bald { font-weight: 600; color: var(--rost); margin: 0 0 8px; }
.versand-balken { margin-bottom: 10px; }
.balken { height: 10px; background: #e2d4b6; border-radius: 5px; overflow: hidden; }
.balken span { display: block; height: 100%; width: 0; background: var(--senf); transition: width .4s ease; }
@media (prefers-reduced-motion: reduce) { .buegel, .buegel img, .scroll-hinweis { animation: none; } }

#direkt { display: block; text-decoration: none; margin: 4px 0 10px; }
.zur-stange {
  position: fixed; left: var(--rand); top: calc(var(--rand) + env(safe-area-inset-top, 0px)); z-index: 5;
  font: 600 1.05rem "Barlow Condensed", sans-serif; text-decoration: none;
  background: var(--holz); color: var(--creme); border: 2px solid var(--senf); border-radius: 4px; padding: 8px 14px;
  transition: opacity .25s;
}
.zur-stange.weg { opacity: 0; pointer-events: none; }
.stange-titel { top: calc(var(--rand) + 52px + env(safe-area-inset-top, 0px)); }

.rein .klebt { contain: paint; }

/* Stange liegt über dem letzten Bild der Folge, Lage rechnet laden.js aus */
.haken { position: absolute; z-index: 2; pointer-events: none; }
.haken .buegel { pointer-events: auto; opacity: 0; transform: translateY(-40px) rotate(-6deg); transition: opacity .5s ease, transform .7s cubic-bezier(.2,1.6,.4,1); animation: none; }
.haken.da .buegel { opacity: 1; transform: none; animation: schaukeln 4.6s ease-in-out infinite alternate; }
.haken.da .buegel:nth-child(1) { transition-delay: 0s; } .haken.da .buegel:nth-child(2) { transition-delay: .12s; } .haken.da .buegel:nth-child(3) { transition-delay: .24s; }
.hoch .buegel { width: 27%; }
.quer .buegel { width: 13.5%; }
.stange-titel { opacity: 0; transition: opacity .4s; }
.stange-titel.da { opacity: 1; }
.vorschau { display: flex; justify-content: center; gap: 6px; margin: 2px 0 12px; }
.vorschau img { width: 56px; height: 70px; object-fit: contain; background: #3a2616; border-radius: 3px; }
.haken .buegel:nth-child(4) { transition-delay: .36s; }
.haken:not(.da) .buegel { pointer-events: none; }

.farben { display: flex; gap: 10px; margin-bottom: 14px; }
.farben button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #d8c8a6; cursor: pointer; box-shadow: inset 0 0 0 2px var(--papier); }
.farben button[aria-checked="true"] { border-color: var(--tinte); }
.alles { max-width: 1180px; margin: 0 auto; padding: 56px var(--rand) 0; }
.alles h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 22px; }
.raster { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.karte { display: flex; flex-direction: column; gap: 4px; text-align: left; background: none; border: 0; padding: 0; color: var(--creme); cursor: pointer; font: inherit; }
.karte-bild { background: var(--holz-hell); border-radius: 4px; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; transition: transform .2s ease; }
.karte:hover .karte-bild { transform: translateY(-4px); }
.karte-bild img { width: 86%; height: 92%; object-fit: contain; }
.karte strong { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 1.15rem; margin-top: 6px; }
.karte .klein { color: #d9c8a6; }
.punkte { display: flex; gap: 6px; }
.punkte i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }

.hoch .etikett { font-size: .92rem; white-space: normal; width: 112%; text-align: center; padding: 4px 4px 3px; bottom: -14%; }
.hoch .etikett small { font-size: .85em; }
