/* Adventskalender: Grundlage. Keine Inline-Styles (CSP style-src 'self'). */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/CormorantGaramond-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/CormorantGaramond-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Great Vibes'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/GreatVibes-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/Inter-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/Inter-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/Inter-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/Inter-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --rot: #7d0f17;
  --rot-dunkel: #5a0a10;
  --gold: #e2b860;
  --salbei: #637d70;
  --creme: #f6f0e4;
  --tinte: #3a0b0f;
  --schreib: 'Great Vibes', cursive;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --links: env(safe-area-inset-left, 0px);
  --rechts: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--rot-dunkel); }
body {
  font-family: var(--serif);
  color: var(--creme);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

#app { min-height: 100vh; min-height: 100dvh; }

.symbol { width: 1em; height: 1em; display: block; flex: none; }

/* ---------- Gutschein-Hintergrund ---------- */
.gutschein {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--oben) + 28px) calc(var(--rechts) + 28px) calc(var(--unten) + 28px) calc(var(--links) + 28px);
  background:
    radial-gradient(ellipse 90% 60% at 50% 18%, #9c1520 0%, rgba(156, 21, 32, 0) 70%),
    linear-gradient(180deg, #8a121b 0%, var(--rot) 45%, var(--rot-dunkel) 100%);
  overflow: hidden;
}
.gutschein::before, .gutschein::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 1px solid var(--gold);
  border-radius: 22px;
}
.gutschein::before {
  inset: calc(var(--oben) + 12px) calc(var(--rechts) + 12px) calc(var(--unten) + 12px) calc(var(--links) + 12px);
  opacity: 0.85;
}
.gutschein::after {
  inset: calc(var(--oben) + 18px) calc(var(--rechts) + 18px) calc(var(--unten) + 18px) calc(var(--links) + 18px);
  opacity: 0.45;
  border-radius: 17px;
}

.lichterkette {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--oben) + 6px);
  height: 40px;
  pointer-events: none;
}
.lichterkette svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.licht {
  position: absolute;
  width: 8px; height: 11px;
  margin-left: -4px;
  border-radius: 50% 50% 55% 55%;
  background: currentColor;
  box-shadow: 0 0 8px 2px currentColor;
  animation: flackern 3.2s ease-in-out infinite;
}
@keyframes flackern { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.kopf { text-align: center; position: relative; z-index: 1; margin-top: 40px; }
.ueber {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}
.titel-schrift {
  font-family: var(--schreib);
  font-weight: 400;
  font-size: clamp(46px, 14vw, 72px);
  line-height: 1.05;
  margin: 0;
  color: var(--gold);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.unter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  margin: 10px 0 0;
  color: var(--creme);
}
.trenner { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px auto 0; color: var(--gold); width: 190px; }
.trenner::before, .trenner::after { content: ''; flex: 1; height: 1px; background: var(--gold); opacity: 0.6; }
.trenner .symbol { font-size: 14px; }

/* ---------- Karte ---------- */
.karte {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--creme);
  color: var(--tinte);
  border-radius: 24px;
  padding: 0 24px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(226, 184, 96, 0.35);
}
.pin-bereich { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding-top: 26px; }
.karte .rund {
  width: 70px; height: 70px;
  margin: -35px auto 6px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #a3202a, var(--rot-dunkel));
  color: var(--gold);
  font-size: 30px;
  border: 3px solid var(--creme);
  box-shadow: 0 0 0 1px rgba(226, 184, 96, 0.5), 0 6px 16px rgba(90, 10, 16, 0.35);
}
.karte h2 { font-family: var(--schreib); font-weight: 400; font-size: 40px; line-height: 1.1; margin: 0 0 6px; color: var(--rot); }
.karte p { font-size: 19px; line-height: 1.3; margin: 0 0 16px; font-weight: 500; }

.pin-feld { position: relative; margin: 0 0 12px; }
.pin-feld input {
  width: 100%;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px; /* mindestens 16px: kein Zoom auf iOS */
  letter-spacing: 0.4em;
  text-align: center;
  padding: 14px 48px 14px 48px;
  border-radius: 14px;
  border: 1.5px solid rgba(125, 15, 23, 0.25);
  background: #fffaf0;
  color: var(--rot-dunkel);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.pin-feld input:focus { border-color: var(--rot); box-shadow: 0 0 0 3px rgba(226, 184, 96, 0.45); }
.pin-feld input::placeholder { color: rgba(90, 10, 16, 0.25); letter-spacing: 0.4em; }
.pin-feld .auge {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%;
  color: var(--rot); font-size: 22px;
}

.knopf {
  width: 100%;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  min-height: 50px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #8f1520, var(--rot-dunkel));
  color: var(--creme);
  box-shadow: 0 6px 16px rgba(90, 10, 16, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.12s, opacity 0.2s;
}
.knopf:active { transform: scale(0.98); }
.knopf:disabled { opacity: 0.55; cursor: default; }
.knopf-leise { background: none; box-shadow: none; color: #8a7d6a; font-weight: 500; min-height: 44px; margin-top: 4px; }

.fehler { min-height: 22px; margin: 0 0 8px !important; font-family: var(--sans); font-size: 14px !important; color: #a3202a; font-weight: 500 !important; }

.schuetteln { animation: schuetteln 0.45s cubic-bezier(.36, .07, .19, .97); }
@keyframes schuetteln {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-9px); }
  40%, 60% { transform: translateX(9px); }
}

.platzhalter { flex: 1; display: grid; place-items: center; position: relative; z-index: 1; text-align: center; }
.platzhalter .titel-schrift { font-size: 52px; }

@media (min-width: 700px) {
  .kopf { margin-top: 56px; }
  .titel-schrift { font-size: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .licht { animation: none; }
  .schuetteln { animation-duration: 0.01s; }
}

/* ---------- Kalender ---------- */
.kalender-seite {
  padding-bottom: calc(var(--unten) + var(--schnee-h, 0px) + 24px);
}
.kalender-seite > .schnee2d, .kalender-seite > .szene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.kalender-seite .kopf { margin-top: 44px; }
.kalender-seite .titel-schrift { font-size: clamp(44px, 13.5vw, 64px); white-space: nowrap; }
.kalender-seite .unter { font-size: 17px; }

.countdown {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.tafel { position: relative; z-index: 1; width: 100%; margin-top: 20px; }
.raster {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px;
}
.raster li { display: block; min-width: 0; }

.tuete {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: var(--papier, #637d70);
  box-shadow: 0 4px 10px rgba(30, 4, 8, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.15s;
}
.tuete::after { /* gestrichelte Naht am Papier */
  content: ''; position: absolute; inset: 3px; border-radius: 6px; pointer-events: none;
  border: 1px dashed rgba(246, 240, 228, 0.22);
}
.tuete .henkel {
  position: absolute; left: 50%; top: -9px; width: 22px; height: 12px; margin-left: -11px;
  border: 2px solid rgba(226, 184, 96, 0.75); border-bottom: 0; border-radius: 12px 12px 0 0;
  pointer-events: none;
}
.tuete img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
  -webkit-user-drag: none; user-select: none;
}
.tuete.offen:active { transform: scale(0.96); }
.tuete.gesperrt { cursor: default; }
.tuete.gesperrt img { filter: brightness(0.8); }
.tuete.heute {
  box-shadow: 0 0 0 2px var(--gold), 0 0 14px 1px rgba(226, 184, 96, 0.55), 0 4px 10px rgba(30, 4, 8, 0.4);
}
.tuete .schloss {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 18px; color: var(--gold); display: grid; place-items: center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}
.tuete.wackeln { animation: wackeln 0.4s ease; }
@keyframes wackeln {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-4deg); }
  40% { transform: rotate(3.5deg); }
  60% { transform: rotate(-2.5deg); }
  80% { transform: rotate(1.5deg); }
}

.ausblenden { display: none; }

/* 3D-Winterszene als Hintergrund (ab 900 px immer, auf dem Handy per Tannenbaum-Knopf) */
.kalender-seite.mit-szene { padding-bottom: calc(var(--unten) + 28px); }
.kalender-seite > .szene { opacity: 0; transition: opacity 1s ease; }
.kalender-seite.mit-szene > .szene { opacity: 1; }
.kalender-seite.mit-szene > .schnee2d, .kalender-seite.mit-szene > .lichterkette,
.kalender-seite.mit-szene::before, .kalender-seite.mit-szene::after { display: none; }
.kalender-seite.mit-szene .kopf { isolation: isolate; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 14px rgba(0, 0, 0, 0.5); }
.kalender-seite.mit-szene .kopf::before { /* dunkler Schleier hinter dem Titel, damit er auch mittags lesbar bleibt */
  content: ''; position: absolute; inset: -34px -90px -20px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(10, 14, 32, 0.5), rgba(10, 14, 32, 0));
}
.szenen-knopf {
  position: fixed; top: calc(var(--oben) + 14px); right: calc(var(--rechts) + 14px); z-index: 5;
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: linear-gradient(145deg, #f2d489, var(--gold) 55%, #b98a35);
  color: #000; font-size: 23px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.15s;
}
.szenen-knopf:active { transform: scale(0.94); }

@media (min-width: 900px) {
  .kalender-seite, .kalender-seite.mit-szene { padding-bottom: calc(var(--unten) + 40px); align-items: center; }
  .szenen-knopf { display: none; }
  .kalender-seite::before, .kalender-seite::after, .kalender-seite > .lichterkette { display: none; }
  .kalender-seite .kopf { margin-top: 28px; }
  .kalender-seite .titel-schrift { font-size: 84px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5); }
  .kalender-seite .unter { font-size: 21px; }
  .kalender-seite .trenner { display: none; }
  .tafel {
    width: min(800px, 92vw);
    margin-top: 26px;
    padding: 26px;
    background: linear-gradient(180deg, #8a121b, var(--rot) 55%, #6b0d14);
    border-radius: 24px;
    border: 1.5px solid var(--gold);
    box-shadow: 0 0 0 5px rgba(125, 15, 23, 0.9), 0 0 0 6px rgba(226, 184, 96, 0.45), 0 26px 60px rgba(0, 0, 0, 0.55);
  }
  .raster { grid-template-columns: repeat(6, 1fr); gap: 18px 14px; }
  .tuete { cursor: pointer; padding: 8px; }
  .tuete.gesperrt { cursor: not-allowed; }
  .tuete .henkel { width: 26px; margin-left: -13px; }
  .tuete .schloss { font-size: 20px; }

  .kopf, .tafel { transition: opacity 0.5s ease, transform 0.5s ease; }
  .ausgeblendet .kopf { opacity: 0; transform: translateY(-24px); pointer-events: none; }
  .ausgeblendet .tafel { opacity: 0; transform: translateY(24px) scale(0.98); pointer-events: none; }

  .ausblenden {
    position: fixed; top: 22px; right: 24px; z-index: 5;
    width: 48px; height: 48px; padding: 0;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: linear-gradient(145deg, #f2d489, var(--gold) 55%, #b98a35);
    color: #000; font-size: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.15s;
  }
  .ausblenden:hover { transform: scale(1.06); }
  .ausblenden:active { transform: scale(0.96); }
}
@media (prefers-reduced-motion: reduce) {
  .tuete.wackeln { animation: none; }
  .kopf, .tafel { transition-duration: 0.01s !important; }
  .kalender-seite > .szene { transition: none; }
}

/* ---------- Oeffnen-Animation ---------- */
.tuete.wird-geoeffnet img { visibility: hidden; }
.oeffnen { position: fixed; inset: 0; z-index: 50; overflow: hidden; }
.oeffnen > * { position: absolute; }
.oeffnen-grund { inset: 0; z-index: 0; opacity: 0; background: rgba(30, 3, 7, 0.88); }
.oeffnen-schein {
  inset: 0; z-index: 1; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 50% 45%, rgba(196, 58, 50, 0.6), rgba(196, 58, 50, 0) 70%);
}
.oeffnen-glanz { z-index: 2; opacity: 0; pointer-events: none; }
.oeffnen-glanz::before {
  content: ''; position: absolute; inset: -70%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 128, 0.75) 0%, rgba(226, 184, 96, 0.32) 32%, rgba(226, 184, 96, 0) 68%);
}
.oeffnen-rahmen, .oeffnen-buehne { transform-origin: 50% 50%; will-change: transform, opacity; }
.oeffnen-rahmen {
  z-index: 3; border-radius: 7px;
  background: radial-gradient(circle at 50% 46%, #fff1c4 0%, #f2cf7c 34%, #d9a94e 70%, #b07d2c 100%);
  box-shadow: 0 0 0 5px var(--papier, #637d70), 0 0 0 6px rgba(226, 184, 96, 0.6),
    inset 0 0 26px rgba(120, 70, 10, 0.55), 0 20px 46px rgba(0, 0, 0, 0.45);
}
.oeffnen-papier { inset: 0; width: 100%; height: 100%; z-index: 4; visibility: hidden; pointer-events: none; }
.oeffnen-papier.an { visibility: visible; }
.oeffnen-papier.vorn { z-index: 6; }
.oeffnen-papier.aus { opacity: 0; transition: opacity 0.1s linear; }
.oeffnen-buehne { z-index: 5; perspective: 900px; }
.oeffnen-tuer { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; }
.oeffnen-tuer > * { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tuer-vorn { display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.tuer-rueck {
  transform: rotateY(180deg);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 40%), var(--papier, #637d70);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.08), inset 0 0 0 5px rgba(246, 240, 228, 0.25);
}
.tuer-schatten { pointer-events: none; opacity: var(--schatten, 0); background: linear-gradient(90deg, rgba(20, 2, 4, 0.2), rgba(20, 2, 4, 0.85)); }
.oeffnen-datum {
  left: 0; right: 0; z-index: 5; margin: 0; opacity: 0; text-align: center;
  font-family: var(--serif); font-weight: 500; font-size: 19px; color: var(--creme);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.oeffnen.fertig :is(.oeffnen-rahmen, .oeffnen-buehne, .oeffnen-datum, .oeffnen-glanz) { opacity: 0 !important; transition: opacity 0.25s ease; }
.oeffnen-ueberspringen {
  z-index: 8; left: 50%; bottom: calc(var(--unten) + 18px); transform: translateX(-50%);
  min-height: 40px; padding: 9px 16px; border: 0; border-radius: 999px;
  background: rgba(30, 3, 7, 0.55); white-space: nowrap;
  font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0.02em;
  color: rgba(246, 240, 228, 0.85); text-decoration: underline; text-underline-offset: 3px;
}
.oeffnen.schliesst { opacity: 0; transition: opacity 0.22s ease; }

/* Fenster: Lage und Groesse muessen zur Zielgroesse des 3D-Zettels passen. */
.fenster {
  z-index: 7; opacity: 0;
  left: calc(var(--links) + 12px); right: calc(var(--rechts) + 12px);
  top: calc(var(--oben) + 44px); bottom: calc(var(--unten) + 14px);
  background: var(--creme); color: var(--tinte);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 18px 20px 24px;
  overflow-y: auto; overscroll-behavior: contain;
  outline: none;
}
@media (min-width: 600px) {
  .fenster { left: calc(50% - 230px); right: auto; width: 460px; top: max(32px, calc(50% - 420px)); bottom: auto; height: min(840px, calc(100% - 64px)); }
}
.fenster.sichtbar { opacity: 1; transition: opacity 0.1s linear; }
.oeffnen.ruhig .oeffnen-grund { transition: opacity 0.2s ease; }
.oeffnen.ruhig.an .oeffnen-grund { opacity: 1; }
.oeffnen.ruhig .fenster.sichtbar { transition-duration: 0.2s; }
.fenster.einfliegen { animation: einfliegen 0.38s cubic-bezier(.2, .9, .3, 1.08) both; }
@keyframes einfliegen { from { opacity: 0; transform: translate(var(--von-x, 0), var(--von-y, 0)) scale(0.3); } }

.fenster-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.datum-pille {
  font-family: var(--sans); font-weight: 600; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #a77a28; border: 1.5px solid #d6b26a; border-radius: 999px; padding: 4px 10px;
}
.fenster-zu {
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: #ebe3d3; color: #5a4a3a; font-size: 17px;
}
.fenster-titel { font-family: var(--schreib); font-weight: 400; font-size: 46px; line-height: 1.12; color: var(--rot); margin: 12px 0 4px; }
.fenster-text { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.35; margin: 0 0 16px; }
.fenster-foto { display: block; width: 100%; border-radius: 14px; }
.fenster.inhalt-ein > * { animation: inhalt-ein 0.42s cubic-bezier(.2, .8, .2, 1) both; }
.fenster.inhalt-ein > :nth-child(2) { animation-delay: 0.06s; }
.fenster.inhalt-ein > :nth-child(3) { animation-delay: 0.12s; }
.fenster.inhalt-ein > :nth-child(n+4) { animation-delay: 0.18s; }
@keyframes inhalt-ein { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .fenster.inhalt-ein > * { animation: none; }
}

/* Gutschein: Flip (600 ms) und Vollbild */
.gs-box { margin: 4px 0 16px; text-align: center; perspective: 1200px; --verh: 2 / 1; }
.gs-karte { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: var(--verh); }
.gs-dreh { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(.3, .7, .2, 1); }
.gs-box.hinten .gs-dreh { transform: rotateY(180deg); }
.gs-seite { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 18px rgba(58, 11, 15, 0.28); }
.gs-hinten { transform: rotateY(180deg); }
.gs-hinweis { margin: 8px 0 0; font-family: var(--sans); font-weight: 500; font-size: 10.5px; letter-spacing: 0.04em; color: #8a7a68; }
@media (prefers-reduced-motion: reduce) { .gs-dreh { transition-duration: 0.01s; } }
.gs-gross { position: fixed; inset: 0; z-index: 80; background: #000000; display: grid; place-items: center; }
.gs-gross-bild { width: 100%; height: auto; max-height: 100%; object-fit: contain; display: block; }
.gs-gross-zu {
  position: absolute; top: calc(var(--oben) + 12px); right: calc(var(--rechts) + 12px);
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 18px;
}

/* Fenster-Fuss: Aufnahme-Knopf unten, Stapel rechts darueber */
.fenster { display: flex; flex-direction: column; }
.fenster > * { flex: none; }
.fenster-fuss { position: sticky; bottom: 0; margin-top: auto; padding-top: 18px; }
.reak-aufnehmen {
  width: 100%; height: 50px; border: 0; border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, #8f1520, #6a0c13);
  box-shadow: 0 4px 12px rgba(90, 10, 16, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.reak-aufnehmen:disabled { opacity: 0.6; }
.reak-symbol { font-size: 22px; color: #fff; display: grid; }
.reak-stapel { position: absolute; right: 2px; bottom: 62px; width: 74px; height: 98px; pointer-events: none; }
.reak-stapel[hidden] { display: none; }
.reak-mini {
  position: absolute; right: 0; bottom: 0; width: 64px; height: 86px; padding: 3px; border: 0; border-radius: 8px;
  background: #fff; box-shadow: 0 3px 10px rgba(58, 11, 15, 0.35); pointer-events: auto; cursor: pointer;
}
.reak-mini.pos-0 { transform: rotate(3deg); z-index: 3; }
.reak-mini.pos-1 { transform: translate(-10px, 3px) rotate(-4deg); z-index: 2; }
.reak-mini.pos-2 { transform: translate(-18px, 6px) rotate(-9deg); z-index: 1; }
.reak-mini-bild { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; display: block; background: #d9cfba; }
.reak-dauer {
  position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 2px;
  font-family: var(--sans); font-weight: 600; font-size: 9.5px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.reak-play { font-size: 9px; display: grid; }
.reak-play .symbol { fill: currentColor; }

.reak-gross { position: fixed; inset: 0; z-index: 85; background: #000; display: grid; place-items: center; }
.reak-gross-bild { max-width: 100%; max-height: 100%; object-fit: contain; display: block; -webkit-touch-callout: none; user-select: none; }
.reak-loeschen {
  position: absolute; bottom: calc(var(--unten) + 18px); right: calc(var(--rechts) + 16px);
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 20px;
}
.reak-bestaetigung { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); padding: 24px; }
.reak-bestaetigung-karte { background: var(--creme); color: var(--tinte); border-radius: 18px; padding: 20px; width: min(320px, 100%); text-align: center; }
.reak-bestaetigung-karte p { margin: 0 0 16px; font-family: var(--serif); font-weight: 700; font-size: 22px; }
.reak-bestaetigung-zeile { display: flex; gap: 10px; }
.reak-knopf { flex: 1; height: 44px; border: 0; border-radius: 12px; font-family: var(--sans); font-weight: 600; font-size: 14px; background: #ebe3d3; color: var(--tinte); }
.reak-knopf.gefahr { background: var(--rot); color: #fff; }

/* Kamera */
.kamera { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; padding: var(--oben) var(--rechts) var(--unten) var(--links); }
.kam-titel { margin: 0; padding: 14px 0 10px; text-align: center; font-family: var(--schreib); font-size: 34px; color: var(--gold); }
.kam-buehne { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #000; }
.kam-bild { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.kamera.vorschau .kam-bild { object-fit: contain; }
.kam-bild.spiegeln { transform: scaleX(-1); }
.kam-fehler { max-width: 300px; margin: 0; padding: 20px; text-align: center; font-family: var(--sans); font-size: 15px; line-height: 1.4; color: #f0e6d2; }
.kam-meldung { margin: 0; min-height: 0; padding: 8px 20px 0; text-align: center; font-family: var(--sans); font-size: 13px; color: #ffd9d4; }
.kam-meldung:empty { display: none; }
.kam-leiste { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px 22px; min-height: 108px; }
.kam-text { border: 0; background: none; color: #fff; font-family: var(--sans); font-weight: 600; font-size: 15px; padding: 10px 0; min-width: 84px; text-align: left; }
.kam-wechsel { width: 44px; height: 44px; padding: 0; margin: 0 20px 0 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 22px; }
.kam-wechsel:disabled, .kam-ausloeser:disabled { opacity: 0.35; }
.kam-ausloeser { position: relative; width: 78px; height: 78px; padding: 0; border: 0; border-radius: 50%; background: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kam-ring { position: absolute; inset: 0; border-radius: 50%; border: 4px solid #fff; }
.kam-kern { position: absolute; inset: 9px; border-radius: 50%; background: #fff; transition: transform 0.15s, border-radius 0.15s, background-color 0.15s; }
.kam-ausloeser.nimmt-auf .kam-ring { border-color: rgba(255, 255, 255, 0.25); }
.kam-ausloeser.nimmt-auf .kam-ring::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(#e63b3b var(--w, 0deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 33px, #000 34px); mask: radial-gradient(circle, transparent 33px, #000 34px);
  animation: kam-ring 30s linear forwards;
}
@property --w { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes kam-ring { to { --w: 360deg; } }
.kam-ausloeser.nimmt-auf .kam-kern { background: #e63b3b; transform: scale(0.55); border-radius: 22%; }
.kam-senden { min-width: 168px; height: 48px; border: 0; border-radius: 14px; font-family: var(--sans); font-weight: 600; font-size: 15px; color: #fff; background: linear-gradient(180deg, #8f1520, #6a0c13); }
.kam-senden:disabled { opacity: 0.75; }
.kamera.vorschau .kam-leiste { padding-top: 12px; min-height: 84px; }
.kam-balken { height: 4px; margin: 10px 28px 0; border-radius: 2px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.kam-balken[hidden] { display: none; }
.kam-balken-fuell { display: block; height: 100%; width: var(--p, 0%); background: var(--gold); transition: width 0.15s linear; }
@media (max-height: 460px) {
  .kam-titel { display: none; }
  .kam-leiste { min-height: 0; padding: 8px 28px; }
}

/* Onboarding: Schritte im Home-Bildschirm-Hinweis */
.schritte { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.schritt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #ece3d1; font-family: var(--sans); font-size: 14.5px; font-weight: 500; }
.schritt-nr { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--rot); color: var(--creme); font-size: 12px; font-weight: 700; }
.schritt-text { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.schritt-symbol { display: inline-flex; color: var(--rot); font-size: 18px; }
.karte .knopf-leise { width: 100%; }

/* ---------- Admin: gleiche Sprache, schlichter und dichter ---------- */
.knopf-link { display: block; text-align: center; text-decoration: none; line-height: 22px; }
.admin {
  min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--oben) + 18px) calc(var(--rechts) + 16px) calc(var(--unten) + 40px) calc(var(--links) + 16px);
  background: linear-gradient(180deg, var(--rot) 0, var(--rot-dunkel) 320px, var(--rot-dunkel) 100%);
  color: var(--creme);
}
.admin > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.admin-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-kopf .ueber { margin: 0; }
.admin-kopf .titel-schrift { font-size: 52px; }
.admin-abmelden {
  min-height: 40px; padding: 8px 14px; border-radius: 12px; border: 1px solid rgba(226, 184, 96, 0.55);
  background: none; color: var(--gold); font-family: var(--sans); font-weight: 500; font-size: 13px;
}
.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-tab {
  flex: none; min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(226, 184, 96, 0.45);
  background: rgba(0, 0, 0, 0.18); color: var(--creme); font-family: var(--sans); font-weight: 500; font-size: 14px;
}
.admin-tab.aktiv { background: var(--gold); border-color: var(--gold); color: var(--rot-dunkel); font-weight: 600; }

.admin-inhalt { display: flex; flex-direction: column; gap: 12px; }
.admin-karte {
  background: var(--creme); color: var(--tinte); border-radius: 18px; padding: 16px 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(226, 184, 96, 0.35);
}
.admin-karte h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 10px; font-family: var(--schreib); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--rot); }
.admin-titel { font-family: var(--schreib); font-weight: 400; font-size: 42px; margin: 0; color: var(--gold); }
.admin-zurueck {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px 6px 8px;
  border: 0; border-radius: 12px; background: rgba(0, 0, 0, 0.2); color: var(--creme); font-family: var(--sans); font-weight: 500; font-size: 14px;
}
.admin-leer { margin: 8px 0; font-size: 19px; font-weight: 500; opacity: 0.85; }
.admin-hinweis { margin: 8px 0 0; font-family: var(--sans); font-size: 13px; line-height: 1.4; color: #6f6252; }
.admin-klein, .admin-zaehler { font-family: var(--sans); font-size: 12px; font-weight: 500; color: #7a6c5a; }
.admin-zaehler { margin-left: auto; padding-left: 8px; }

/* Liste */
.admin-tage { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-tag {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 12px 8px 8px; min-height: 64px;
  background: var(--creme); color: var(--tinte); border: 0; border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 184, 96, 0.35);
}
.admin-tag:active { transform: scale(0.99); }
.admin-mini { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: cover; background: #e7dcc4; }
.admin-tag-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.admin-tag-kopf { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.admin-nr { font-family: var(--sans); font-weight: 700; font-size: 14px; color: #a77a28; flex: none; }
.admin-tag-titel { font-weight: 700; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-tag-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.admin-tag-titel.leer { font-weight: 500; color: #9a8c78; font-style: italic; }
.admin-marke { display: inline-flex; align-items: center; gap: 3px; font-family: var(--sans); font-size: 12px; font-weight: 500; color: #a09482; }
.admin-marke.an { color: var(--salbei); font-weight: 600; }
.admin-marke .symbol { font-size: 14px; }

/* Formulare */
.admin-gruppe { display: flex; flex-direction: column; gap: 6px; }
.admin-gruppe label { display: flex; align-items: baseline; font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--rot-dunkel); margin-top: 6px; }
.admin-gruppe input, .admin-gruppe textarea, .admin-gruppe select {
  width: 100%; font-family: var(--sans); font-size: 16px; /* mindestens 16px: kein Zoom auf iOS */
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(125, 15, 23, 0.25); background: #fffaf0; color: var(--rot-dunkel);
  outline: none; -webkit-appearance: none; appearance: none;
}
.admin-gruppe textarea { resize: vertical; line-height: 1.4; min-height: 140px; }
.admin-gruppe textarea.admin-kurz { min-height: 88px; }
.admin-gruppe input:focus, .admin-gruppe textarea:focus { border-color: var(--rot); box-shadow: 0 0 0 3px rgba(226, 184, 96, 0.45); }
.admin-gruppe input::placeholder { color: rgba(90, 10, 16, 0.4); }
.admin-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.admin-spalte { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.admin-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: 12px; border: 1.5px solid rgba(125, 15, 23, 0.35); background: #fffaf0; color: var(--rot-dunkel);
  font-family: var(--sans); font-weight: 600; font-size: 14px;
}
.admin-knopf .symbol { font-size: 18px; }
.admin-knopf.primaer { background: linear-gradient(180deg, #8f1520, var(--rot-dunkel)); border-color: transparent; color: var(--creme); box-shadow: 0 4px 12px rgba(90, 10, 16, 0.3); }
.admin-knopf:disabled { opacity: 0.55; cursor: default; }
.admin-meldung { margin: 6px 0 0; min-height: 0; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--salbei); }
.admin-meldung:empty { display: none; }
.admin-meldung.fehler-text { color: #a3202a; }
.admin-datei { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-fortschritt { width: 100%; height: 8px; margin-top: 8px; accent-color: var(--rot); }
.admin-foto { display: block; width: 100%; max-height: 340px; object-fit: contain; border-radius: 12px; background: #e7dcc4; margin-bottom: 10px; }
.admin-kachel-zeile { display: flex; align-items: center; gap: 14px; }
.admin-kachel {
  width: 112px; height: 112px; flex: none; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #e7dcc4;
  box-shadow: 0 6px 16px rgba(58, 11, 15, 0.3);
}
.admin-kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Reaktionen */
.admin-reaktionen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.admin-reaktion { display: flex; flex-direction: column; gap: 4px; }
.admin-reaktion-medium { width: 100%; max-height: 360px; border-radius: 12px; background: #000000; object-fit: contain; display: block; }

/* Zeitreise-Vorschau */
.admin-vorschau { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--rot-dunkel); }
.admin-vorschau-inhalt { min-height: 100%; }
.admin-vorschau-zu {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(var(--unten) + 14px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--gold); background: rgba(30, 3, 7, 0.85); color: var(--creme); font-family: var(--sans); font-weight: 600; font-size: 13px;
}
.admin-vorschau-zu .symbol { font-size: 16px; }
