/* ═══════════════════════════════════════════════════════════════════
   MAGIC MAP DESIGN SYSTEM — baumannzaz — v2.0 2026
   Additives Override-Layer über app.css
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────────────── */
:root {
  /* Pergament */
  --pm-base:      #f2dba8;
  --pm-light:     #fdf3d4;
  --pm-warm:      #e8c87a;
  --pm-deep:      #c4934a;
  --pm-shadow:    #7a4e22;
  --pm-burn:      #2e1608;

  /* Tinte */
  --ink-dark:     #18100a;
  --ink-mid:      #3e2610;
  --ink-route:    rgba(94, 52, 22, 0.52);

  /* Wachssiegel */
  --seal-top:     #d63f35;
  --seal-mid:     #9b2018;
  --seal-deep:    #5c0a06;

  /* Marke */
  --brand-forest: #2f5845;
  --brand-brass:  #b98534;

  /* Schriften */
  --ff-serif:     Palatino, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --ff-ink:       "Segoe Script", "Lucida Handwriting", "Brush Script MT", "Comic Sans MS", cursive;
  --ff-sans:      "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;

  /* Schatten */
  --sh-parch:     0 2px 6px rgba(78,48,20,.10),
                  0 14px 42px rgba(30,16,8,.20),
                  0 36px 88px rgba(10,6,3,.24);
  --sh-card:      0 2px 6px rgba(78,48,20,.08),
                  0 8px 26px rgba(30,16,8,.12);
  --sh-seal:      0 4px 14px rgba(139,26,20,.38),
                  0 10px 36px rgba(92,10,6,.46),
                  inset 0 -3px 8px rgba(30,6,4,.38),
                  inset 0 2px 5px rgba(220,100,90,.34);
  --sh-nav:       0 -2px 18px rgba(10,6,3,.30),
                  0 -1px 0 rgba(208,163,78,.24);

  /* Easing */
  --ease-unfold:  cubic-bezier(0.16, 0.82, 0.24, 1);
  --ease-seal:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-ink:     cubic-bezier(0.40, 0, 0.20, 1);
  --ease-float:   cubic-bezier(0.22, 0.78, 0.22, 1);
}

/* ─── Globale Schriften ──────────────────────────────────────────────── */
h1, h2, h3,
.landing-title,
.map-panel h2,
.eyebrow-serif {
  font-family: var(--ff-ink);
  font-weight: 700;
  text-shadow:
    0 .5px 0 rgba(255,246,210,.50),
    0 1.5px 1px rgba(62,38,16,.20);
}

.landing-title,
.map-panel h2,
.shopping-group h2 {
  color: var(--ink-dark);
  filter: contrast(1.06);
}

/* ══════════════════════════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════════════════════════ */

.landing-body {
  background:
    radial-gradient(ellipse at 50%   0%, rgba(46,22,8,.72) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(46,22,8,.66) 0%, transparent 52%),
    url("/assets/images/authentik-login-background.webp") center/cover no-repeat fixed,
    linear-gradient(160deg, #1a1008 0%, #241408 40%, #3a1c0d 70%, #1a1008 100%);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.landing-body::before {
  content: '';
  inset: 0;
  pointer-events: none;
  position: fixed;
  background:
    radial-gradient(circle at 20% 30%, rgba(185,133,52,.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(47,88,69,.07)  0%, transparent 35%);
  z-index: 0;
}

/* ─── Stage ──────────────────────────────────────────────────────────── */
.landing-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  perspective: 2200px;
  position: relative;
  z-index: 1;
}

/* ─── Pergament-Karte ────────────────────────────────────────────────── */
.parchment-map {
  animation: mapUnfold 1.08s var(--ease-unfold) 80ms both;
  aspect-ratio: 4 / 3;
  background:
    /* Verbrannte Ecken */
    radial-gradient(ellipse at   0%   0%, rgba(20,10,4,.50) 0%, transparent 26%),
    radial-gradient(ellipse at 100%   0%, rgba(20,10,4,.46) 0%, transparent 24%),
    radial-gradient(ellipse at   0% 100%, rgba(20,10,4,.48) 0%, transparent 24%),
    radial-gradient(ellipse at 100% 100%, rgba(20,10,4,.52) 0%, transparent 26%),
    /* Vignette */
    radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(30,16,8,.30) 100%),
    /* Highlight */
    radial-gradient(circle at 22% 18%, rgba(255,252,220,.40) 0%, transparent 22%),
    radial-gradient(circle at 78% 82%, rgba(196,147,74,.26) 0%, transparent 18%),
    /* Kartenlinien */
    repeating-linear-gradient(  0deg, transparent 0px, transparent 47px, rgba(82,50,22,.062) 47px, rgba(82,50,22,.062) 48px),
    repeating-linear-gradient( 90deg, transparent 0px, transparent 47px, rgba(82,50,22,.052) 47px, rgba(82,50,22,.052) 48px),
    /* Pergament Basis */
    linear-gradient(147deg, #f5e0a8 0%, #fef5d0 26%, #f0d08a 52%, #fef0c0 74%, #e2c07a 100%);
  border-radius: 4px;
  box-shadow: var(--sh-parch), inset 0 0 0 1px rgba(255,242,185,.52);
  isolation: isolate;
  max-height: 700px;
  max-width: 960px;
  min-height: 320px;
  overflow: hidden;
  position: relative;
  width: min(94vw, 960px);
}

.landing-body.is-leaving .parchment-map {
  animation: landingMapExit .82s var(--ease-unfold) both;
}

/* Falzlinien */
.parchment-map::before {
  background:
    linear-gradient(90deg, transparent 32.5%, rgba(78,48,20,.16) 33%, transparent 33.6%),
    linear-gradient(90deg, transparent 49.4%, rgba(78,48,20,.20) 50%, transparent 50.6%),
    linear-gradient(90deg, transparent 66.4%, rgba(78,48,20,.16) 67%, transparent 67.6%),
    linear-gradient(  0deg, transparent 49.4%, rgba(78,48,20,.10) 50%, transparent 50.6%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

/* Innerer Rahmen (doppelter Rand wie alte Karten) */
.parchment-map::after {
  border: 1px solid rgba(89,52,19,.30);
  border-radius: 2px;
  box-shadow: inset 0 0 0 7px transparent;
  content: '';
  inset: 14px;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

/* Gestrichelter Innenrand */
.map-inner-border {
  border: 1px dashed rgba(89,52,19,.18);
  border-radius: 1px;
  inset: 28px;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

/* ─── Eckverzierungen ────────────────────────────────────────────────── */
.map-corner {
  height: 52px;
  pointer-events: none;
  position: absolute;
  width: 52px;
  z-index: 4;
}
.map-corner.tl { left: 4px;  top: 4px;    }
.map-corner.tr { right: 4px; top: 4px;    transform: scaleX(-1); }
.map-corner.bl { bottom: 4px; left: 4px;  transform: scaleY(-1); }
.map-corner.br { bottom: 4px; right: 4px; transform: scale(-1);  }

/* ─── Kopfzeile ──────────────────────────────────────────────────────── */
.map-header-text {
  animation: fadeUpMap .6s ease .7s both;
  align-items: center;
  color: var(--pm-shadow);
  display: flex;
  font-family: var(--ff-serif);
  font-size: clamp(.58rem, 1.3vw, .78rem);
  gap: 10px;
  left: 50%;
  letter-spacing: .16em;
  pointer-events: none;
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 5;
}
.map-header-text::before,
.map-header-text::after {
  background: rgba(89,52,19,.32);
  content: '';
  flex: none;
  height: 1px;
  width: 28px;
}

/* ─── SVG Tintenpfade ────────────────────────────────────────────────── */
.map-ink-svg {
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.ink-path {
  fill: none;
  stroke: rgba(94,52,22,.44);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ink-path.dashed {
  stroke-dasharray: 6 5;
}

.ink-path.animated {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: inkDraw 2.4s var(--ease-ink) forwards;
}

.ink-path.r1 { animation-delay: .38s; }
.ink-path.r2 { animation-delay: .72s; }
.ink-path.r3 { animation-delay: 1.0s; }

.ink-dot {
  fill: rgba(94,52,22,.58);
  opacity: 0;
  animation: inkDotPop .38s var(--ease-seal) forwards;
}
.ink-dot.d1 { animation-delay: 1.2s; }
.ink-dot.d2 { animation-delay: 1.55s; }
.ink-dot.d3 { animation-delay: 1.85s; }

/* ─── Fußspuren-Layer ────────────────────────────────────────────────── */
.footprints-layer {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 4;
}

.footprint-mark {
  height: 11px;
  opacity: 0;
  position: absolute;
  transform-origin: center bottom;
  width: 8px;
  animation: footprintAppear 3.8s ease-in-out forwards;
}

.footprint-mark svg {
  fill: rgba(58,36,14,.26);
  height: 100%;
  width: 100%;
}

/* ─── Kartenkompass ──────────────────────────────────────────────────── */
.map-compass {
  animation: fadeUpMap .6s ease 1.4s both;
  bottom: 18px;
  left: 22px;
  opacity: .52;
  pointer-events: none;
  position: absolute;
  width: 54px;
  z-index: 5;
}

/* ─── Koordinaten ────────────────────────────────────────────────────── */
.map-coords {
  animation: fadeUpMap .6s ease 1.5s both;
  bottom: 20px;
  color: var(--pm-shadow);
  font-family: var(--ff-serif);
  font-size: .58rem;
  letter-spacing: .08em;
  line-height: 1.6;
  opacity: .48;
  pointer-events: none;
  position: absolute;
  right: 20px;
  text-align: right;
  z-index: 5;
}

/* ─── Kartouche (Mittelrahmen) ───────────────────────────────────────── */
.map-cartouche-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  padding: 22px 28px 26px;
  position: relative;
  text-align: center;
  z-index: 10;
  animation: fadeUpMap .68s var(--ease-float) .88s both;
}

.map-cartouche-frame {
  backdrop-filter: blur(.5px);
  background: radial-gradient(ellipse at 50% 50%, rgba(255,249,214,.78) 0%, rgba(255,241,188,.58) 100%);
  border: 1.5px solid rgba(89,52,19,.30);
  border-radius: 4px;
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}
.map-cartouche-frame::before {
  border: 1px solid rgba(89,52,19,.16);
  border-radius: 2px;
  content: '';
  inset: 6px;
  position: absolute;
}
.map-cartouche-frame::after {
  border: 1px dashed rgba(89,52,19,.12);
  border-radius: 1px;
  content: '';
  inset: 12px;
  position: absolute;
}

/* ─── Landing-Typografie ─────────────────────────────────────────────── */
.landing-kicker {
  color: var(--pm-shadow);
  font-family: var(--ff-sans);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.landing-title {
  color: var(--ink-dark);
  font-family: var(--ff-ink);
  font-size: clamp(2.55rem, 7.4vw, 5.4rem);
  line-height: .98;
  max-width: 520px;
  text-shadow:
    0 1px 0 rgba(255,248,210,.80),
    0 2px 4px rgba(62,34,12,.24);
}

.landing-subtitle {
  color: var(--ink-mid);
  font-size: clamp(.86rem, 2vw, 1.08rem);
  line-height: 1.55;
  max-width: 340px;
}

/* ─── Wachssiegel-Button ─────────────────────────────────────────────── */
.wax-seal-link {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 4px;
  text-decoration: none;
}
.wax-seal-link:focus-visible {
  outline: 2px solid rgba(208,163,78,.8);
  outline-offset: 6px;
  border-radius: 50%;
}

.seal-body {
  align-items: center;
  background:
    radial-gradient(circle at 36% 28%, rgba(255,160,140,.38) 0%, transparent 22%),
    radial-gradient(circle at 65% 72%, rgba(40,8,6,.44)      0%, transparent 24%),
    radial-gradient(ellipse at 50% 50%, var(--seal-top) 0%, var(--seal-mid) 52%, var(--seal-deep) 100%);
  border-radius: 50%;
  box-shadow: var(--sh-seal);
  display: flex;
  height: 100px;
  justify-content: center;
  position: relative;
  transition: transform 240ms var(--ease-seal), box-shadow 240ms;
  width: 100px;
}

/* Prägekreis */
.seal-body::before {
  border: 1.5px solid rgba(255,160,150,.32);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255,160,150,.12);
  content: '';
  inset: 9px;
  position: absolute;
}

/* Wachsstruktur-Textur */
.seal-body::after {
  background:
    repeating-conic-gradient(rgba(255,200,180,.06) 0deg 10deg, transparent 10deg 20deg);
  border-radius: 50%;
  content: '';
  inset: 0;
  position: absolute;
  opacity: .5;
}

.seal-letter {
  color: rgba(255,215,200,.90);
  font-family: var(--ff-serif);
  font-size: 2.8rem;
  font-weight: bold;
  line-height: 1;
  position: relative;
  text-shadow:
    0 1px 3px rgba(30,6,4,.55),
    0 -1px 1px rgba(255,190,170,.3);
  user-select: none;
  z-index: 1;
}

.seal-glow {
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(220,80,70,0);
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: box-shadow 300ms;
}

.seal-label {
  color: var(--pm-shadow);
  font-family: var(--ff-sans);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .20em;
  text-transform: uppercase;
  opacity: .85;
}

/* ══════════════════════════════════════════════════════════════════════
   AUTHENTIK REVEAL
   ══════════════════════════════════════════════════════════════════════ */

.app-reveal-active {
  overflow: hidden;
}

.app-reveal-active .app-shell {
  animation: appSurfaceZoom 2.55s var(--ease-unfold) both;
  transform-origin: center 42%;
}

.auth-reveal {
  align-items: center;
  animation: authRevealOut 2.55s var(--ease-unfold) both;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46,22,8,.55) 0%, transparent 54%),
    rgba(20,12,6,.74);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  perspective: 2400px;
  pointer-events: none;
  position: fixed;
  z-index: 1000;
}

.auth-reveal-map {
  aspect-ratio: 4 / 3;
  box-shadow: var(--sh-parch);
  max-height: 720px;
  max-width: 960px;
  position: relative;
  transform-style: preserve-3d;
  width: min(94vw, 960px);
}

.auth-reveal-panel {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(20,10,4,.38) 0%, transparent 38%),
    radial-gradient(circle at 35% 20%, rgba(255,252,220,.42) 0%, transparent 32%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(82,50,22,.052) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(82,50,22,.042) 47px 48px),
    linear-gradient(147deg, #f5e0a8 0%, #fef5d0 35%, #f0d08a 70%, #e2c07a 100%);
  border: 1px solid rgba(89,52,19,.28);
  bottom: 0;
  position: absolute;
  top: 0;
  transform: rotateY(88deg) scaleX(.72);
}

.auth-reveal-panel::after {
  border: 1px dashed rgba(89,52,19,.16);
  content: '';
  inset: 12px;
  position: absolute;
}

.panel-one {
  animation: unfoldPanelLeft .86s var(--ease-unfold) .05s both;
  left: 0;
  transform-origin: right center;
  width: 25%;
}
.panel-two {
  animation: unfoldPanelCenter .86s var(--ease-unfold) .20s both;
  left: 25%;
  transform-origin: left center;
  width: 25%;
}
.panel-three {
  animation: unfoldPanelCenter .86s var(--ease-unfold) .35s both;
  left: 50%;
  transform-origin: right center;
  width: 25%;
}
.panel-four {
  animation: unfoldPanelRight .86s var(--ease-unfold) .50s both;
  left: 75%;
  transform-origin: left center;
  width: 25%;
}

.auth-reveal-fold {
  background: linear-gradient(90deg, transparent, rgba(78,48,20,.22), transparent);
  bottom: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 1px;
  z-index: 2;
  animation: revealFoldIn .46s ease .82s both;
}
.fold-one { left: 25%; }
.fold-two { left: 50%; animation-delay: .92s; }
.fold-three { left: 75%; animation-delay: 1.02s; }

.auth-reveal-copy {
  animation: revealInkTitle .74s ease .96s both;
  color: var(--ink-dark);
  display: grid;
  inset: 0;
  place-content: center;
  position: absolute;
  text-align: center;
  z-index: 3;
}

.auth-reveal-copy span {
  color: var(--pm-shadow);
  font-family: var(--ff-sans);
  font-size: clamp(.68rem, 1.8vw, .86rem);
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.auth-reveal-copy strong {
  font-family: var(--ff-ink);
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  font-weight: 700;
  line-height: 1;
  max-width: 720px;
  text-shadow:
    0 1px 0 rgba(255,248,210,.82),
    0 3px 7px rgba(62,34,12,.24);
}

/* Hover */
.wax-seal-link:hover .seal-body,
.wax-seal-link:focus-visible .seal-body {
  box-shadow:
    0 8px 28px rgba(180,40,30,.56),
    0 18px 52px rgba(92,10,6,.56),
    inset 0 -3px 8px rgba(30,6,4,.38),
    inset 0 2px 5px rgba(220,100,90,.34);
  transform: scale(1.08) translateY(-2px);
}
.wax-seal-link:hover .seal-glow {
  box-shadow: 0 0 38px 10px rgba(200,50,40,.26);
}

/* Siegel bricht */
.seal-body.breaking {
  animation: sealBreak .68s var(--ease-seal) forwards;
}

/* ══════════════════════════════════════════════════════════════════════
   APP SHELL — Overrides
   ══════════════════════════════════════════════════════════════════════ */

/* ─── Topbar ─────────────────────────────────────────────────────────── */
.topbar {
  background:
    linear-gradient(160deg,
      rgba(22,30,36,.98) 0%,
      rgba(28,18,10,.97) 55%,
      rgba(38,62,50,.95) 100%);
  border: 1px solid rgba(208,163,78,.34);
  border-radius: 10px;
  box-shadow:
    0 1px 0 rgba(255,240,180,.08) inset,
    0 16px 48px rgba(10,6,3,.28);
  position: relative;
  overflow: hidden;
}

/* Schraffierlinien Topbar */
.topbar::before {
  background:
    linear-gradient(90deg, transparent, rgba(255,230,155,.14), transparent),
    repeating-linear-gradient(90deg,
      transparent 0px, transparent 52px,
      rgba(208,163,78,.07) 52px, rgba(208,163,78,.07) 53px);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* ─── Bottom-Nav ─────────────────────────────────────────────────────── */
.bottom-nav {
  background: linear-gradient(180deg, rgba(26,16,8,.98) 0%, rgba(20,12,6,.99) 100%);
  border-top: 1px solid rgba(208,163,78,.26);
  box-shadow: var(--sh-nav);
}

.bottom-nav::before {
  background: repeating-linear-gradient(
    90deg, transparent 0px, transparent 82px,
    rgba(208,163,78,.04) 82px, rgba(208,163,78,.04) 83px
  );
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.bottom-nav button {
  border-radius: 10px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 120ms var(--ease-seal);
}
.bottom-nav button:active {
  transform: scale(0.92);
}
.bottom-nav button.active {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240,195,90,.30) 0%, transparent 70%),
    rgba(208,163,78,.16);
  border: 1px solid rgba(208,163,78,.36);
  color: #f0c85a;
}

/* ─── Cards ──────────────────────────────────────────────────────────── */
.card,
.toolbar-card,
.map-panel,
.shopping-card,
.recipe-card,
.share-card,
.empty-state {
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,.34) 0%, transparent 28%),
    linear-gradient(175deg, rgba(255,255,255,.22) 0%, transparent 38%),
    linear-gradient(180deg, #fef8e0 0%, #f5e3b0 100%);
  border: 1px solid rgba(123,75,34,.20);
  border-radius: 10px;
  box-shadow: var(--sh-card);
  transition:
    transform  200ms var(--ease-float),
    box-shadow 200ms;
}

.card::after,
.shopping-card::after,
.recipe-card::after {
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 22px,
    rgba(82,50,22,.036) 22px, rgba(82,50,22,.036) 23px
  );
  border-radius: inherit;
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* ─── Map-Panel (Dashboard-Hero) ─────────────────────────────────────── */
.map-panel {
  background:
    radial-gradient(ellipse at   0%   0%, rgba(20,10,4,.16) 0%, transparent 22%),
    radial-gradient(ellipse at 100% 100%, rgba(20,10,4,.16) 0%, transparent 22%),
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.34) 0%, transparent 22%),
    repeating-linear-gradient(  0deg, transparent 0, transparent 22px, rgba(82,50,22,.042) 22px, rgba(82,50,22,.042) 23px),
    repeating-linear-gradient( 90deg, transparent 0, transparent 22px, rgba(82,50,22,.030) 22px, rgba(82,50,22,.030) 23px),
    linear-gradient(147deg, #f5e0a8 0%, #fef5d0 28%, #f0d08a 55%, #fef0c0 75%, #e2c07a 100%);
  border: 1px solid rgba(196,147,74,.40);
  box-shadow: var(--sh-parch);
}

/* ─── Action Cards ───────────────────────────────────────────────────── */
.action-card,
.mini-card,
.category-card {
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.36) 0%, transparent 30%),
    linear-gradient(160deg, #fef5d0 0%, #f0d88a 100%);
  border: 1px solid rgba(123,75,34,.22);
  border-radius: 10px;
  box-shadow: var(--sh-card);
  transition:
    transform  200ms var(--ease-float),
    box-shadow 200ms;
}
.action-card:hover,
.mini-card:hover,
.category-card:hover {
  box-shadow: 0 6px 18px rgba(78,48,20,.12), 0 18px 52px rgba(30,16,8,.18);
  transform: translateY(-3px);
}
.action-card:active,
.mini-card:active,
.category-card:active {
  transform: translateY(0) scale(.97);
}

/* ─── Check-Toggle (Siegel-Stil) ─────────────────────────────────────── */
.check-toggle span {
  background: radial-gradient(circle, #fef5d0 0%, #f0d88a 100%);
  border: 2px solid rgba(123,75,34,.42);
  border-radius: 50%;
  box-shadow:
    inset 0 2px 4px rgba(30,16,8,.08),
    0 1px 3px rgba(78,48,20,.12);
  transition:
    background   200ms,
    border-color 200ms,
    box-shadow   200ms;
}
.check-toggle input:checked + span {
  background:
    radial-gradient(circle at 36% 32%, rgba(160,220,180,.42) 0%, transparent 28%),
    radial-gradient(circle, #4a8862 0%, #2f5845 60%, #1f3b30 100%);
  border-color: #2f5845;
  box-shadow:
    inset 0 -2px 4px rgba(10,30,20,.30),
    inset 0 1px 3px rgba(120,200,150,.22),
    0 2px 8px rgba(47,88,69,.30);
}

/* ─── Seal-Mark (Rezept-Karten) ──────────────────────────────────────── */
.seal-mark {
  background:
    radial-gradient(circle at 36% 30%, rgba(255,160,140,.32) 0%, transparent 22%),
    radial-gradient(circle, var(--seal-top) 0%, var(--seal-mid) 50%, var(--seal-deep) 100%);
  box-shadow:
    inset 0 -3px 6px rgba(30,6,4,.32),
    inset 0 1px 3px rgba(220,100,90,.28),
    0 4px 12px rgba(139,26,20,.28);
  transition: transform 200ms var(--ease-seal), box-shadow 200ms;
}
.seal-mark:hover {
  box-shadow:
    inset 0 -3px 6px rgba(30,6,4,.32),
    inset 0 1px 3px rgba(220,100,90,.28),
    0 8px 22px rgba(139,26,20,.42);
  transform: scale(1.1) rotate(6deg);
}

/* ─── Inputs & Formulare ─────────────────────────────────────────────── */
input,
select,
textarea {
  background: linear-gradient(180deg, rgba(255,250,228,.96) 0%, rgba(248,236,198,.92) 100%);
  border: 1px solid rgba(123,75,34,.26);
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(78,48,20,.06);
  transition:
    box-shadow   180ms ease,
    border-color 180ms ease,
    background   180ms ease;
}
input:focus,
select:focus,
textarea:focus {
  background: #fffbf0;
  border-color: rgba(47,88,69,.62);
  box-shadow:
    inset 0 2px 4px rgba(78,48,20,.04),
    0 0 0 3px rgba(47,88,69,.16),
    0 0 14px rgba(47,88,69,.10);
  outline: 0;
}

/* ─── Primary Button ─────────────────────────────────────────────────── */
.primary {
  background: linear-gradient(160deg, #3a6b54 0%, #2f5845 55%, #1f3b30 100%);
  border-radius: 8px;
  box-shadow:
    0 4px 12px rgba(47,88,69,.26),
    0 1px 0 rgba(120,200,160,.18) inset,
    0 -1px 0 rgba(10,30,20,.22) inset;
  color: #f0f8f0;
  transition: transform 160ms var(--ease-seal), box-shadow 160ms;
}
.primary:hover {
  box-shadow:
    0 8px 22px rgba(47,88,69,.36),
    0 1px 0 rgba(120,200,160,.18) inset,
    0 -1px 0 rgba(10,30,20,.22) inset;
  transform: translateY(-1px);
}
.primary:active { transform: scale(.98); }

/* ─── Secondary Button ───────────────────────────────────────────────── */
.secondary {
  background: linear-gradient(180deg, #fef0c8 0%, #e8c870 55%, #d4a840 100%);
  border: 1px solid rgba(123,75,34,.30);
  border-radius: 8px;
  box-shadow:
    0 2px 6px rgba(78,48,20,.16),
    0 1px 0 rgba(255,252,215,.62) inset;
  color: #3a1f08;
  transition: transform 160ms var(--ease-seal), box-shadow 160ms;
}
.secondary:hover {
  box-shadow:
    0 6px 18px rgba(78,48,20,.22),
    0 1px 0 rgba(255,252,215,.62) inset;
  transform: translateY(-1px);
}

/* ─── Tabs ───────────────────────────────────────────────────────────── */
.tabs button {
  background: rgba(255,244,213,.92);
  border: 1px solid rgba(123,75,34,.20);
  border-radius: 8px;
  transition:
    background   160ms,
    border-color 160ms,
    transform    120ms;
}
.tabs button:active { transform: scale(.96); }
.tabs button.active {
  background: linear-gradient(160deg, #3a6b54 0%, #2f5845 55%, #1f3b30 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(47,88,69,.24);
  color: #f0f8f0;
}

/* ─── Modal ──────────────────────────────────────────────────────────── */
.modal {
  backdrop-filter: blur(5px);
  background: rgba(20,12,6,.64);
}
.modal.visible {
  animation: modalOverlayIn .26s ease both;
}
.modal-panel {
  animation: modalPanelIn .38s var(--ease-unfold) both;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.30) 0%, transparent 28%),
    linear-gradient(175deg, #fef8e0 0%, #f0d88a 100%);
  border: 1px solid rgba(196,147,74,.36);
  border-radius: 12px;
  box-shadow:
    0 26px 88px rgba(0,0,0,.44),
    0 0 0 1px rgba(255,242,185,.32) inset;
}

/* ─── Toast ──────────────────────────────────────────────────────────── */
.toast {
  background: linear-gradient(160deg, rgba(26,16,8,.97) 0%, rgba(36,23,15,.97) 100%);
  border: 1px solid rgba(208,163,78,.34);
  border-radius: 10px;
  box-shadow:
    0 4px 18px rgba(0,0,0,.30),
    0 1px 0 rgba(208,163,78,.14) inset;
  font-family: var(--ff-serif);
  font-style: italic;
}

/* ─── Locked Page ────────────────────────────────────────────────────── */
.locked-panel {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.30) 0%, transparent 28%),
    linear-gradient(175deg, #fef8e0 0%, #f0d88a 100%);
  border: 1px solid rgba(196,147,74,.36);
  border-radius: 12px;
  box-shadow: var(--sh-parch);
}

/* ─── Ladeliste Skeleton ─────────────────────────────────────────────── */
.skeleton-card span {
  background: linear-gradient(
    90deg,
    rgba(123,75,34,.06),
    rgba(255,248,200,.52),
    rgba(123,75,34,.06)
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

/* ─── Ink-Ladeindikator ──────────────────────────────────────────────── */
.ink-loading {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 36px;
}
.ink-loading span {
  animation: inkDrop 1.4s ease-in-out infinite;
  background: var(--ink-mid);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}
.ink-loading span:nth-child(2) { animation-delay: .22s; }
.ink-loading span:nth-child(3) { animation-delay: .44s; }

/* ══════════════════════════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════════════════════════ */

@keyframes mapUnfold {
  0%   {
    filter: brightness(.68);
    opacity: 0;
    transform: rotateX(74deg) scaleX(.66) translateY(28px);
  }
  48%  { opacity: 1; }
  100% {
    filter: brightness(1);
    opacity: 1;
    transform: rotateX(0deg) scaleX(1) translateY(0);
  }
}

@keyframes landingMapExit {
  0% {
    filter: brightness(1);
    opacity: 1;
    transform: rotateX(0deg) scale(1) translateY(0);
  }
  55% {
    filter: brightness(1.06);
    transform: rotateX(8deg) scale(1.04) translateY(-8px);
  }
  100% {
    filter: brightness(.72);
    opacity: .22;
    transform: rotateX(68deg) scale(.72) translateY(34px);
  }
}

@keyframes unfoldPanelLeft {
  from { opacity: .2; transform: rotateY(88deg) scaleX(.72); }
  to   { opacity: 1;  transform: rotateY(0deg)  scaleX(1); }
}

@keyframes unfoldPanelCenter {
  from { opacity: .28; transform: rotateY(-82deg) scaleX(.70); }
  to   { opacity: 1;   transform: rotateY(0deg)   scaleX(1); }
}

@keyframes unfoldPanelRight {
  from { opacity: .2; transform: rotateY(-88deg) scaleX(.72); }
  to   { opacity: 1;  transform: rotateY(0deg)   scaleX(1); }
}

@keyframes revealFoldIn {
  from { opacity: 0; transform: scaleY(.35); }
  to   { opacity: 1; transform: scaleY(1); }
}

@keyframes revealInkTitle {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authRevealOut {
  0%, 58% {
    opacity: 1;
    transform: scale(1);
  }
  78% {
    opacity: .94;
    transform: scale(1.8);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
    visibility: hidden;
  }
}

@keyframes appSurfaceZoom {
  0% {
    filter: blur(2px) brightness(.82);
    opacity: .18;
    transform: scale(.86);
  }
  58% {
    filter: blur(1px) brightness(.90);
    opacity: .38;
    transform: scale(.92);
  }
  82% {
    filter: blur(0) brightness(1);
    opacity: 1;
    transform: scale(1.018);
  }
  100% {
    filter: none;
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes inkDraw {
  0%   { stroke-dashoffset: 900; opacity: 0; }
  8%   { opacity: 1; }
  100% { stroke-dashoffset: 0;   opacity: 1; }
}

@keyframes inkDotPop {
  0%   { opacity: 0; transform: scale(0); }
  68%  { transform: scale(1.5); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes footprintAppear {
  0%   { opacity: 0; transform: scale(.6); }
  14%  { opacity: .85; transform: scale(1); }
  72%  { opacity: .55; }
  100% { opacity: 0; transform: scale(.78); }
}

@keyframes fadeUpMap {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sealBreak {
  0%   { transform: scale(1) rotate(0deg); }
  18%  { transform: scale(1.12) rotate(-4deg); }
  38%  { transform: scale(.90) rotate(6deg); }
  58%  { transform: scale(1.06) rotate(-2deg); opacity: .78; }
  80%  { transform: scale(.92) rotate(2deg); opacity: .36; }
  100% { transform: scale(.76) rotate(0deg); opacity: 0; }
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalPanelIn {
  from { opacity: 0; transform: translateY(26px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes inkDrop {
  0%, 80%, 100% { opacity: .2; transform: scale(.68); }
  40%           { opacity: 1;  transform: scale(1.12); }
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 520px) {
  .seal-body   { height: 82px; width: 82px; }
  .seal-letter { font-size: 2.2rem; }
  .parchment-map { aspect-ratio: auto; min-height: 440px; }
  .map-cartouche-wrap { padding: 16px 18px 20px; }
  .map-compass { width: 40px; }
}

@media (min-width: 680px) {
  .seal-body   { height: 118px; width: 118px; }
  .seal-letter { font-size: 3.3rem; }
}

/* ─── prefers-reduced-motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .parchment-map {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
