/* Fame – then the others */

/* Seltenheitsfarbe animierbar machen, damit Farbwechsel weich überblenden */
@property --rar { syntax: "<color>"; inherits: true; initial-value: #3dfa74; }

:root {
  --bg: #f8f8f6;
  --ink: #141414;
  --dark: #141414;
  --green: #3dfa74;
  --pink: #ff2fd6;
  --cyan: #2fe6ff;
  --muted: #6b6b6b;
  --rar: #3dfa74;
  --glow: 0.5;
  --mono: "Source Code Pro", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: 20px;
  --curve: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H100V79Q50 121 0 79Z'/%3E%3C/svg%3E");
}

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

html, body {
  margin: 0;
  height: 100%;
  background: #e6e6e2;
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
}

button, input { font: inherit; color: inherit; }

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

/* App-Rahmen: mobil vollflächig, am Desktop als Telefon */
.app {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  /* Bezugsrahmen für feste Ebenen (Partikel): sie bleiben im sichtbaren App-Fenster stehen */
  contain: paint;
}

@media (min-width: 600px) {
  .app {
    width: 400px;
    height: min(866px, calc(100dvh - 48px));
    border-radius: 44px;
    box-shadow: 0 0 0 10px #141414, 0 30px 80px rgba(0, 0, 0, 0.35);
  }
}

/* ---- Screens ------------------------------------------------------------ */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  transition: opacity 0.35s ease, transform 0.35s ease, --rar 0.5s ease;
}

.screen.is-entering { opacity: 0; transform: translateY(12px); }
/* Inhalte nie zusammenquetschen – lieber scrollen */
.screen > * { flex-shrink: 0; }

.screen-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px var(--gutter) 0;
}

/* ---- Logo --------------------------------------------------------------- */

.logo { display: inline-flex; flex-direction: column; align-items: flex-start; }
.logo-row { display: flex; align-items: center; gap: 8px; }
.logo-word {
  position: relative;
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 3px 5px 0 var(--green);
}
/* Glanz, der von rechts nach links über die Schrift wandert */
.logo-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  text-shadow: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 48%, rgba(61, 250, 116, 0.7) 53%, transparent 62%);
  background-size: 300% 100%;
  background-position: -50% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: logo-shine 3.8s ease-in-out 1.7s infinite;
}
@keyframes logo-shine { 0% { background-position: -50% 0; } 45%, 100% { background-position: 150% 0; } }

.logo-tag { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; margin: 6px 0 0 3px; }
.logo .logo-dia { width: 58px; height: 48px; flex: 0 0 auto; }

.logo--xl .logo-word { font-size: 70px; text-shadow: 4px 6px 0 var(--green); }
.logo--xl .logo-dia { width: 72px; height: 60px; }
.logo--xl .logo-tag { font-size: 16px; margin-top: 8px; }
.logo--md .logo-word { font-size: 46px; text-shadow: 3px 4px 0 var(--green); }
.logo--md .logo-dia { width: 48px; height: 40px; }
.logo--md .logo-tag { font-size: 12px; margin-top: 5px; }
.logo--sm .logo-word { font-size: 34px; text-shadow: 2px 3px 0 var(--green); }
.logo--sm .logo-dia { width: 36px; height: 30px; }
.logo--sm .logo-tag { font-size: 10px; margin-top: 4px; }

.logo-inline { font-weight: 800; white-space: nowrap; text-shadow: 1px 2px 0 var(--green); }

/* Gläserner Diamant im Logo */
.glass-dia {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(61, 250, 116, 0.6)) drop-shadow(0 0 16px rgba(170, 255, 235, 0.45));
  animation: glass-glow 3.8s ease-in-out 1.7s infinite;
}
@keyframes glass-glow {
  50% { filter: drop-shadow(0 0 8px rgba(61, 250, 116, 0.9)) drop-shadow(0 0 26px rgba(200, 255, 245, 0.7)); }
}
.glass-shadow { fill: var(--green); opacity: 0.85; }
.glass-line { fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.glass-shine { transform: translateX(84px) skewX(-20deg); animation: glass-shine 3.8s ease-in-out 1.5s infinite; }
@keyframes glass-shine {
  0% { transform: translateX(84px) skewX(-20deg); }
  40%, 100% { transform: translateX(-4px) skewX(-20deg); }
}
.glass-spark {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  filter: drop-shadow(0 0 3px #fff);
  animation: twinkle 2.6s ease-in-out 1.4s infinite;
}
.glass-spark--2 { animation-delay: 2.7s; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* ---- Diamant-Icons ------------------------------------------------------- */

.dia { display: block; width: 100%; height: 100%; overflow: visible; }
.dia-line { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.dia-fill { fill: var(--green); }
.dia-inline { display: inline-block; width: 1.15em; height: 1em; vertical-align: -0.12em; margin-left: 2px; }
.dia-inline .dia-line { stroke-width: 3; }

.dia-stack { position: relative; display: inline-block; width: 30px; height: 26px; }
.dia-stack .dia { position: absolute; inset: 0; }
.dia-stack .dia-shadow { color: var(--green); transform: translate(3px, 3px); }
.dia-stack .dia-main { color: var(--ink); }

/* ---- Buttons, Links, Punkte ------------------------------------------- */

.btn {
  position: relative;
  min-width: 206px;
  height: 52px;
  padding: 0 28px;
  border: 0;
  background: var(--dark);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 7px 8px 0 var(--green);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s;
}
.btn:active { transform: translate(5px, 6px); box-shadow: 2px 2px 0 var(--green); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: 7px 8px 0 #9a9a9a; }
.btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }

.link {
  background: none;
  border: 0;
  padding: 4px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.dots { display: flex; gap: 9px; height: 14px; }
.dot { width: 9px; height: 9px; background: var(--ink); }
.dot.is-active { background: var(--green); transform: translateY(5px); }

/* Schwarzer Marker mit grüner Schrift */
.hl {
  background: var(--dark);
  color: var(--green);
  padding: 0.04em 0.4em 0.02em;
  box-shadow: -0.3em -0.14em 0 var(--dark);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---- Hero mit Kurve ------------------------------------------------------ */

.hero {
  position: relative;
  flex: 0 0 auto;
  height: 34%;
  min-height: 250px;
  z-index: 1;
}
.hero--tall { height: 40%; min-height: 300px; }

.hero::before,
.hero-shape {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--curve) 0 0 / 100% 100% no-repeat;
  mask: var(--curve) 0 0 / 100% 100% no-repeat;
}
.hero::before {
  content: "";
  background: var(--green);
  transform: translate(10px, 7px);
}
.hero-shape { overflow: hidden; background: #2a2a2a; }
.hero--dark .hero-shape { background: var(--dark); color: var(--bg); }

.back {
  position: absolute;
  top: max(36px, env(safe-area-inset-top));
  left: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  display: grid;
  place-items: center;
}
.back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back--light { background: transparent; color: var(--ink); backdrop-filter: none; }

/* ---- Splash ----------------------------------------------------------------- */

.screen--splash { overflow: hidden; }
.screen--splash .splash-logo { display: flex; justify-content: center; padding-top: 24%; position: relative; z-index: 1; }

/* Grünes Licht scheint beim Öffnen von rechts nach links über den Screen */
/* fest im sichtbaren Fenster (wie die Funken), damit beim Scrollen keine Kante entsteht */
.sweep { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.sweep::before {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 100%;
  width: 75%;
  background: linear-gradient(90deg, transparent, rgba(61, 250, 116, 0.25) 28%, rgba(61, 250, 116, 0.85) 48%,
    rgba(255, 255, 255, 0.95) 52%, rgba(61, 250, 116, 0.4) 62%, transparent);
  filter: blur(8px);
  transform: skewX(-12deg);
  animation: sweep 1.5s cubic-bezier(0.55, 0.05, 0.3, 1) 0.15s both;
}
.sweep::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 22%, rgba(61, 250, 116, 0.28), transparent 60%);
  opacity: 0;
  animation: sweep-glow 2.2s ease-out 0.7s both;
}
@keyframes sweep { from { left: 100%; } to { left: -90%; } }
@keyframes sweep-glow { 30% { opacity: 1; } 100% { opacity: 0.35; } }

.screen--splash .logo-word { animation: logo-light 0.6s ease 0.6s both; }
.screen--splash .logo--xl .logo-word { animation-name: logo-light-xl; }
.screen--splash .logo-dia { animation: dia-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 0.4s both; }
@keyframes logo-light {
  from { text-shadow: 3px 5px 0 transparent; }
  to { text-shadow: 3px 5px 0 var(--green), 0 0 26px rgba(61, 250, 116, 0.55); }
}
@keyframes logo-light-xl {
  from { text-shadow: 4px 6px 0 transparent; }
  to { text-shadow: 4px 6px 0 var(--green), 0 0 30px rgba(61, 250, 116, 0.55); }
}
@keyframes dia-pop { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } }

.splash-space { flex: 0.7 1 0; }
.splash-space--mid { flex: 1 1 0; }
.splash-login { position: relative; z-index: 1; display: flex; justify-content: center; padding: 0 var(--gutter) 22px; }
.newhere {
  position: relative;
  z-index: 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  animation: rise 0.6s ease 1.3s both;
}
.newhere-q { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.newhere-go {
  font-size: 18px;
  font-weight: 700;
  background: var(--dark);
  color: var(--green);
  padding: 6px 14px;
  box-shadow: -5px -3px 0 var(--dark);
}
.newhere-go span { display: inline-block; animation: nudge 1.4s ease-in-out 2s infinite; }
.newhere:focus-visible { outline: 3px solid var(--pink); outline-offset: 6px; }
.screen--splash .btn { animation: rise 0.6s ease 1.5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes nudge { 50% { transform: translateX(5px); } }

.claim {
  margin: auto 0 0;
  padding: 0 var(--gutter);
  font-size: clamp(32px, 10.5vw, 44px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
}
.claim em { font-style: normal; color: var(--green); }

/* ---- Dunkle Loot-Screens ------------------------------------------------------ */

.screen--dark {
  background: radial-gradient(ellipse at 50% 28%, color-mix(in srgb, var(--rar) 20%, #0f0f11) 0%, #0a0a0b 72%);
  color: var(--bg);
}
.screen--dark > :where(:not(.fx-canvas, .back, .loot-bg)) { position: relative; z-index: 1; }
.screen--dark .btn { background: var(--bg); color: var(--ink); }
.screen--dark .link { color: var(--bg); }
.screen--dark .dot { background: #4a4a4a; }
.screen--dark .dot.is-active { background: var(--green); }
.screen--dark .logo-word { color: var(--bg); }
.screen--dark .glass-line { stroke: var(--bg); }
.back--dark { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* fest im sichtbaren Fenster: die Funken steigen immer vom unteren Rand auf, auch wenn man scrollt */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* 1 – Loot-Drop */
.loot1-logo { display: flex; justify-content: center; padding-top: max(40px, env(safe-area-inset-top)); }
.drop-stage { flex: 0 0 auto; height: 290px; }
.beam {
  position: absolute;
  left: 50%;
  top: -120px;
  bottom: 40px;
  width: 96px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rar) 55%, transparent) 32%,
    rgba(255, 240, 205, 0.95) 50%, color-mix(in srgb, var(--rar) 55%, transparent) 68%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 85%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 85%, transparent);
  filter: blur(5px);
  animation: beam-in 0.5s ease-out 0.05s forwards, beam-pulse 2.4s ease-in-out 1.2s infinite;
}
@keyframes beam-in { to { transform: translateX(-50%) scaleY(1); } }
@keyframes beam-pulse { 50% { opacity: 0.55; width: 70px; } }
.drop-floor {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 220px;
  height: 40px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--rar) 75%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.is-landed .drop-floor { opacity: 1; }
.drop-gem {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 240px;
  height: 210px;
  transform: translate(-50%, -440px);
  animation: gem-drop 1s ease-in 0.1s forwards;
}
@keyframes gem-drop {
  0% { transform: translate(-50%, -440px); }
  70% { transform: translate(-50%, 0); animation-timing-function: ease-out; }
  82% { transform: translate(-50%, -28px); animation-timing-function: ease-in; }
  92% { transform: translate(-50%, 0); animation-timing-function: ease-out; }
  96% { transform: translate(-50%, -6px); animation-timing-function: ease-in; }
  100% { transform: translate(-50%, 0); }
}
.drop-label {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 10px);
  opacity: 0;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--rar);
  color: var(--rar);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 18px color-mix(in srgb, var(--rar) 45%, transparent);
  transition: opacity 0.4s 0.15s, transform 0.4s 0.15s;
}
.is-landed .drop-label { opacity: 1; transform: translate(-50%, 0); }
.claim--loot { margin: 14px 0 0; font-size: clamp(25px, 7.6vw, 31px); color: var(--bg); text-wrap: balance; }
.claim--loot strong { color: var(--rar); text-shadow: 0 0 16px color-mix(in srgb, var(--rar) 60%, transparent); }

/* 2 – Inventar + Tooltip */
.loot-head { padding: max(38px, env(safe-area-inset-top)) var(--gutter) 0 72px; min-height: 84px; }
.loot-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rar);
}
.loot-title { margin: 4px 0 0; font-size: 20px; font-weight: 800; line-height: 1.3; text-wrap: balance; }
.perk {
  position: relative;
  margin: 12px var(--gutter) 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, rgba(22, 20, 18, 0.97), rgba(8, 8, 10, 0.97));
  border: 1.5px solid var(--rar);
  border-radius: 6px;
  box-shadow: 0 0 0 1px #000, 0 0 26px color-mix(in srgb, var(--rar) 35%, transparent);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.perk--mythic, .perk--legendary { animation: tip-glow 2.2s ease-in-out infinite; }
.perk-photo {
  position: relative;
  height: 128px;
  margin: -16px -18px 0;
  overflow: hidden;
  border-radius: 5px 5px 0 0;
}
.perk-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 134%; /* unteren Rand der Original-Screens (Kurve) abschneiden */
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.6s ease, transform 4s ease-out;
  -webkit-mask-image: linear-gradient(#000 40%, transparent 72%);
  mask-image: linear-gradient(#000 40%, transparent 72%);
  user-select: none;
}
.perk-img.is-active { opacity: 1; transform: scale(1); }
.perk-count {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #8b8a85;
  font-variant-numeric: tabular-nums;
}
.perk-count b { color: var(--rar); font-size: 15px; }
.perk-text { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 10px 0 14px; }
.perk-text.is-in { animation: tip-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.perk-lead { margin: 0; font-size: clamp(24px, 7.2vw, 29px); font-weight: 800; line-height: 1.45; text-wrap: balance; }
.perk-sub { margin: 0; font-size: 16px; line-height: 1.6; color: #cfcdc6; text-wrap: pretty; }
.perk-progress { height: 3px; background: rgba(255, 255, 255, 0.08); }
.perk-progress i { display: block; height: 100%; width: 0; background: var(--rar); box-shadow: 0 0 8px var(--rar); }

.inventory { display: flex; justify-content: center; gap: 12px; padding: 22px var(--gutter) 0; }
.screen--loot2 .screen-foot { margin-top: 0; padding-top: 18px; }
.slot {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--rar) 70%, #000);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rar) 30%, #1a1a1c), #0d0d0f 75%);
  color: var(--rar);
  cursor: pointer;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8);
  animation: slot-drop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) var(--d) both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.slot .ico { width: 30px; height: 30px; stroke-width: 1.6; filter: drop-shadow(0 0 6px var(--rar)); }
.slot[aria-selected="true"] {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--rar), 0 0 22px color-mix(in srgb, var(--rar) 60%, transparent);
}
.slot:focus-visible { outline: 2px solid var(--bg); outline-offset: 3px; }
@keyframes slot-drop { from { opacity: 0; transform: translateY(-30px) scale(0.6); } }

/* 3 – Gegenstandsvergleich */
.screen--story { overflow-x: hidden; }
.story-stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px var(--gutter) 0;
  text-align: center;
}
.spotlight {
  position: absolute;
  left: 50%;
  top: -40px;
  width: 140%;
  height: 120%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 45% 60% at 50% 0%, rgba(255, 236, 200, 0.16), transparent 70%),
    radial-gradient(ellipse 50% 35% at 50% 62%, color-mix(in srgb, var(--rar) 0%, transparent), transparent 70%);
  pointer-events: none;
  transition: background 1s;
}
.is-lit .spotlight {
  background: radial-gradient(ellipse 45% 60% at 50% 0%, rgba(255, 236, 200, 0.2), transparent 70%),
    radial-gradient(ellipse 55% 38% at 50% 64%, color-mix(in srgb, var(--rar) 30%, transparent), transparent 70%);
}
.story-title {
  position: relative;
  margin: 0;
  color: var(--green);
  font-size: clamp(30px, 9vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 0 24px rgba(61, 250, 116, 0.45);
  animation: rise 0.7s ease 0.1s both;
}
.story-quote { position: relative; margin: 26px 0 0; max-width: 34ch; }
.story-mark {
  display: block;
  height: 34px;
  color: var(--rar);
  font-family: Georgia, serif;
  font-size: 76px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 18px color-mix(in srgb, var(--rar) 60%, transparent);
}
.story-line {
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  animation: line-in 0.6s ease forwards;
  animation-delay: calc(0.35s + var(--i) * 0.28s);
}
@keyframes line-in { to { opacity: 1; transform: none; } }
.story-line--old { font-size: 15px; line-height: 1.75; color: #a3a19a; }
.story-line--old b { color: #d8d6cf; }
.story-line--new { font-size: 18px; line-height: 1.75; font-weight: 700; color: var(--bg); }
.story-line--new b { color: var(--rar); }
.story-divider {
  display: block;
  width: 60%;
  height: 2px;
  margin: 18px auto;
  background: linear-gradient(90deg, transparent, var(--rar), transparent);
  box-shadow: 0 0 14px var(--rar);
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 0.5s, transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}
.is-lit .story-divider { opacity: 1; transform: none; }
.story-quote footer { margin-top: 18px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #9c9a92; }
.screen--story .screen-foot { margin-top: 0; padding-top: 22px; }
.screen--dark .hl { background: var(--green); color: #0b0b0c; box-shadow: -0.3em -0.14em 0 var(--green); }
.screen--dark .logo-inline { color: var(--bg); }
.screen--dark .logo-inline .dia-line { stroke: var(--bg); }

/* ---- Login ----------------------------------------------------------------- */

.stage3d { position: absolute; inset: 0; }
.diamond-canvas { display: block; width: 100%; height: 100%; }
.diamond-fallback { position: absolute; inset: 20% 25%; color: #eaf6ff; }

.screen--login .stage3d { bottom: 18%; }

.login-form { display: flex; flex-direction: column; flex: 1; padding: 0 var(--gutter); }
.login-icon { display: flex; justify-content: center; margin: 18px 0 10px; }
.login-icon .dia-stack { width: 46px; height: 40px; }
.headline { margin: 6px 0 6px; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.sub { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.field input {
  height: 46px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
}
.field select {
  height: 46px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
  min-width: 0;
  width: 100%;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row .field { min-width: 0; }
.field input:focus, .field select:focus { box-shadow: 4px 4px 0 var(--green); }
.field.is-error input { border-color: var(--pink); }

/* ---- Spenden / Diamant wählen ---------------------------------------------- */


.hero--gem .glow,
.famecard-gem .glow {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 90%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(calc(0.55 + var(--glow) * 0.6));
  background: radial-gradient(circle, color-mix(in srgb, var(--rar) 70%, transparent) 0%, transparent 62%);
  opacity: calc(0.35 + var(--glow) * 0.65);
  transition: background 0.4s;
  pointer-events: none;
}

.rays { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.rays i {
  position: absolute;
  left: -2px;
  top: calc(-60px - var(--glow) * 70px);
  width: 4px;
  height: calc(18px + var(--glow) * 34px);
  border-radius: 4px;
  background: linear-gradient(var(--rar), transparent);
  transform-origin: 2px calc(60px + var(--glow) * 70px);
  opacity: calc(0.25 + var(--glow) * 0.75);
  animation: ray 2.4s ease-in-out infinite;
}
.rays i:nth-child(1) { transform: rotate(0deg); }
.rays i:nth-child(2) { transform: rotate(36deg); animation-delay: -0.3s; }
.rays i:nth-child(3) { transform: rotate(72deg); animation-delay: -0.6s; }
.rays i:nth-child(4) { transform: rotate(108deg); animation-delay: -0.9s; }
.rays i:nth-child(5) { transform: rotate(144deg); animation-delay: -1.2s; }
.rays i:nth-child(6) { transform: rotate(180deg); animation-delay: -1.5s; }
.rays i:nth-child(7) { transform: rotate(216deg); animation-delay: -1.8s; }
.rays i:nth-child(8) { transform: rotate(252deg); animation-delay: -2.1s; }
.rays i:nth-child(9) { transform: rotate(288deg); animation-delay: -0.4s; }
.rays i:nth-child(10) { transform: rotate(324deg); animation-delay: -0.8s; }
@keyframes ray { 50% { filter: brightness(1.8); height: calc(10px + var(--glow) * 24px); } }


.tier-name {
  font-size: 21px;
  font-weight: 800;
  color: var(--rar);
  text-shadow: 0 0 18px color-mix(in srgb, var(--rar) 60%, transparent);
  transition: color 0.3s;
}
.spin-hint {
  position: absolute;
  right: 20px;
  bottom: 30%;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(248, 248, 246, 0.7);
}
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.donate-body { display: flex; flex-direction: column; align-items: center; flex: 1; padding: 22px var(--gutter) 0; gap: 12px; }

.amount input {
  width: 230px;
  height: 56px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  outline: none;
  box-shadow: 5px 5px 0 var(--rar);
}
.amount input:focus { box-shadow: 5px 5px 0 var(--pink); }

.tierbar { width: 100%; max-width: 330px; font-size: 10.5px; font-weight: 600; }
.tierbar-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-bottom: 5px; }
.tierbar-head span:first-child { color: color-mix(in srgb, var(--rar) 55%, var(--ink)); font-weight: 800; }
.tierbar-track { position: relative; height: 12px; border: 2px solid var(--ink); background: #fff; display: grid; grid-template-columns: repeat(5, 1fr); }
.tierbar-track i { background: color-mix(in srgb, var(--c) 22%, #fff); border-right: 1px solid rgba(0, 0, 0, 0.2); }
.tierbar-track i:last-of-type { border-right: 0; }
.tierbar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--rar); transition: width 0.2s; }

.arc { width: 100%; max-width: 330px; touch-action: none; cursor: pointer; outline: none; margin-top: -4px; }
.arc svg { display: block; width: 100%; overflow: visible; }
.arc-track, .arc-fill { fill: none; stroke-linecap: round; }
.arc-track { stroke: #dcdcd8; stroke-width: 8; }
.arc-fill { stroke: var(--ink); stroke-width: 8; stroke-dasharray: 0 1; }
.knob { fill: var(--bg); stroke: var(--ink); stroke-width: 3; }
.knob-shadow { fill: var(--green); }
.knob-dot { fill: var(--ink); }
.arc:focus-visible .knob { stroke: var(--pink); }

.rank { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); }
.rank b { font-weight: 800; background: var(--dark); color: var(--green); padding: 0 6px; }
.rank--locked { font-size: 12.5px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 4px; }

.check { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { width: 20px; height: 20px; border: 2px solid var(--ink); background: #fff; display: grid; place-items: center; }
.check input:checked + .check-box { background: var(--green); }
.check input:checked + .check-box::after { content: ""; width: 9px; height: 5px; border: solid var(--ink); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible + .check-box { outline: 3px solid var(--pink); outline-offset: 2px; }
.check a { color: inherit; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }


/* Einzahlen: dunkel und clean, der Diamant als Geheimnis */
.screen--donate { background: radial-gradient(ellipse at 50% 18%, color-mix(in srgb, var(--rar) 22%, #0f0f11) 0%, #0a0a0b 60%); }
.vault { position: relative; height: 180px; margin-top: max(26px, env(safe-area-inset-top)); }
.vault .stage3d { inset: 0 12%; }
.vault-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%) scale(calc(0.7 + var(--glow) * 0.4));
  background: radial-gradient(circle, color-mix(in srgb, var(--rar) 45%, transparent), transparent 62%);
  transition: background 0.5s;
}
.vault-q {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) scale(0.6);
  font-size: 92px;
  font-weight: 800;
  color: var(--rar);
  text-shadow: 0 0 24px var(--rar), 0 0 60px var(--rar);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
}
.is-locked .vault-q { opacity: 0.85; transform: translate(-50%, -50%) scale(1); animation: q-pulse 1.8s ease-in-out infinite; }
@keyframes q-pulse { 50% { opacity: 0.45; transform: translate(-50%, -50%) scale(1.08); } }
.vault-info { text-align: center; padding: 0 var(--gutter); }
.vault-name {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  color: var(--rar);
  text-shadow: 0 0 16px color-mix(in srgb, var(--rar) 55%, transparent);
  transition: color 0.4s;
}
.vault-teaser { margin: 4px 0 0; font-size: 12.5px; color: #a9a7a0; }
.collection { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px var(--gutter) 0; flex-wrap: wrap; }
.cslot {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, #333);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--c);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cslot .dia { width: 24px; height: 20px; }
.cslot .dia-fill { fill: var(--c); }
.cslot .dia-line { stroke: #f2f2ee; stroke-width: 2.4; }
.cslot-q { font-weight: 800; color: color-mix(in srgb, var(--c) 70%, #777); }
.cslot.is-target { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--c), 0 0 18px var(--c); }

.screen--donate .donate-body { padding-top: 10px; gap: 8px; }
.screen--donate .arc { max-width: 290px; margin-top: -8px; }
.screen--donate .screen-foot { padding-top: 6px; }
.screen--donate .account { box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); }
.amount-box { display: flex; align-items: center; gap: 10px; }
.stepper {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--bg);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.stepper:active { background: var(--rar); color: #0b0b0c; }
.amount-field {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  width: 200px;
  height: 64px;
  padding: 0 14px;
  border: 2px solid var(--rar);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--rar), 0 0 24px color-mix(in srgb, var(--rar) 35%, transparent);
  cursor: text;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.amount-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: right;
  font-size: 30px;
  font-weight: 800;
  line-height: 60px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.amount-cur { font-size: 26px; font-weight: 800; }
.amount-field.is-long input { font-size: 25px; }
.amount-field.is-long .amount-cur { font-size: 22px; }
.amount-field:focus-within { box-shadow: 5px 5px 0 var(--pink), 0 0 0 4px rgba(255, 47, 214, 0.25); }
.amount-hint { margin: -2px 0 0; font-size: 11.5px; color: #8b8a85; }
.screen--donate .arc-track { stroke: rgba(255, 255, 255, 0.12); }
.screen--donate .arc-fill { stroke: var(--rar); }
.screen--donate .knob { fill: #f8f8f6; stroke: #0b0b0c; }
.nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 10px 14px;
  border: 1px dashed var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  color: var(--bg);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.nudge b { color: var(--c); }
.nudge-go { flex: 0 0 auto; font-weight: 800; color: var(--c); animation: nudge 1.4s ease-in-out infinite; }
.rank-preview { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: #cfcdc6; }
.rank-preview b { color: var(--green); }
.screen--donate .check { color: var(--bg); }
.screen--donate .check-box { background: transparent; border-color: rgba(255, 255, 255, 0.6); }
.screen--donate .btn { box-shadow: 7px 8px 0 var(--rar); }
.screen--donate .btn:disabled { box-shadow: 7px 8px 0 #9a9a9a; }
.screen--donate .knob-shadow { fill: var(--rar); }
.screen--donate .check input:checked + .check-box { background: var(--rar); }

.tier-info { position: absolute; left: 0; right: 0; bottom: 19%; text-align: center; z-index: 2; }
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12.5px;
  padding: 6px 12px;
  background: var(--dark);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--rar);
}
.account b { color: var(--rar); }
.account-arrow { color: var(--rar); }
.account--new { font-weight: 700; }
.amount { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.amount-label { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.tier-rarity {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 248, 246, 0.7);
}

.rarity-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, var(--rar), transparent 62%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.rarity-flash.is-on { animation: flash 0.75s ease-out; }
@keyframes flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }

/* ---- Fame-Card ---------------------------------------------------------------- */

.screen--card { padding-top: max(76px, calc(env(safe-area-inset-top) + 50px)); }

/* Loot-Hintergrund: je seltener, desto mehr Strahlen, Runen und Licht */
.loot-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.loot-rays {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 180%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 55%, transparent) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  opacity: 0.12;
  animation: rays-spin 40s linear infinite;
}
@keyframes rays-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.loot-runes {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 118%;
  transform: translate(-50%, -50%);
  opacity: 0;
  fill: none;
  stroke: var(--rar);
  stroke-width: 0.6;
  animation: runes-spin 60s linear infinite;
}
.loot-runes text { fill: var(--rar); stroke: none; font-size: 9px; letter-spacing: 2px; }
@keyframes runes-spin { to { transform: translate(-50%, -50%) rotate(-360deg); } }
.loot-pillar {
  position: absolute;
  left: 50%;
  top: -10%;
  bottom: 18%;
  width: 46%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rar) 40%, transparent) 35%,
    color-mix(in srgb, var(--rar) 30%, #fff) 50%, color-mix(in srgb, var(--rar) 40%, transparent) 65%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  filter: blur(14px);
  opacity: 0;
  animation: beam-pulse 2.6s ease-in-out infinite;
}
.loot-ground {
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 120%;
  height: 120px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, color-mix(in srgb, var(--rar) 45%, transparent), transparent 65%);
  opacity: 0.3;
}
.lvl-1 .loot-rays { opacity: 0.2; }
.lvl-2 .loot-rays { opacity: 0.3; }
.lvl-2 .loot-runes { opacity: 0.35; }
.lvl-2 .loot-ground { opacity: 0.5; }
.lvl-3 .loot-rays { opacity: 0.42; animation-duration: 26s; }
.lvl-3 .loot-runes { opacity: 0.6; }
.lvl-3 .loot-pillar { opacity: 0.55; }
.lvl-3 .loot-ground { opacity: 0.7; }
.lvl-4 .loot-rays { opacity: 0.6; animation-duration: 16s; }
.lvl-4 .loot-runes { opacity: 0.8; }
.lvl-4 .loot-pillar { opacity: 0.85; }
.lvl-4 .loot-ground { opacity: 0.95; }
.screen--card.lvl-0 { background: radial-gradient(ellipse at 50% 35%, #2a2a2c, #0a0a0b 70%); }


.card-wrap { position: relative; perspective: 900px; padding: 0 34px; margin: auto 0; display: flex; justify-content: center; }

.flip {
  position: relative;
  width: 100%;
  max-width: 300px;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: pointer;
  outline: none;
}
.flip-front, .flip-back { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip-back { position: absolute; inset: 0; transform: rotateY(180deg); }
.cardback {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, #1c1d1f, #0b0b0d 75%);
  border: 3px solid #3dfa74;
  box-shadow: 9px 11px 0 #1f7a3c, 0 0 40px rgba(61, 250, 116, 0.35);
  animation: back-pulse 1.8s ease-in-out infinite;
}
@keyframes back-pulse { 50% { box-shadow: 9px 11px 0 #1f7a3c, 0 0 70px rgba(61, 250, 116, 0.6); } }
.cardback-pattern {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(61, 250, 116, 0.07) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgba(61, 250, 116, 0.07) 0 2px, transparent 2px 14px);
}
.cardback-logo, .cardback-q, .cardback-tap { position: relative; }
.cardback .logo-word { color: var(--bg); }
.cardback .glass-line { stroke: var(--bg); }
.cardback-q { font-size: 86px; font-weight: 800; color: #3dfa74; text-shadow: 0 0 30px #3dfa74; line-height: 1; }
.cardback-tap {
  padding: 6px 12px;
  background: #3dfa74;
  color: #0b0b0c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  animation: nudge 1.4s ease-in-out infinite;
}
/* Spannung: die Rückseite glüht in der Farbe des Fundes auf */
.is-charging .cardback {
  border-color: var(--rar);
  box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 60%, #000), 0 0 calc(40px + var(--charge, 0) * 90px) var(--rar);
  animation: none;
}
.is-charging .cardback-q { color: var(--rar); text-shadow: 0 0 calc(20px + var(--charge, 0) * 50px) var(--rar); }
.is-charging .cardback-tap { opacity: 0; }
.is-charging .loot-rays { opacity: calc(0.2 + var(--charge, 0) * 0.6); animation-duration: 3s; }
.reveal-flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #fff 0%, var(--rar) 35%, transparent 75%);
  opacity: 0;
}
.reveal-flash.is-on { animation: reveal-flash 1.1s ease-out forwards; }
@keyframes reveal-flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
/* Vor dem Aufdecken: Hintergrund neutral, Buttons verborgen */
.screen--card .card-actions { transition: opacity 0.5s 0.6s, transform 0.5s 0.6s; }
.is-hidden .card-actions { opacity: 0; transform: translateY(16px); pointer-events: none; }

.famecard {
  position: relative;
  padding: 3px;
  border-radius: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 75%, #000), 0 20px 40px rgba(0, 0, 0, 0.5);
}
.famecard--magic { box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 75%, #000), 0 0 28px color-mix(in srgb, var(--rar) 45%, transparent); }
.famecard--rare { box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 75%, #000), 0 0 36px color-mix(in srgb, var(--rar) 50%, transparent); }
.famecard--mythic,
.famecard--legendary {
  box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 75%, #000), 0 0 50px color-mix(in srgb, var(--rar) 65%, transparent);
  animation: card-pulse 2.2s ease-in-out infinite;
}
@keyframes card-pulse {
  50% { box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 75%, #000), 0 0 80px color-mix(in srgb, var(--rar) 85%, transparent); }
}

/* Rahmen: einfarbig bis selten, ab mystisch ein umlaufender Farbverlauf */
.famecard-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: var(--rar);
}
.famecard--rare .famecard-ring {
  background: conic-gradient(#fff3b0, #ffd43b, #8a6a00, #ffd43b, #fff3b0, #ffd43b, #8a6a00, #ffd43b, #fff3b0);
}
.famecard--mythic .famecard-ring {
  background: conic-gradient(#b65cff, #ff5fd2, #5b8cff, #b65cff, #ff5fd2, #5b8cff, #b65cff);
  animation: ring-spin 4s linear infinite;
}
.famecard--legendary .famecard-ring {
  background: conic-gradient(#ff8a1f, #ffe08a, #ff3d00, #ff8a1f, #ffe08a, #ff3d00, #ff8a1f);
  animation: ring-spin 2.4s linear infinite;
}
@keyframes ring-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.famecard-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 16px;
  border-radius: 13px;
  overflow: hidden;
  text-align: center;
  color: var(--bg);
  background: radial-gradient(ellipse at 50% 32%, color-mix(in srgb, var(--rar) 24%, #121214), #0b0b0d 72%);
}
.famecard--rare .famecard-inner,
.famecard--mythic .famecard-inner,
.famecard--legendary .famecard-inner {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rar) 60%, transparent), inset 0 0 0 5px #0b0b0d,
    inset 0 0 0 6px color-mix(in srgb, var(--rar) 35%, transparent);
}
.famecard-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, 0.2), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}
.famecard-top { position: relative; z-index: 3; width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; }
.famecard-brand { font-size: 19px; font-weight: 800; text-shadow: 2px 3px 0 var(--green); }
.famecard-brand .dia-line { stroke: var(--bg); }
.famecard-serial { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; color: color-mix(in srgb, var(--rar) 60%, #fff); font-variant-numeric: tabular-nums; }
.famecard-gem { position: relative; width: 100%; height: 200px; --glow: 0.9; }
.famecard-gem .stage3d { inset: 0 8%; }
.famecard-name {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--rar);
  text-shadow: 0 0 14px color-mix(in srgb, var(--rar) 55%, transparent);
}
.famecard-type { margin-top: 2px; font-size: 11.5px; color: #a9a7a0; }
.famecard-stats {
  list-style: none;
  width: 100%;
  margin: 10px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: #8fb4ff;
}
.famecard-stats li:first-child { font-size: 15px; font-weight: 800; color: #fff; }
.famecard-flavor { margin: 6px 0 0; font-size: 12px; font-style: italic; color: #d9a35b; }
.famecard-insta { position: relative; z-index: 3; margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.famecard-insta input {
  width: 150px;
  border: 0;
  border-bottom: 2px solid var(--rar);
  background: transparent;
  color: var(--bg);
  font-size: 13px;
  padding: 2px 0;
  outline: none;
}
.famecard-insta input::placeholder { color: rgba(248, 248, 246, 0.5); }

.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }

/* ---- Ranking ---------------------------------------------------------------- */

.screen--ranking { padding-bottom: 0; }
.rank-tabs {
  display: flex;
  gap: 4px;
  margin: max(40px, env(safe-area-inset-top)) var(--gutter) 0 72px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.rank-tabs a {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #b9b7b0;
  text-decoration: none;
}
.rank-tabs a.is-active { background: var(--green); color: #0b0b0c; box-shadow: 0 0 18px rgba(61, 250, 116, 0.45); }
.rank-head { display: flex; align-items: center; gap: 12px; padding: 18px var(--gutter) 0; }
.rank-flag { font-size: 38px; line-height: 1; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25)); }
.rank-head h1 { margin: 0; font-size: 24px; font-weight: 800; text-wrap: balance; }
.rank-head p { margin: 2px 0 0; font-size: 12px; color: #a9a7a0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px var(--gutter) 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--bg);
  font-size: 12px;
  cursor: pointer;
}
.chip.is-active { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 12px rgba(61, 250, 116, 0.25); }

.podium3 { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 6px; padding: 26px var(--gutter) 0; }
.pstep { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pcrown { color: #ffd43b; filter: drop-shadow(0 0 10px #ffd43b); animation: crown-bob 2s ease-in-out infinite; }
.pcrown .ico { width: 30px; height: 30px; }
@keyframes crown-bob { 50% { transform: translateY(-4px); } }
.pgem { width: 34px; height: 29px; color: var(--rar); filter: drop-shadow(0 0 10px var(--rar)); }
.pgem .dia-fill { fill: var(--rar); }
.pgem .dia-line { stroke: #fff; }
.pstep--1 .pgem { width: 46px; height: 39px; }
.pname { margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 700; color: var(--rar); }
.pamount { font-size: 11px; color: #d8d6cf; margin-bottom: 6px; }
.pblock {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rar) 45%, #1b1b1d), #111113 85%);
  border: 1px solid var(--rar);
  border-bottom: 0;
  box-shadow: 0 0 26px color-mix(in srgb, var(--rar) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 14px var(--rar);
}
.pblock::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 100%;
  height: 150px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--rar) 30%, transparent));
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
}
.pstep--1 .pblock { height: 104px; }
.pstep--2 .pblock { height: 74px; }
.pstep--3 .pblock { height: 56px; }
.pstep.is-me .pname::before { content: "★ "; }

.rlist { list-style: none; margin: 0; padding: 0 var(--gutter); }
.rlist:first-of-type { border-top: 2px solid rgba(255, 255, 255, 0.12); }
.rrow {
  display: grid;
  grid-template-columns: 38px 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  margin: 6px 0 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 16%, transparent), rgba(255, 255, 255, 0.02) 55%);
  border-left: 3px solid var(--rar);
  font-size: 13px;
}
.rrow-rank { font-weight: 800; color: #d8d6cf; font-variant-numeric: tabular-nums; }
.rrow-gem { width: 22px; height: 19px; color: var(--rar); }
.rrow-gem .dia-fill { fill: var(--rar); }
.rrow-gem .dia-line { stroke: #f2f2ee; stroke-width: 2.4; }
.rrow-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow-name small { display: block; font-size: 10.5px; color: var(--rar); }
.rrow-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.rrow--me { outline: 1px solid var(--green); box-shadow: 0 0 20px rgba(61, 250, 116, 0.35); }
.rows-gap { text-align: center; padding: 4px 0; color: #77756f; }

.duel { margin: 26px var(--gutter) 0; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03); }
.duel h2 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.duel ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.duel-row { display: grid; grid-template-columns: 22px minmax(0, 1.2fr) 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.duel-rank { color: #8b8a85; font-weight: 700; }
.duel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-bar { height: 8px; background: rgba(255, 255, 255, 0.07); }
.duel-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff8a1f, #ffd43b); box-shadow: 0 0 10px rgba(255, 138, 31, 0.6); }
.duel-amount { font-variant-numeric: tabular-nums; color: #d8d6cf; }
.duel-row.is-mine { color: var(--green); font-weight: 700; }
.duel-row.is-mine .duel-bar i { background: var(--green); box-shadow: 0 0 10px rgba(61, 250, 116, 0.7); }

.mebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter) max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.85), #0a0a0b 40%);
  border-top: 1px solid rgba(61, 250, 116, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
}
.mebar small { display: block; margin-top: 2px; font-size: 11px; color: #a9a7a0; }
.mebar .btn { flex: 0 0 auto; min-width: 0; height: 44px; padding: 0 16px; font-size: 13px; white-space: nowrap; box-shadow: 5px 6px 0 var(--green); }
.mebar > div { min-width: 0; }

/* ---- Toast ----------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  background: var(--dark);
  color: var(--green);
  font-family: var(--mono);
  font-size: 13px;
  box-shadow: 5px 6px 0 var(--green);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

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

.screen--card .btn { box-shadow: 7px 8px 0 var(--rar); }

/* Übersicht: das Foto füllt den freien Platz, der Text sitzt unten */

/* ---- Ranking: Grafik ------------------------------------------------------------ */

.avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #2a2a2e), #121214 75%);
  border: 2px solid var(--c);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 45%, transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.avatar--big { width: 54px; height: 54px; font-size: 17px; border-width: 3px; border-color: var(--rar); box-shadow: 0 0 22px var(--rar); }
.pstep--1 .avatar--big { width: 66px; height: 66px; font-size: 20px; }
.rrow { grid-template-columns: 34px 30px 1fr auto; }

.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px var(--gutter) 0; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 0;
}
.stat b { font-size: 14px; letter-spacing: -0.02em; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #8b8a85; }
.stat--me { border-color: rgba(61, 250, 116, 0.5); }
.stat--me b { color: var(--green); }

.podium3 { position: relative; }
.podium-beams {
  position: absolute;
  inset: -10px 0 0;
  background:
    radial-gradient(ellipse 18% 70% at 50% 0%, rgba(255, 138, 31, 0.25), transparent 70%),
    radial-gradient(ellipse 14% 60% at 20% 0%, rgba(182, 92, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 14% 60% at 80% 0%, rgba(255, 212, 59, 0.16), transparent 70%);
  pointer-events: none;
}
.pblock { border-radius: 6px 6px 0 0; }
.pblock::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  background: linear-gradient(rgba(255, 255, 255, 0.35), transparent);
  border-radius: 6px 6px 0 0;
}

/* Kachelkarte Deutschland: eine Farbe, je mehr Geld desto heller */
.tilemap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 56px;
  gap: 4px;
  margin-bottom: 14px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, #3dfa74 calc(var(--t) * 100%), #1d1f1e);
  color: #f8f8f6;
  cursor: pointer;
  transition: transform 0.15s;
}
.tile b { font-size: 14px; font-weight: 800; }
.tile small { font-size: 9.5px; opacity: 0.85; }
.tile i { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: 9px; opacity: 0.7; }
/* helle Kacheln bekommen dunkle Schrift, damit sie lesbar bleibt */
.tile[style*="--t:0.6"], .tile[style*="--t:0.7"], .tile[style*="--t:0.8"], .tile[style*="--t:0.9"], .tile[style*="--t:1"] { color: #0b0b0c; }
.tile:hover { transform: scale(1.04); }
.tile.is-active { outline: 2px solid #fff; outline-offset: 1px; }
.tile.is-mine::after { content: "★"; position: absolute; top: 2px; left: 5px; font-size: 10px; }
.tilemap-legend {
  grid-column: 4;
  grid-row: 4 / span 2;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: #8b8a85;
}
.tilemap-legend i { width: 10px; height: 54px; border-radius: 4px; background: linear-gradient(#3dfa74, #1d1f1e); }

.duel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.duel-bar { border-radius: 4px; overflow: hidden; }
.duel-bar i { border-radius: 0 4px 4px 0; }
.medal {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  color: #0b0b0c;
}
.medal--1 { background: #ff8a1f; box-shadow: 0 0 10px #ff8a1f; }
.medal--2 { background: #b65cff; box-shadow: 0 0 10px #b65cff; }
.medal--3 { background: #ffd43b; box-shadow: 0 0 10px #ffd43b; }

/* ---- Card teilen ---------------------------------------------------------------- */

.quick-share { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; width: 100%; max-width: 340px; }
.qs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s;
}
.qs .ico { width: 24px; height: 24px; }
.qs:active { transform: scale(0.96); }
/* Instagram-Verlauf und TikTok-Farben als Erkennungszeichen */
.qs--ig { border: 0; background: linear-gradient(135deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5); }
.qs--tt { border: 0; background: #000; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; }
.is-busy { opacity: 0.6; pointer-events: none; }

.sheet { position: absolute; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.3s; }
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92%;
  overflow-y: auto;
  padding: 10px var(--gutter) max(20px, env(safe-area-inset-bottom));
  background: #121214;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px 22px 0 0;
  color: var(--bg);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet.is-open .sheet-backdrop { opacity: 1; }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-grip { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
.sheet-title { margin: 0 0 12px; text-align: center; font-size: 18px; font-weight: 800; }
.sheet-preview {
  position: relative;
  width: 168px;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a0b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 30px color-mix(in srgb, var(--rar) 40%, transparent);
}
.sheet-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #8b8a85; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.share-btn .ico { width: 20px; height: 20px; }
.share-btn--ig { border: 0; background: linear-gradient(135deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5); }
.share-btn--tt { border: 0; background: #000; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; }
.sheet-note { margin: 12px 0 0; text-align: center; font-size: 11px; color: #8b8a85; }

/* ---- Edelsteine: Sammlung und Stufe ------------------------------------------------- */

.vault-name span { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: #cfcdc6; text-shadow: none; }
.gem-grid {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 2px;
  width: 100%;
  max-width: 330px;
}
.gcell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gcell.is-found { background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 70%, transparent); }
.gcell.is-target { transform: scale(1.5); background: #fff; box-shadow: 0 0 0 1px var(--rar), 0 0 10px var(--rar); z-index: 1; }

/* ---- Fame-Card: edles Design je Edelstein ---------------------------------------------
   Rahmen aus Metall passend zur Steinfarbe (Gold, Roségold, Platin, bei Legenden Holo),
   Grund in der Farbe des Steins mit feinem Facettenmuster, Name in Serifenschrift. */

.famecard {
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --metal: linear-gradient(135deg, #6f7780, #e9eef3 22%, #9aa3ad 45%, #ffffff 62%, #7c858f 82%, #dfe5ec);
  --metal-line: #c9d2dc;
  padding: 3px;
  border-radius: 18px;
  animation: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 24px 50px rgba(0, 0, 0, 0.6),
    0 0 60px color-mix(in srgb, var(--gem) 35%, transparent);
}
.famecard.metal-gold {
  --metal: linear-gradient(135deg, #7a5a14, #f7dc8a 22%, #b8892c 45%, #fff3c4 62%, #a47a26 80%, #e9c76a);
  --metal-line: #d8b95e;
}
.famecard.metal-rose {
  --metal: linear-gradient(135deg, #7e4536, #f6c2b0 22%, #b9735e 45%, #ffe4da 62%, #9a5a48 80%, #e9a892);
  --metal-line: #e8a894;
}
.famecard.metal-legend {
  --metal: conic-gradient(from 0deg, #ffd6ec, #9fd8ff, #fff4c2, #ff9ad0, #c6b6ff, #b6fff0, #ffd6ec);
  --metal-line: #f5d2ea;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 24px 50px rgba(0, 0, 0, 0.6),
    0 0 90px color-mix(in srgb, var(--gem) 55%, transparent);
}
.famecard .famecard-ring {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  transform: none;
  background: var(--metal);
  animation: none;
}
.famecard.metal-legend .famecard-ring {
  left: 50%;
  top: 50%;
  width: 180%;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  animation: ring-spin 7s linear infinite;
}
.famecard .famecard-inner {
  border-radius: 15px;
  padding: 16px 18px 14px;
  background: #0b0a0d;
  box-shadow: none;
}
/* Foto des Steins: randlos oben, läuft weich ins Schwarz aus */
.famecard-photo {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 250px;
  -webkit-mask-image: linear-gradient(to bottom, #000 64%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 64%, transparent 98%);
}
.famecard-photo .stage3d { inset: 0; }
.famecard .famecard-serial {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.famecard .famecard-brand .dia-line { stroke: #fff; }
/* Logo auf dem Foto: knapper grüner Versatz und dunkler Halo, damit es gut lesbar bleibt */
.famecard .famecard-brand {
  color: #fff;
  text-shadow: 1px 1.5px 0 var(--green), 0 1px 8px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9);
}
.famecard .famecard-brand .dia { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.8)); }
.famecard-plate { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; margin-top: 196px; }
.famecard .famecard-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-wrap: balance;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gem) 45%, transparent));
}
.famecard-rule { display: flex; align-items: center; gap: 8px; width: 70%; margin: 8px 0 6px; color: var(--metal-line); }
.famecard-rule i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--metal-line)); }
.famecard-rule i:last-child { background: linear-gradient(90deg, var(--metal-line), transparent); }
.famecard-rule .dia { width: 14px; height: 12px; flex: 0 0 auto; }
.famecard-rule .dia-fill { fill: var(--gem); }
.famecard-rule .dia-line { stroke: var(--metal-line); stroke-width: 3; }
.famecard .famecard-flavor { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.25; font-style: italic; font-weight: 500; color: #e2dccd; }
.famecard-foot { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 12px; }
.famecard .famecard-insta { margin: 0; font-size: 12px; }
.famecard .famecard-insta input { border-bottom-color: var(--metal-line); }
/* Echtheitssiegel: kleines Hologramm */
.seal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 30deg, #ffd6ec, #9fd8ff, #fff4c2, #b6fff0, #ffd6ec);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 12px rgba(255, 255, 255, 0.25);
  color: #0b0b0c;
  font-size: 6.5px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-align: center;
  animation: seal-turn 6s linear infinite;
}
@keyframes seal-turn { to { filter: hue-rotate(360deg); } }

/* ---- Farbklassen: Je höher der Kontostand, desto wertiger die Seite ----------------------
   --lux 0..1 steuert die Stärke. Ab Mint Lichtstrahlen, ab Saphir ein Tresor-Ring,
   ab Amethyst ein Metallrahmen ums Betragsfeld, ab Rubellit ein Runenkreis, ab Rubin
   Metall-Schrift, ab Feuer ein Glanz, der über Feld und Knopf läuft, ab 1 Mio. Regenbogen. */
.cls-0 { --lux: 0; }
.cls-1 { --lux: 0.15; }
.cls-2 { --lux: 0.25; }
.cls-3 { --lux: 0.35; }
.cls-4 { --lux: 0.45; }
.cls-5 { --lux: 0.55; }
.cls-6 { --lux: 0.65; }
.cls-7 { --lux: 0.75; }
.cls-8 { --lux: 0.88; }
.cls-9 { --lux: 1; }

.screen--donate {
  background:
    radial-gradient(ellipse at 50% 18%, color-mix(in srgb, var(--rar) calc(22% + var(--lux) * 20%), #0f0f11) 0%, #0a0a0b calc(60% + var(--lux) * 15%));
  transition: background 0.5s;
}
.donate-aura {
  /* fest im sichtbaren Fenster: der Schein endet beim Scrollen nicht an einer Kante */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--lux);
  background:
    radial-gradient(60% 30% at 50% 0%, color-mix(in srgb, var(--rar) 35%, transparent), transparent 70%),
    radial-gradient(80% 40% at 50% 100%, color-mix(in srgb, var(--rar) 18%, transparent), transparent 70%);
  transition: opacity 0.5s;
}
.vault-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 40%, transparent) 0 4deg, transparent 4deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 62%);
  mask-image: radial-gradient(circle, #000 10%, transparent 62%);
  opacity: calc(var(--lux) * 0.7);
  animation: vault-spin calc(60s - var(--lux) * 36s) linear infinite;
  pointer-events: none;
  transition: opacity 0.5s;
}
.vault-ring,
.vault-runes {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 196px;
  height: 196px;
  margin: -98px 0 0 -98px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.vault-ring {
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--rar) 70%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--rar) 30%, transparent), inset 0 0 22px color-mix(in srgb, var(--rar) 20%, transparent);
  animation: vault-spin 40s linear infinite reverse;
}
.vault-runes { width: 214px; height: 214px; margin: -107px 0 0 -107px; animation: vault-spin 50s linear infinite; }
.vault-runes text { font: 700 9px "Source Code Pro", monospace; letter-spacing: 3px; fill: color-mix(in srgb, var(--rar) 80%, #fff); }
@keyframes vault-spin { to { transform: rotate(360deg); } }
:is(.cls-3, .cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9) .vault-ring { opacity: 1; }
:is(.cls-5, .cls-6, .cls-7, .cls-8, .cls-9) .vault-runes { opacity: 0.55; }
:is(.cls-6, .cls-7, .cls-8, .cls-9) .vault-ring { border-style: double; border-width: 4px; }

/* Betragsfeld und Knopf: ab Amethyst Metallrahmen statt flachem Versatz */
:is(.cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9) .amount-field {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--rar) 60%, #000), #fff 30%, var(--rar) 50%, #fff 70%, color-mix(in srgb, var(--rar) 60%, #000)) border-box;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rar) 40%, transparent), 0 8px 30px color-mix(in srgb, var(--rar) 45%, transparent);
}
:is(.cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9) .btn:not(:disabled) {
  box-shadow: 0 0 0 2px var(--rar), 0 10px 34px color-mix(in srgb, var(--rar) 55%, transparent);
}
/* ab Rubin: Stufen-Schrift in Metall-Verlauf */
:is(.cls-6, .cls-7, .cls-8, .cls-9) .vault-name {
  background: linear-gradient(100deg, color-mix(in srgb, var(--rar) 70%, #fff), #fff 40%, var(--rar) 60%, #fff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* ab Feuer: ein Glanz läuft regelmäßig über Betragsfeld und Knopf */
.amount-field,
:is(.screen--donate, .screen--welcome) .btn { position: relative; overflow: hidden; }
:is(.cls-7, .cls-8, .cls-9):is(.screen--donate, .screen--welcome) :is(.amount-field, .btn:not(:disabled))::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: lux-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lux-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
/* ab 1 Mio.: Regenbogen-Schimmer statt einer Farbe */
.cls-9 .vault-rays { background: repeating-conic-gradient(from 0deg, #ffd6ec88 0 4deg, transparent 4deg 10deg, #9fd8ff88 10deg 14deg, transparent 14deg 20deg, #fff4c288 20deg 24deg, transparent 24deg 30deg); }
.cls-9 .vault-ring { border-color: #fff; box-shadow: 0 0 24px #ffd6ec, inset 0 0 24px #9fd8ff; }
.cls-9 .vault-name { background: linear-gradient(90deg, #ffb3e2, #9fd0ff, #fff3a8, #b6ffd9, #ffb3e2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cls-9 .amount-field { background: linear-gradient(#fff, #fff) padding-box, conic-gradient(from 0deg, #ffd6ec, #9fd8ff, #fff4c2, #b6fff0, #c6b6ff, #ffd6ec) border-box; }

/* Schneller Weg zur eigenen Card */
.mycard-btn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: var(--gutter);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--rar, var(--green));
  border-radius: 99px;
  background: rgba(10, 10, 11, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 16px color-mix(in srgb, var(--rar, var(--green)) 40%, transparent);
}
.mycard-btn .ico { width: 15px; height: 15px; }
.screen--dark > .mycard-btn { position: absolute; }
.mebar .mycard-btn { top: -48px; }

/* Startseite für Wiederkehrer */
.welcome-hi { margin: 0 var(--gutter) 14px; text-align: center; font-size: 16px; font-weight: 700; }
.welcome-more { display: block; margin: 10px auto 0; text-align: center; }
.welcome-logout { display: block; margin: 18px auto 0; color: #8b8a85; font-size: 12px; }
.welcome-reset.is-armed { color: #e5484d; font-weight: 700; text-decoration-color: #e5484d; }
.welcome-reset { position: relative; z-index: 1; display: block; margin: 8px auto max(14px, env(safe-area-inset-bottom)); color: #b0aea8; font-size: 11px; }

/* ---- Card-Seite je Farbklasse: Hintergrund, Strahlen, Runen, Lichtsäule ---------------- */
.screen--card[class*="cls-"] {
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--rar) calc(14% + var(--lux) * 26%), #121214), #0a0a0b calc(62% + var(--lux) * 14%));
}
.screen--card[class*="cls-"] .loot-rays { opacity: calc(0.1 + var(--lux) * 0.55); animation-duration: calc(44s - var(--lux) * 30s); }
.screen--card[class*="cls-"] .loot-ground { opacity: calc(0.25 + var(--lux) * 0.7); }
.screen--card:is(.cls-3, .cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9) .loot-runes { opacity: calc(var(--lux) * 0.85); }
.screen--card:is(.cls-5, .cls-6, .cls-7, .cls-8, .cls-9) .loot-pillar { opacity: calc(var(--lux) * 0.9); }
.screen--card .cardback { border-color: var(--rar); box-shadow: 9px 11px 0 color-mix(in srgb, var(--rar) 45%, #000), 0 0 40px color-mix(in srgb, var(--rar) 40%, transparent); animation: none; }
.screen--card .cardback-pattern {
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--rar) 12%, transparent) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--rar) 12%, transparent) 0 2px, transparent 2px 14px);
}
.screen--card .cardback-q { color: var(--rar); text-shadow: 0 0 30px var(--rar); }
.screen--card .cardback-tap { background: var(--rar); }
.screen--card .qs, .screen--card .share-btn { border-color: color-mix(in srgb, var(--rar) 50%, rgba(255, 255, 255, 0.2)); }
.cls-9.screen--card .loot-rays { background: repeating-conic-gradient(from 0deg, #ffd6ec66 0 5deg, transparent 5deg 10deg, #9fd8ff66 10deg 15deg, transparent 15deg 20deg, #fff4c266 20deg 25deg, transparent 25deg 30deg); }
.cls-9.screen--card .cardback { border-color: #fff; box-shadow: 0 0 40px #ffd6ec, 0 0 80px #9fd8ff; }

/* ---- Startseite für Eingeloggte: weißer Grund, Akzente in der eigenen Farbklasse ------------ */
.screen--welcome { justify-content: flex-start; background: var(--bg); color: var(--ink); }
.screen--welcome > :where(:not(.fx-canvas, .sweep, .donate-aura)) { position: relative; z-index: 1; }
.screen--welcome .donate-aura {
  background:
    radial-gradient(60% 34% at 50% 34%, color-mix(in srgb, var(--rar) 30%, transparent), transparent 70%),
    radial-gradient(80% 30% at 50% 100%, color-mix(in srgb, var(--rar) 14%, transparent), transparent 70%);
}
.screen--welcome .sweep::before {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rar) 30%, transparent) 28%, color-mix(in srgb, var(--rar) 85%, transparent) 48%,
    rgba(255, 255, 255, 0.95) 52%, color-mix(in srgb, var(--rar) 45%, transparent) 62%, transparent);
}
.screen--welcome .sweep::after { background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--rar) 30%, transparent), transparent 60%); }
.screen--welcome .splash-logo { padding-top: max(48px, calc(env(safe-area-inset-top) + 28px)); }
.welcome-vault { height: 250px; margin-top: 10px; }
.welcome-vault .stage3d { inset: 0 8%; }
.screen--welcome .vault-rays { background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 55%, transparent) 0 4deg, transparent 4deg 15deg); }
.screen--welcome .vault-runes text { fill: color-mix(in srgb, var(--rar) 75%, #000); }
.screen--welcome .vault-ring { border-color: color-mix(in srgb, var(--rar) 80%, #000); }
.screen--welcome .welcome-hi { margin: 4px var(--gutter) 2px; color: var(--ink); }
.welcome-sub { margin: 0 0 16px; text-align: center; font-size: 12.5px; color: #6f6e69; }
.welcome-sub b { color: color-mix(in srgb, var(--rar) 75%, #000); }
.screen--welcome .btn { box-shadow: 7px 8px 0 var(--rar); }
:is(.cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9).screen--welcome .btn { box-shadow: 0 0 0 2px var(--rar), 0 10px 30px color-mix(in srgb, var(--rar) 55%, transparent); }
.screen--welcome .welcome-reset { color: #9a9993; }
.cls-9.screen--welcome .vault-ring { border-color: #c6b6ff; box-shadow: 0 0 24px #ffd6ec, inset 0 0 24px #9fd8ff; }
.cls-9.screen--welcome .welcome-sub b { background: linear-gradient(90deg, #e05fae, #4f8fe0, #c9a10e); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Card-Hintergrund: Samtglut + Prisma-Facetten, die mit der Neigung schimmern --------- */
.famecard-facets,
.famecard-holo,
.famecard-glint { position: absolute; inset: 0; pointer-events: none; }
.famecard-facets svg { display: block; width: 100%; height: 100%; }
.famecard-holo,
.famecard-glint {
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mix-blend-mode: screen;
}
/* Regenbogen wandert je nach Neigung über die Facetten */
.famecard-holo {
  background: linear-gradient(115deg, #ff6b6b, #ffb347, #fff275, #7dff9a, #6ad8ff, #8f8bff, #e78bff, #ff6b6b, #ffb347, #fff275);
  background-size: 260% 260%;
  background-position: calc(50% + var(--tx, 0) * 70%) calc(50% + var(--ty, 0) * 70%);
  opacity: var(--holo, 0.1);
}
/* Lichtband: helle Facetten, als würde Licht über den Schliff laufen */
.famecard-glint {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.75) 50%, transparent 62%);
  background-size: 300% 100%;
  background-position: calc(50% - var(--tx, 0) * 110%) 0;
  opacity: calc(0.16 + var(--holo, 0.1) * 0.6);
}
/* weicher Schatten hinter Name und Spruch, damit die Schrift in jeder Klasse ruhig bleibt */
.famecard-foot::before,
.famecard-plate::before {
  content: "";
  position: absolute;
  left: -18%;
  right: -18%;
  top: -22px;
  bottom: -18px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(11, 10, 13, 0.9), rgba(11, 10, 13, 0.6) 62%, transparent);
  pointer-events: none;
}
/* auch der Fuß (Instagram, Siegel) bekommt einen leichten Schatten */
.famecard-foot { position: relative; z-index: 3; }
.famecard-foot::before { left: -10%; right: -10%; top: -10px; bottom: -12px; background: linear-gradient(transparent, rgba(11, 10, 13, 0.7) 45%); border-radius: 0; }

/* ---- Profilbild-Rahmen ---------------------------------------------------------------- */
.avatar-hint { margin: 0 0 12px; font-size: 12.5px; line-height: 1.4; color: #b9b7b0; text-align: center; }
.avatar-preview { display: flex; justify-content: center; margin: 0 0 14px; }
.avatar-preview canvas { width: 210px; height: 210px; border-radius: 50%; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8); touch-action: none; }
.avatar-preview canvas.is-movable { cursor: grab; }
.avatar-preview canvas.is-movable:active { cursor: grabbing; }
.avatar-zoom { display: flex; align-items: center; gap: 10px; max-width: 300px; margin: -4px auto 4px; color: #d8d6d0; font-weight: 800; }
.avatar-zoom input { flex: 1; accent-color: var(--green); }
.avatar-zoom .link { font-size: 11px; color: #b9b7b0; font-weight: 500; }
.avatar-tip { margin: 0 0 12px; font-size: 11px; color: #8b8a85; text-align: center; }
.share-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Erinnerung an den neuen Profilbild-Rahmen nach einem Klassenaufstieg */
.frame-nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--rar);
  border-radius: 14px;
  background: color-mix(in srgb, var(--rar) 14%, rgba(10, 10, 11, 0.85));
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 24px color-mix(in srgb, var(--rar) 35%, transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
}
.frame-nudge.is-in { opacity: 1; transform: none; }
.frame-nudge-ring {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 5px solid var(--rar);
  background: radial-gradient(circle at 50% 38%, #cfd8e3 0 28%, #2f3a4a 30% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 10px color-mix(in srgb, var(--rar) 60%, transparent);
}
.cls-9 .frame-nudge-ring { border-color: transparent; background: radial-gradient(circle at 50% 38%, #cfd8e3 0 28%, #2f3a4a 30% 100%) padding-box, conic-gradient(#ff9ad5, #9fd0ff, #fff3a8, #b6ffd9, #c6b6ff, #ff9ad5) border-box; }
.frame-nudge-text { flex: 1; font-size: 12px; line-height: 1.35; color: #d8d6d0; }
.frame-nudge-text b { display: block; font-size: 13.5px; color: #fff; }
.frame-nudge-go { font-weight: 800; color: var(--rar); animation: nudge 1.4s ease-in-out infinite; }

/* ---- Code prüfen: Kasten auf der Startseite und Prüfseite --------------------------------- */
.check-teaser {
  position: relative;
  z-index: 1;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 2 * var(--gutter));
  max-width: 340px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border: 2px solid var(--dark);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--green);
  animation: rise 0.6s ease 1.4s both;
}
.check-teaser .seal { flex: 0 0 auto; animation: seal-turn 6s linear infinite; }
.check-teaser-text { flex: 1; font-size: 12px; line-height: 1.35; color: #4a4a4f; }
.check-teaser-text b { display: block; font-size: 15px; color: var(--ink); }
.check-teaser-go { font-weight: 800; font-size: 18px; animation: nudge 1.4s ease-in-out 2s infinite; }
.check-teaser:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }

.screen--check { padding-bottom: 28px; }
.check-head { padding: max(70px, calc(env(safe-area-inset-top) + 50px)) var(--gutter) 6px; text-align: center; }
.check-seal { width: 64px; height: 64px; font-size: 10px; margin: 0 auto 12px; }
.check-title { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 36px; font-weight: 700; }
.check-sub { margin: 8px auto 0; max-width: 330px; font-size: 13px; line-height: 1.45; color: #b9b7b0; }
.check-form { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px var(--gutter) 0; }
.check-field { width: 100%; max-width: 330px; }
.check-field input {
  width: 100%;
  height: 58px;
  border: 2px solid var(--green);
  background: #fff;
  color: var(--ink);
  font: 800 21px "Source Code Pro", ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 var(--green);
  outline: none;
}
.check-field input::placeholder { color: #b8b8bd; font-weight: 600; }
.check-field input:focus { box-shadow: 5px 5px 0 var(--pink), 0 0 0 4px rgba(255, 47, 214, 0.2); }
.check-sample { color: #b9b7b0; font-size: 12px; }

.check-result { margin: 18px var(--gutter) 0; }
.check-result:empty { display: none; }
.check-result {
  --c: #3dfa74;
  position: relative;
  padding: 18px 18px 14px;
  border: 1.5px solid var(--c);
  border-radius: 16px;
  background: color-mix(in srgb, var(--c) 9%, #0e0e10);
  box-shadow: 0 0 30px color-mix(in srgb, var(--c) 25%, transparent);
  animation: rise 0.4s ease both;
}
.check-result.is-invalid { --c: #ff5a5f; }
.check-result.is-valid .check-badge { background: #3dfa74; box-shadow: 0 0 14px #3dfa74; }
.check-result.is-unknown { --c: #ffb020; }
.check-result h2 { margin: 0 0 8px; padding-right: 44px; font-size: 17px; font-weight: 800; color: #fff; }
.check-result p { margin: 0; font-size: 13px; line-height: 1.5; color: #d6d4cd; }
.check-result p b { font-family: "Source Code Pro", monospace; color: #fff; }
.check-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c);
  color: #0b0b0c;
  font-weight: 900;
  box-shadow: 0 0 14px var(--c);
  font-size: 18px;
}
.check-facts { margin: 6px 0 0; display: grid; gap: 8px; }
.check-facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.check-facts div:last-child { border-bottom: 0; }
.check-facts dt { font-size: 12px; color: #9a9893; }
.check-facts dd { margin: 0; text-align: right; font-size: 13.5px; font-weight: 700; color: #fff; }
.check-facts dd small { font-weight: 500; color: #9a9893; margin-left: 4px; }
.check-facts .mono { font-family: "Source Code Pro", monospace; letter-spacing: 0.04em; }
.check-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--c); vertical-align: 0; box-shadow: 0 0 8px var(--c); }
.check-note { margin: 18px var(--gutter) 0; font-size: 11px; line-height: 1.45; color: #77767a; text-align: center; }

/* ---- Zeig mir mehr: Story-Slides ---------------------------------------------------------- */
.screen--slides { overflow: hidden; user-select: none; -webkit-user-select: none; cursor: pointer; transition: background 0.5s; }
.st-rays {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 180%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 30%, transparent) 0 4deg, transparent 4deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 50%);
  mask-image: radial-gradient(circle, #000 5%, transparent 50%);
  opacity: 0.6;
  pointer-events: none;
  animation: rays-spin 60s linear infinite;
  transition: background 0.5s;
}
.st-bars { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 3; display: flex; gap: 4px; }
.st-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.st-bars i b { display: block; height: 100%; width: 0; background: #fff; transition: width 0.35s ease; }
.st-bars i.is-done b { width: 100%; }
.st-top { position: absolute; top: max(26px, calc(env(safe-area-inset-top) + 14px)); left: 16px; right: 10px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.st-logo { font-size: 17px; font-weight: 800; color: #fff; text-shadow: 2px 2px 0 var(--green); }
.st-num { margin-left: auto; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.st-close { width: 36px; height: 36px; border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.st-stack { position: relative; flex: 1; z-index: 2; }
.st-slide {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 26%;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.st-slide.is-on { opacity: 1; transform: none; }
.st-tag { display: inline-block; margin-bottom: 12px; font-family: Inter, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); }
.st-h { margin: 0 0 18px; font-size: clamp(32px, 10vw, 42px); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
.st-h .g { color: var(--green); }
.st-p { margin: 0; font-size: 15px; line-height: 1.55; color: #e2e0da; }
.st-foot { position: relative; z-index: 3; padding: 0 var(--gutter) max(26px, env(safe-area-inset-bottom)); display: flex; justify-content: center; min-height: 72px; align-items: flex-end; }
.st-tap { font-family: Inter, sans-serif; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.55); animation: nudge 1.4s ease-in-out infinite; }
.st-cta { animation: rise 0.5s ease both; }
.st-ladder { display: flex; align-items: flex-end; justify-content: center; gap: 2px; margin-top: 50px; }
.st-ladder svg { filter: drop-shadow(0 0 5px var(--c)); }
.st-cardback {
  position: relative;
  width: 132px;
  height: 172px;
  margin: 34px auto 0;
  border: 2px solid var(--c);
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 40%, #1c1d1f, #0b0b0d 75%);
  transform: rotate(-6deg);
  box-shadow: 7px 8px 0 color-mix(in srgb, var(--c) 45%, #000), 0 0 34px color-mix(in srgb, var(--c) 45%, transparent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.st-cardback::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 14%, transparent) 0 2px, transparent 2px 10px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 14%, transparent) 0 2px, transparent 2px 10px);
}
.st-cardback > * { position: relative; }
.st-cardback b { font-size: 16px; font-weight: 800; color: #fff; text-shadow: 1px 1px 0 var(--green); }
.st-cardback .st-cardback-dia { width: 60px; height: 50px; color: #fff; filter: drop-shadow(0 0 8px var(--c)); }
.st-cardback .dia-line { stroke-width: 1.8; }
.st-cardback-q { position: relative; display: grid; place-items: center; }
.st-cardback-q i { position: absolute; top: 4px; font-size: 34px; font-weight: 800; font-style: normal; color: var(--c); text-shadow: 0 0 14px var(--c), 0 0 2px #000; line-height: 1; }
.st-cardback small { margin-top: 10px; padding: 2px 6px; background: var(--c); color: #0b0b0c; font-size: 8px; font-weight: 800; }

/* letzte Story-Slide: #Real_story, BRO */
.st-slide[data-slide="6"] { top: 20%; }
.st-slide[data-slide="6"] .st-h { color: var(--green); }
.st-quote { margin: 0; text-align: center; }
.st-quote p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; }
.st-old { color: #b9b7b0; }
.st-old b { color: #fff; }
.st-new { color: #fff; font-weight: 700; font-size: 15px !important; }
.st-new .o { color: #ff8a1f; }
.st-divider { display: block; width: 70%; height: 1px; margin: 16px auto; background: linear-gradient(90deg, transparent, #ff8a1f, transparent); }
.st-quote .hl { font-size: inherit; }

/* Story: Marker im Fließtext, großes „Fake?“, Preisspanne ohne Umbruch */
.st-p .hl { padding: 0.02em 0.25em; box-shadow: none; }
.st-big { display: inline-block; margin-bottom: 0.18em; font-size: 1.4em; line-height: 1; }
.nowrap { white-space: nowrap; }

/* Startseite: „Code prüfen“ kleiner, mittig zwischen „Neu hier?“ und „Login“ */
.screen--splash .check-teaser { max-width: 250px; margin: 0 auto; padding: 7px 10px; gap: 9px; box-shadow: 4px 4px 0 var(--green); }
.screen--splash .check-teaser .seal { width: 30px; height: 30px; font-size: 5.2px; }
.screen--splash .check-teaser-text { font-size: 10.5px; }
.screen--splash .check-teaser-text b { font-size: 13px; }
.screen--splash .check-teaser-go { font-size: 15px; }

/* Übersicht nach dem Login: drei Kacheln unter dem Hauptknopf */
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: calc(100% - 2 * var(--gutter)); max-width: 380px; margin: 2px auto 0; }
.hub-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px 10px; text-align: center; text-decoration: none; color: var(--ink);
  background: #fff; border: 2px solid var(--dark);
  box-shadow: 4px 4px 0 var(--rar);
  animation: rise 0.5s ease both;
}
.hub-tile:nth-child(2) { animation-delay: 0.08s; }
.hub-tile:nth-child(3) { animation-delay: 0.16s; }
.hub-tile:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--rar); }
.hub-tile b { font-size: 12.5px; }
.hub-tile small { font-size: 9.5px; line-height: 1.3; color: #6f6e69; }
.hub-ico { display: grid; place-items: center; height: 32px; }
.hub-ico .ico { width: 26px; height: 26px; stroke: color-mix(in srgb, var(--rar) 70%, #000); }
.hub-ico .seal { width: 30px; height: 30px; font-size: 5.2px; }
.screen--welcome .splash-login { padding-bottom: 16px; }

/* Bedingungen (Platzhalter) */
.screen--terms { padding: max(104px, calc(env(safe-area-inset-top) + 84px)) var(--gutter) 30px; }
.terms-title { margin: 0 0 14px; font-size: 30px; font-weight: 800; }
.terms-text { margin: 0; font-size: 14px; line-height: 1.6; color: #d8d6d0; }

/* ---- Card: Lichtsäule wie beim Loot-Fund (Diablo) und horizontaler Lichtstreif beim Aufdecken ----
   Die Säule steht hinter der Card und wird mit jeder Klasse heller und breiter. */
.loot-beam {
  position: absolute; left: 50%; top: -5%; bottom: 12%;
  width: calc(70px + var(--lux, 0) * 90px);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rar) 55%, transparent) 30%,
    color-mix(in srgb, var(--rar) 35%, #fff) 50%, color-mix(in srgb, var(--rar) 55%, transparent) 70%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 88%, transparent);
  mask-image: linear-gradient(transparent, #000 20%, #000 88%, transparent);
  filter: blur(6px);
  opacity: 0;
  mix-blend-mode: screen;
}
/* heller Kern in der Mitte der Säule */
.loot-beam i {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 14%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #fff, transparent);
  filter: blur(2px);
}
.screen--card.is-open .loot-beam { opacity: calc(0.22 + var(--lux, 0) * 0.6); animation: beam-pulse 2.6s ease-in-out infinite; }
.screen--card.is-revealing .loot-beam { animation: beam-drop 1.6s cubic-bezier(.2, .8, .2, 1) both, beam-pulse 2.6s ease-in-out 1.6s infinite; }
@keyframes beam-drop {
  0% { transform: translateX(-50%) scaleY(0) scaleX(0.3); opacity: 0; }
  18% { transform: translateX(-50%) scaleY(1.05) scaleX(1.6); opacity: 1; }
  100% { transform: translateX(-50%) scaleY(1) scaleX(1); opacity: calc(0.22 + var(--lux, 0) * 0.6); }
}
.reveal-streak {
  position: absolute; left: -10%; right: -10%; top: 44%;
  height: calc(14px + var(--lux, 0) * 22px);
  z-index: 7; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rar) 80%, transparent) 20%, #fff 50%,
    color-mix(in srgb, var(--rar) 80%, transparent) 80%, transparent);
  filter: blur(3px);
  box-shadow: 0 0 60px 20px color-mix(in srgb, var(--rar) 70%, transparent), 0 0 16px 4px #fff;
  opacity: 0;
  transform: scaleX(0);
}
.screen--card.is-revealing .reveal-streak { animation: streak 2.2s ease-out forwards; }
@keyframes streak {
  0% { opacity: 0; transform: scaleX(0) scaleY(1); }
  12% { opacity: 1; transform: scaleX(1.1) scaleY(2.2); }
  55% { opacity: 0.9; transform: scaleX(1) scaleY(1); }
  100% { opacity: 0; transform: scaleX(1.2) scaleY(0.2); }
}
/* Strahlen und Licht allgemein kräftiger, je höher die Klasse */
.screen--card[class*="cls-"] .loot-rays { opacity: calc(0.2 + var(--lux) * 0.65); }
.screen--card[class*="cls-"] .loot-ground { opacity: calc(0.4 + var(--lux) * 0.6); }
.screen--card.is-revealing .loot-rays { animation: rays-spin calc(44s - var(--lux) * 30s) linear infinite, rays-boom 1.8s ease-out both; }
@keyframes rays-boom { 0% { filter: brightness(3); } 100% { filter: brightness(1); } }

/* ---- Anmeldung: Accounts wählen (Instagram, TikTok, Snapchat), einer davon auf die Card ---- */
.accounts { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.accounts legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.accounts legend small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #6f6e69; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.acc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.acc-chip .ico { width: 17px; height: 17px; }
.acc-chip.is-on { background: var(--dark); color: var(--green); box-shadow: 3px 3px 0 var(--green); }
.acc-row { display: grid; grid-template-columns: 40px 1fr; gap: 0; margin-bottom: 8px; }
.acc-row[hidden] { display: none; }
.acc-ico { display: grid; place-items: center; height: 46px; border: 2px solid var(--ink); border-right: 0; background: var(--dark); color: var(--green); }
.acc-ico .ico { width: 20px; height: 20px; }
.acc-row input[name^="acc-"] { height: 46px; min-width: 0; padding: 0 12px; border: 2px solid var(--ink); border-radius: 0; background: #fff; font: inherit; font-size: 15px; outline: none; }
.acc-row input[name^="acc-"]:focus { box-shadow: 4px 4px 0 var(--green); }
/* „Auf die Card“ nur zeigen, wenn mehrere Accounts gewählt sind */
.acc-main { display: none; grid-column: 2; align-items: center; gap: 6px; margin-top: 5px; font-size: 11.5px; color: #6f6e69; cursor: pointer; }
.has-multi .acc-main { display: flex; }
.acc-main input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.acc-main input:checked + span { color: var(--ink); font-weight: 700; }
.acc-note { margin: 2px 0 0; font-size: 11px; color: #6f6e69; }

/* Teilen: Name auf dem Bild umschalten, Snapchat-Knöpfe */
.acc-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -4px 0 12px; }
.acc-switch .acc-chip { height: 32px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 12px; }
.acc-switch .acc-chip.is-on { background: #fff; color: #0b0b0c; box-shadow: none; }
.quick-share { grid-template-columns: repeat(4, 1fr); max-width: 380px; gap: 8px; }
.qs--sc, .share-btn--sc { border: 0; background: #fffc00; color: #0b0b0c; }

/* Übersicht: Abmelden ganz unten */
.screen--welcome .welcome-logout { margin: auto auto max(18px, env(safe-area-inset-bottom)); padding-top: 22px; }
.screen--welcome .welcome-reset { margin-bottom: 0; }
.screen--welcome .btn { animation-delay: 0.3s; }

/* Card-Seite: Knopf oben rechts zur Startseite (Übersicht) */
.home-btn {
  position: absolute; top: max(36px, env(safe-area-inset-top)); right: 14px; z-index: 5;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--rar) 60%, transparent); border-radius: 6px;
  background: rgba(20, 20, 20, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; cursor: pointer;
}
.home-btn .ico { width: 22px; height: 22px; }
.home-btn:active { transform: scale(0.94); }

/* Card: mehrere Accounts klein übereinander */
.famecard-accts { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.famecard-accts .famecard-insta { margin: 0; }
.famecard-accts.is-multi .famecard-insta { font-size: 10px; gap: 5px; }
.famecard-accts.is-multi .ico { width: 13px; height: 13px; }

/* Bildansicht zum Speichern: Bild gedrückt halten → in Fotos sichern, dazu die Schritte je Plattform */
.imgview {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center;
  padding: max(54px, calc(env(safe-area-inset-top) + 34px)) var(--gutter) max(20px, env(safe-area-inset-bottom));
  background: rgba(8, 8, 10, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; overflow-y: auto;
  opacity: 0; transition: opacity 0.25s;
}
.imgview.is-open { opacity: 1; }
.imgview-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.imgview-title { margin: 0 0 12px; font-size: 18px; font-weight: 800; text-align: center; }
.imgview-pic { flex: 0 1 auto; display: flex; justify-content: center; min-height: 0; }
.imgview-pic img {
  display: block; max-width: 100%; max-height: 48vh; border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
  -webkit-touch-callout: default; user-select: auto;
}
.imgview-steps { width: 100%; max-width: 360px; margin: 16px 0 14px; padding: 0 0 0 22px; font-size: 13px; line-height: 1.5; color: #d8d6d0; }
.imgview-steps li { margin-bottom: 6px; }
.imgview-steps li::marker { color: var(--rar, var(--green)); font-weight: 800; }
.imgview-steps b { color: #fff; }
.imgview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 360px; }
.imgview-actions .share-btn { text-decoration: none; }
.imgview-actions .share-btn[hidden] { display: none; }
.imgview-actions:has([data-imgshare][hidden]) { grid-template-columns: 1fr; }

/* Accounts verbinden (Snapchat, TikTok) */
.acc-connect { grid-column: 2; display: flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 0; }
.acc-link {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 0; border-radius: 99px; background: var(--dark); color: #fff;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.acc-link .ico { width: 15px; height: 15px; }
.acc-link[data-connectbtn="sc"] { background: #fffc00; color: #0b0b0c; }
.acc-link[data-connectbtn="tt"] { background: #000; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; }
.acc-link[hidden] { display: none; }
.acc-ok { font-size: 12px; font-weight: 700; color: #1a9d4a; }
.acc-row input[readonly] { background: #f2fbf5; border-color: #1a9d4a; }
.verified {
  display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 4px; border-radius: 50%;
  background: #3dfa74; color: #0b0b0c; font-size: 9px; font-style: normal; font-weight: 800; line-height: 1; vertical-align: middle;
}
.acc-link[data-connectbtn="ig"] { background: linear-gradient(135deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5); }
.acc-hint { font-size: 10.5px; color: #6f6e69; }
.acc-connect { flex-wrap: wrap; } .acc-link { white-space: nowrap; }

/* Card-Seite: Ton an/aus links neben dem Haus-Knopf */
.sound-btn {
  position: absolute; top: max(36px, env(safe-area-inset-top)); right: 66px; z-index: 5;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--rar) 60%, transparent); border-radius: 6px;
  background: rgba(20, 20, 20, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; cursor: pointer;
}
.sound-btn .ico { width: 22px; height: 22px; }
.sound-btn .snd-off { display: none; }
.sound-btn.is-muted .snd-on { display: none; }
.sound-btn.is-muted .snd-off { display: inline; }
.sound-btn.is-muted { opacity: 0.7; }
.app-version { display: block; position: relative; z-index: 1; margin: 4px auto max(10px, env(safe-area-inset-bottom)); text-align: center; font-size: 10px; color: #b0aea8; }

/* ---- Login, Registrieren, Accounts verbinden ---------------------------------------------- */
.auth-form { padding-bottom: 44px; }
.auth-form .screen-foot { margin-top: 10px; }
.auth-form .sub b { font-weight: 800; }
.sso { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 54px; margin-bottom: 12px; border: 3px solid var(--ink); font: 700 16px -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; letter-spacing: 0; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.sso .ico { width: 20px; height: 20px; }
.sso--apple { background: #000; color: #fff; box-shadow: 5px 5px 0 var(--green); }
.sso--google { background: #fff; color: #1f1f1f; box-shadow: 5px 5px 0 #d9d7d0; }
.sso:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--green); }
.sso.is-busy { opacity: 0.6; pointer-events: none; }
.ico--fill { fill: currentColor; stroke: none; }
.ico--color { stroke: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: #d9d7d0; }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; }
.pw-eye.is-on { color: var(--ink); }
.field small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -2px 0 16px; font-size: 13px; }
.hint { margin: -8px 0 14px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.note { margin: 4px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.sec { margin: 22px 0 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.sec small { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; line-height: 1.45; text-transform: none; letter-spacing: 0; color: var(--muted); }
.terms-check { margin: 4px 0 8px; }
.form-error { margin: 8px 0 0; padding: 10px 12px; border: 2px solid var(--pink); background: #fff0fb; font-size: 12.5px; line-height: 1.45; }
.btn--ghost { background: #fff; color: var(--ink); border: 3px solid var(--ink); }
.btn.is-busy, .link.is-busy { opacity: 0.6; pointer-events: none; }
.signed { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 3px solid var(--ink); background: #fff; font-weight: 800; font-size: 14px; }
.signed .ico { width: 20px; height: 20px; }
.signed small { margin-left: auto; font-weight: 600; font-size: 11px; color: #138a3a; }
.signed + .hint { margin: 8px 0 0; }

/* Plattform-Zeilen */
.pf { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px 10px 14px; margin-bottom: 10px; border: 3px solid var(--ink); background: #fff; color: var(--ink); text-align: left; transition: box-shadow 0.15s; }
.pf.is-on { box-shadow: 5px 5px 0 var(--green); }
.pf.is-focus:not(.is-on) { box-shadow: 0 0 0 4px var(--pink); }
.pf-ic { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; }
.pf-ic .ico { width: 24px; height: 24px; }
.pf-nm { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; }
.pf-nm small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.pf-go { flex: 0 0 auto; padding: 8px 12px; border: 2px solid var(--ink); background: var(--green); color: var(--ink); font: 800 12.5px var(--mono); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.pf-go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pf-ok { flex: 0 0 auto; font-weight: 800; font-size: 12.5px; color: #138a3a; white-space: nowrap; }
.pf-change { flex: 0 0 auto; padding: 4px 2px; border: 0; background: none; color: var(--muted); font: 600 11px var(--mono); text-decoration: underline; cursor: pointer; }
.pf-manual { display: flex; gap: 8px; margin: -4px 0 12px; }
.pf-manual input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 3px solid var(--ink); background: #fff; font: 600 15px var(--mono); }
.pf-manual button { padding: 0 16px; border: 3px solid var(--ink); background: var(--ink); color: var(--green); font: 800 14px var(--mono); cursor: pointer; }
.pf-card { margin: -2px 0 12px 4px; font-size: 12px; font-weight: 700; }
.pf[data-pick] { cursor: pointer; }
.pf[data-pick]:not(.is-picked) { box-shadow: none; }
.pf.is-picked { box-shadow: 5px 5px 0 var(--green); outline: 3px solid var(--green); outline-offset: -6px; }
.pf[data-pick] .pf-ok { color: var(--muted); }
.pf.is-picked .pf-ok { color: #138a3a; }

/* Startseite: Accounts verbinden */
.connect-cta { display: flex; align-items: center; gap: 12px; width: calc(100% - 2 * var(--gutter)); max-width: 380px; margin: 14px auto 0; padding: 14px; border: 3px solid var(--ink); background: #fff; color: var(--ink); text-decoration: none; box-shadow: 5px 5px 0 var(--rar); }
.connect-cta:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--rar); }
.cc-ics { display: flex; gap: 4px; flex: 0 0 auto; }
.cc-ics span { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink); background: #f3f3f0; opacity: 0.55; }
.cc-ics span.is-on { background: var(--rar); opacity: 1; }
.cc-ics .ico { width: 17px; height: 17px; }
.cc-txt { flex: 1; min-width: 0; }
.cc-txt b { display: block; font-size: 15px; }
.cc-txt small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: #55555a; }
.cc-pill { display: inline-block; margin-top: 6px; padding: 1px 6px; border: 2px solid var(--ink); background: var(--rar); font-size: 11px; font-weight: 800; }
.cc-go { flex: 0 0 auto; font-weight: 800; font-size: 18px; }

/* Fenster von unten (Card: erst verbinden; Ranking: mitmachen) */
.msheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.msheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.25s; }
.msheet-pnl { position: relative; width: 100%; max-width: 520px; max-height: 92%; overflow-y: auto; padding: 14px 22px calc(26px + env(safe-area-inset-bottom)); background: var(--bg); color: var(--ink); border-top: 4px solid var(--ink); font-family: var(--mono); text-align: left; transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.msheet.is-open .msheet-bg { opacity: 1; }
.msheet.is-open .msheet-pnl { transform: none; }
.msheet-grip { width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: #bbb; }
.msheet-big { width: 64px; height: 64px; margin: 4px auto 12px; display: grid; place-items: center; border: 3px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--green); }
.msheet-big .ico { width: 34px; height: 34px; }
.msheet h3 { margin: 0 0 8px; font-size: 18px; text-transform: uppercase; }
.msheet [data-needlink] h3, .msheet-big + h3, .msheet-big ~ p { text-align: center; }
.msheet p { margin: 0 0 18px; font-size: 13px; line-height: 1.55; }
.msheet .btn { width: 100%; background: var(--dark); color: var(--bg); border: 0; box-shadow: 7px 8px 0 var(--green); }
.msheet .btn:disabled { opacity: 0.35; box-shadow: 7px 8px 0 #9a9a9a; }
.msheet .btn span { color: inherit; }
.msheet .link { display: block; margin: 14px auto 0; }
.msheet .field-row { margin-top: 4px; }
.msheet .sec { margin-top: 14px; }
.msheet-lead { margin-bottom: 14px !important; }
.msheet-once { margin: 12px 0 0 !important; text-align: center; font-size: 11.5px !important; color: var(--muted); }
.req { display: flex; gap: 8px; align-items: center; margin: 6px 0 18px; padding: 10px 12px; border: 2px dashed var(--pink); background: #fff0fb; font-size: 12px; line-height: 1.45; }
.req.is-ok { border-color: #138a3a; background: #eafff0; }
.req .plat { background: transparent; }

/* Plattform-Symbol vor dem Namen (Ranking) */
.plat { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; vertical-align: -4px; border-radius: 6px; background: #fff; color: #111; }
.plat .ico { width: 14px; height: 14px; }
.pname .plat { width: 18px; height: 18px; margin-right: 4px; vertical-align: -3px; }
.rank-gear { position: absolute; top: max(40px, env(safe-area-inset-top)); right: var(--gutter); z-index: 5; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer; }
.rank-gear .ico { width: 20px; height: 20px; }
.rank-gear ~ .rank-tabs { margin-right: calc(var(--gutter) + 52px); }
.toast { z-index: 200; }

/* Code prüfen: Stufe · Edelstein, darunter die Preisspanne */
.check-result .gemline { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.check-result .gemline small { margin-right: 6px; }
.gemline-price { font-size: 13px; font-weight: 800; color: #3dfa74; letter-spacing: 0.02em; white-space: nowrap; }

/* Startseite (eingeloggt): scrollbar, damit „Abmelden“ unten immer erreichbar ist */
.screen--splash.screen--welcome { overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen--welcome > * { flex-shrink: 0; }
.screen--welcome .welcome-logout { margin-bottom: max(24px, env(safe-area-inset-bottom)); }

/* Snapchat: nach dem Verbinden einmal nach dem @Benutzernamen fragen */
.sc-ask { margin: -2px 0 14px; padding: 14px; border: 3px solid var(--ink); background: #fffbe0; box-shadow: 5px 5px 0 #fffc00; }
.sc-ask b { display: block; margin-bottom: 4px; font-size: 14px; }
.sc-ask p { margin: 0 0 10px; font-size: 11.5px; line-height: 1.45; color: #55555a; }
.sc-ask-row { display: flex; gap: 8px; }
.sc-ask-row input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 3px solid var(--ink); background: #fff; font: 600 15px var(--mono); }
.sc-ask-row button { padding: 0 16px; border: 3px solid var(--ink); background: var(--ink); color: var(--green); font: 800 14px var(--mono); cursor: pointer; }

/* Startseite: farbige Kachel-Symbole, goldener Pokal mit Glanz */
.hub-ico { height: 46px; }
.hub-svg { width: 44px; height: 44px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.hub-trophy { filter: drop-shadow(0 0 6px rgba(255, 200, 40, 0.7)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); animation: trophy-glow 3.2s ease-in-out infinite; }
.hub-shine { animation: trophy-shine 3.2s ease-in-out infinite; }
@keyframes trophy-shine { 0%, 55% { transform: translateX(0) skewX(-20deg); } 85%, 100% { transform: translateX(80px) skewX(-20deg); } }
@keyframes trophy-glow { 0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 200, 40, 0.55)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); } 70% { filter: drop-shadow(0 0 11px rgba(255, 210, 60, 0.95)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); } }
@media (prefers-reduced-motion: reduce) { .hub-trophy, .hub-shine { animation: none; } }
.hub-ico .seal { width: 42px; height: 42px; font-size: 7px; margin-top: 4px; }

/* Sprache umschalten (nur Startseite abgemeldet, Login, Registrieren) */
.lang-switch { position: absolute; top: max(18px, env(safe-area-inset-top)); right: 16px; z-index: 6; display: flex; align-items: stretch; border: 2px solid var(--ink); background: #fff; box-shadow: 3px 3px 0 var(--green); font: 800 12px var(--mono); }
.lang-switch .lang-globe { display: grid; place-items: center; padding: 0 7px; }
.lang-switch button { border: 0; padding: 6px 9px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.lang-switch button.is-on { background: var(--ink); color: #fff; }
.screen--login .lang-switch { top: max(36px, env(safe-area-inset-top)); }
.amount-field--pre .amount-cur { margin-right: 2px; }

/* ---- Startseite in den obersten Klassen: Schwarz & Gold mit Glas-Kacheln ------------------------
   lux--gold (Klasse Gold, ab 500.000): mattes Glas, mattes Gold, Logo in Gold
   lux--holo (Diamant-Holo, ab 1 Mio.): Glas mit Diamant-Facetten, Funkeln, poliertes Gold, Logo in Holo */
.lux {
  --gold: linear-gradient(135deg, #7a5a1e 0%, #f6e7b0 22%, #c9a24a 40%, #fff4cf 55%, #a8822f 75%, #f3dc96 100%);
  --gold-matt: linear-gradient(180deg, #d8b664, #b08a3a);
  --holo: linear-gradient(90deg, #ff9ad5, #9fd0ff, #fff3a8, #b6ffd9, #c6b6ff, #ff9ad5);
  background: radial-gradient(ellipse at 50% 30%, #2a2316 0%, #0b0a08 55%, #050505 100%) !important;
  color: #f3e6c4;
}
.lux.lux--gold { background: radial-gradient(ellipse at 50% 30%, #2b2210 0%, #120f0a 60%, #0b0a08 100%) !important; }
/* warmes Goldlicht hinter dem Glas */
.lux::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: 52%; height: 520px; z-index: 0; pointer-events: none; filter: blur(10px);
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent);
  background: radial-gradient(circle at 25% 35%, rgba(230, 180, 70, 0.55), transparent 38%), radial-gradient(circle at 78% 55%, rgba(255, 215, 130, 0.35), transparent 40%), radial-gradient(circle at 50% 85%, rgba(160, 110, 30, 0.45), transparent 45%);
}
.lux--gold::before { opacity: 0.45; }
.lux .sweep, .lux .donate-aura { opacity: 0.35; }
.lux .vault-ring { border-color: #c9a24a !important; box-shadow: 0 0 30px rgba(230, 190, 90, 0.45) !important; }
.lux--gold .vault-ring { border-color: rgba(201, 162, 74, 0.6) !important; box-shadow: none !important; }
.lux .vault-runes text { fill: #c9a24a !important; }
.lux--gold .vault-rays { opacity: 0.45; }

/* Logo: Gold bzw. Holo statt Grün */
.lux .logo-tag { color: #d9c79a; }
.lux .logo-word { color: transparent; -webkit-text-fill-color: transparent; background-image: var(--gold); -webkit-background-clip: text; background-clip: text; text-shadow: none !important; animation: none !important; }
.lux .logo-row { filter: drop-shadow(3px 5px 0 rgba(122, 90, 30, 0.85)) drop-shadow(0 0 16px rgba(230, 190, 90, 0.35)); }
.lux--holo .logo-row { filter: drop-shadow(3px 5px 0 rgba(120, 90, 160, 0.7)) drop-shadow(0 0 14px rgba(198, 182, 255, 0.45)); }
.lux--holo .logo-word { background-image: var(--holo); background-size: 200% 100%; animation: holo-flow 6s linear infinite !important; }
.lux .logo-word::after { background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 48%, rgba(255, 240, 200, 0.7) 53%, transparent 62%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; }
.lux .logo-dia { filter: sepia(1) saturate(2.6) hue-rotate(-8deg) brightness(1.05) drop-shadow(0 0 10px rgba(230, 190, 90, 0.5)); }
@keyframes holo-flow { to { background-position: 200% 0; } }
/* Diamant-Holo: Logo-Diamant aus klarem Glas mit Regenbogen-Feuer */
.lux--holo .logo-dia { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55)) drop-shadow(0 0 18px rgba(198, 182, 255, 0.35)); }
.lux--holo .logo-dia linearGradient[id$="a"] stop:nth-child(2) { stop-color: #ffd6f0; }
.lux--holo .logo-dia linearGradient[id$="b"] stop:nth-child(2) { stop-color: #e4f3ff; }
.lux--holo .logo-dia linearGradient[id$="b"] stop:nth-child(3) { stop-color: #a9c8ff; }
.lux--holo .logo-dia linearGradient[id$="c"] stop:nth-child(1) { stop-color: #c7b8ff; }
.lux--holo .logo-dia linearGradient[id$="c"] stop:nth-child(2) { stop-color: #fff6c8; }
.lux--holo .logo-dia .glass-line { stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.2; }
.lux--holo .logo-dia .glass-shadow { fill: rgba(160, 140, 220, 0.35); }
.glass-fire { display: none; }
.lux--holo .logo-dia .glass-fire { display: inline; fill-opacity: 0.45; }

/* Texte */
.lux .welcome-hi { color: #f6ecd0 !important; }
.lux--holo .welcome-hi { font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; letter-spacing: 0.02em; }
.lux .welcome-sub { color: #b9a679 !important; }
.lux--gold .welcome-sub b { color: #e6c46a; }
.lux .welcome-reset, .lux .welcome-logout, .lux .app-version { color: #8a7b5c !important; text-decoration-color: #c9a24a !important; }

/* Hauptknopf: poliertes bzw. mattes Gold */
.lux .btn { background: var(--gold) !important; color: #1a1408 !important; box-shadow: 0 0 0 1px #f6e7b0, 0 10px 30px rgba(230, 180, 70, 0.45) !important; }
.lux--gold .btn { background: var(--gold-matt) !important; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45) !important; }
.lux .btn span { color: #1a1408 !important; font-weight: 800; }

/* Kacheln und „Accounts verbinden“ wie Glas */
.lux .hub-tile, .lux .connect-cta {
  position: relative; overflow: hidden; border-radius: 22px; color: #f3e6c4;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 45%, rgba(255, 240, 200, 0.07));
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 240, 200, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.08), inset 0 0 18px rgba(255, 230, 170, 0.08), 0 12px 30px rgba(0, 0, 0, 0.55);
}
.lux--gold .hub-tile, .lux--gold .connect-cta {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 50%);
  border-color: rgba(230, 200, 140, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 24px rgba(0, 0, 0, 0.5);
}
.lux .hub-tile::before, .lux .connect-cta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 22%, transparent 40%, transparent 70%, rgba(255, 230, 170, 0.18) 100%); }
.lux--gold .hub-tile::before, .lux--gold .connect-cta::before { opacity: 0.5; }
.lux .hub-tile::after, .lux .connect-cta::after { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent); }
.lux .hub-tile:active, .lux .connect-cta:active { transform: scale(0.98); }
.lux .hub-tile b, .lux .cc-txt b { color: #f6ecd0; }
.lux .hub-tile small, .lux .cc-txt small { color: #a8977a; }
.lux .hub-ico .ico { stroke: #e6c46a; }
.lux .cc-ics span { border-radius: 10px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 240, 200, 0.35); color: #f3e6c4; opacity: 1; }
.lux .cc-ics span.is-on { background: var(--gold); color: #1a1408; }
.lux--gold .cc-ics span.is-on { background: var(--gold-matt); }
.lux .cc-pill { border-radius: 999px; background: var(--gold); border-color: #f6e7b0; color: #1a1408; }
.lux--gold .cc-pill { background: var(--gold-matt); border-color: rgba(255, 240, 200, 0.4); }
.lux .cc-go { color: #e6c46a; }

/* Diamant-Holo: Facetten-Schliff im Glas und Funkeln */
.lux--holo .hub-tile, .lux--holo .connect-cta {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160'%3E%3Cg fill='none' stroke='white' stroke-width='1'%3E%3Cpath d='M0 0L80 60L0 160M80 60L240 0M80 60L170 160M80 60L120 0M170 160L240 70L120 0M240 70L80 60' stroke-opacity='.22'/%3E%3Cpath d='M120 0L170 160M0 70L80 60' stroke-opacity='.12'/%3E%3C/g%3E%3Cpath d='M80 60L120 0L240 0Z' fill='white' fill-opacity='.06'/%3E%3Cpath d='M80 60L170 160L240 70Z' fill='white' fill-opacity='.04'/%3E%3Cpath d='M0 0L80 60L0 70Z' fill='white' fill-opacity='.07'/%3E%3C/svg%3E"), linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 45%, rgba(255, 240, 200, 0.08));
  background-size: cover;
}
.lux--holo .hub-tile b, .lux--holo .cc-txt b { text-shadow: 0 0 12px rgba(255, 255, 255, 0.25); }
/* Kristallglas (Diamant-Holo): klar, weiße Kante, Glanz oben und ein Lichtreflex, der der Neigung des Handys folgt */
.lux--holo .hub-tile, .lux--holo .connect-cta, .lux--holo .glass {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.9), inset 0 -10px 24px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 22px rgba(255, 255, 255, 0.12), 0 14px 34px rgba(0, 0, 0, 0.6);
}
.lux--holo .hub-tile::before, .lux--holo .connect-cta::before, .lux--holo .glass::before {
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.18) 30%, transparent 46%),
    linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.4) 50%, transparent 58%);
  /* Glanz größer als die Kachel: beim Kippen wandert er mit, ohne oben eine Kante freizulegen */
  background-size: 100% 150%, 300% 100%;
  background-position: 0 calc(15% + var(--ly, 0) * 15%), calc(50% - var(--lx, 0) * 45%) 0;
  background-repeat: no-repeat;
}
.sparkle {
  position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 3; opacity: 0;
  background: radial-gradient(circle, #fff 0 1.5px, transparent 2.5px), linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.95) 50%, transparent 55%), linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.95) 50%, transparent 55%);
  filter: drop-shadow(0 0 4px #fff);
  animation: sparkle 4s ease-in-out var(--d, 0s) infinite;
}
.hub-tile:nth-child(1) .sparkle { top: 10%; right: 12%; }
.hub-tile:nth-child(2) .sparkle { top: 62%; left: 14%; }
.hub-tile:nth-child(3) .sparkle { top: 55%; right: 16%; }
.connect-cta .sparkle:nth-of-type(1) { top: 14%; right: 9%; }
.connect-cta .sparkle:nth-of-type(2) { bottom: 14%; left: 28%; }
@keyframes sparkle { 0%, 70%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 80% { opacity: 1; transform: scale(1) rotate(45deg); } 90% { opacity: 0.4; transform: scale(0.7) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .sparkle, .lux--holo .logo-word { animation: none; } .sparkle { opacity: 0.8; } }

/* ---- Ganze App ab Gold bzw. Diamant-Holo ------------------------------------------------------
   Grün wird zu Gold, weiße Flächen werden zu Glas: Gold mattes Glas, Holo klares Kristallglas. */
.lux {
  --green: #e6c46a;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 240, 200, 0.3);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  --gold-ink: #1a1408;
  color: #f3e6c4;
}
.lux--holo {
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-line: rgba(255, 255, 255, 0.6);
  --glass-shine: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -8px 18px rgba(255, 255, 255, 0.06), 0 0 16px rgba(255, 255, 255, 0.08);
}
.lux.screen--login, .lux.screen--dark { background: radial-gradient(ellipse at 50% 30%, #2a2316 0%, #0b0a08 55%, #050505 100%) !important; }
.lux--gold.screen--login, .lux--gold.screen--dark { background: radial-gradient(ellipse at 50% 30%, #2b2210 0%, #120f0a 60%, #0b0a08 100%) !important; }
.lux .hero-shape { background: #0d0b08; }
.lux .headline, .lux h1, .lux h2, .lux h3 { color: #f6ecd0; }
.lux .sub, .lux .note, .lux .hint, .lux .msheet-lead { color: #b9a679; }
.lux .link, .lux a { text-decoration-color: #c9a24a; }
.lux .back, .lux .icon-btn { color: #f3e6c4; }

/* Glasflächen */
.lux .pf, .lux .signed, .lux .req, .lux .req.is-ok, .lux .amount-field, .lux .field input, .lux .field select,
.lux .check-field input, .lux .pf input, .lux .sc-ask input, .lux .acc-chip, .lux .msheet-big, .lux .cardback-tap, .lux .stat, .lux .rrow {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: 14px;
  color: #f3e6c4 !important;
  box-shadow: var(--glass-shine) !important;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.lux .field select option { background: #1a160f; color: #f3e6c4; }
.lux .field input::placeholder, .lux .check-field input::placeholder { color: rgba(243, 230, 196, 0.4); }
.lux .field input:focus, .lux .field select:focus, .lux .check-field input:focus { border-color: #e6c46a !important; box-shadow: var(--glass-shine), 0 0 0 3px rgba(230, 196, 106, 0.25) !important; }
.lux .amount-field input, .lux .amount-field span { color: #f6ecd0 !important; }
.lux .pf-ic, .lux .pf-nm, .lux .signed small, .lux .pf-ok, .lux .pf.is-picked .pf-ok { color: #f3e6c4 !important; }
.lux .pf.is-on, .lux .pf.is-picked { border-color: #e6c46a !important; box-shadow: var(--glass-shine), 0 0 0 1px rgba(230, 196, 106, 0.6), 0 0 18px rgba(230, 196, 106, 0.18) !important; outline: none; }
.lux .pf-go { background: var(--gold); border: 0; border-radius: 10px; color: var(--gold-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.lux--gold .pf-go { background: var(--gold-matt); }
.lux .check-box { border: 1px solid var(--glass-line); border-radius: 6px; background: var(--glass-bg); color: var(--gold-ink); }
.lux .check.is-on .check-box, .lux input:checked + .check-box, .lux .check-box.is-on { background: var(--gold); border-color: #f6e7b0; }
.lux .acc-chip.is-on { background: var(--gold) !important; color: var(--gold-ink) !important; }
.lux .plat { background: rgba(255, 255, 255, 0.9); }
.lux .msheet-pnl {
  background: linear-gradient(180deg, rgba(40, 33, 22, 0.94), rgba(12, 10, 8, 0.97));
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  color: #f3e6c4; border-top: 1px solid var(--glass-line); border-radius: 24px 24px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 -20px 50px rgba(0, 0, 0, 0.6);
}
.lux--holo .msheet-pnl { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 -20px 50px rgba(0, 0, 0, 0.6); }
.lux .msheet-pnl .field { color: #b9a679; }

/* Ranking */
.lux .rank-tabs a.is-active { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 18px rgba(230, 196, 106, 0.4); }
.lux--gold .rank-tabs a.is-active { background: var(--gold-matt); box-shadow: none; }
.lux .chip.is-active { border-color: #e6c46a; color: #f6e7b0; box-shadow: inset 0 0 12px rgba(230, 196, 106, 0.25); }
.lux .rrow--me { outline: 1px solid #e6c46a; box-shadow: 0 0 20px rgba(230, 196, 106, 0.3) !important; }
.lux .stat--me { border-color: rgba(230, 196, 106, 0.6) !important; }
.lux .duel-row.is-mine .duel-bar i { background: var(--gold); box-shadow: 0 0 10px rgba(230, 196, 106, 0.6); }
.lux .mebar { border-top-color: rgba(230, 196, 106, 0.4); }
.lux .check-result.is-valid .check-badge { background: var(--gold); box-shadow: 0 0 14px rgba(230, 196, 106, 0.7); }

/* Kristallglas-Lichtreflex, der der Neigung folgt, auch auf den anderen Glasflächen (nur Holo) */
.lux--holo .pf, .lux--holo .stat, .lux--holo .amount-field, .lux--holo .msheet-big, .lux--holo .signed {
  background-image: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%) !important;
  background-size: 300% 100% !important;
  background-position: calc(50% - var(--lx, 0) * 45%) 0 !important;
}

/* ---- Hommagen: eigene Looks für drei Stufen (statt des normalen Looks der Klasse) ----------------
   hom--cave  Stufe 14 Amethyst: Kristallhöhle aus Pixel-Steinblöcken
   hom--neon  Stufe 76 Black Opal: Neon-Nacht im Diamantenviertel
   hom--ocean Stufe 98 Hope-Diamant: Tiefsee bei Nacht
   Alles selbst gezeichnet; keine fremden Logos, Figuren, Schriften oder Bilder. */
@font-face { font-family: "Press Start 2P"; src: url("../assets/fonts/press-start-2p.woff2") format("woff2"); font-display: swap; }
.hom { color: var(--h-ink); --glass-bg: var(--h-tile); --glass-line: var(--h-line); }
.screen.lux.hom { background: var(--h-bg) !important; }
.hom .logo-word { background-image: var(--h-logo) !important; background-size: 100% 100% !important; animation: none !important; }
.hom .logo-row { filter: drop-shadow(3px 5px 0 var(--h-shadow)) drop-shadow(0 0 16px var(--h-glow)) !important; }
.hom .logo-dia { filter: drop-shadow(0 0 10px var(--h-glow)) !important; }
.hom .logo-tag, .hom .welcome-sub, .hom .sub, .hom .note, .hom .hint, .hom .msheet-lead { color: var(--h-sub) !important; }
.hom .welcome-hi, .hom .headline, .hom h1, .hom h2, .hom h3, .hom .hub-tile b, .hom .cc-txt b { color: var(--h-ink) !important; }
.hom .welcome-sub b { color: var(--h-acc) !important; }
.hom .hub-tile small, .hom .cc-txt small { color: var(--h-sub) !important; }
.hom .vault-ring { border-color: var(--h-acc) !important; box-shadow: 0 0 34px var(--h-glow) !important; }
.hom .vault-runes text { fill: var(--h-acc) !important; }
.hom .vault-rays { filter: var(--h-rays); }
.hom .btn, .hom .pf-go, .hom .cc-ics span.is-on, .hom .cc-pill, .hom .acc-chip.is-on, .hom .rank-tabs a.is-active, .hom .check.is-on .check-box, .hom input:checked + .check-box {
  background: var(--h-btn) !important; color: var(--h-btn-ink) !important; border-color: transparent !important; }
.hom .btn { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 30px var(--h-glow) !important; }
.hom .btn span { color: var(--h-btn-ink) !important; }
.hom .hub-tile, .hom .connect-cta { background-color: var(--h-tile) !important; border-color: var(--h-line) !important; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 0 20px var(--h-glow), 0 14px 34px rgba(0, 0, 0, 0.55) !important; }
.hom .chip.is-active, .hom .rrow--me, .hom .stat--me, .hom .pf.is-on, .hom .pf.is-picked { border-color: var(--h-acc) !important; color: var(--h-ink); }
.hom .cc-go, .hom .welcome-reset, .hom .welcome-logout, .hom .app-version { color: var(--h-sub) !important; text-decoration-color: var(--h-acc) !important; }
.hom .link, .hom a { text-decoration-color: var(--h-acc); }
.hom.screen--card { --rar: var(--h-acc) !important; }
.hom .sweep, .hom .donate-aura { opacity: 0.25; }
.hom[class*="hom--"]::before { content: none; }

/* Kristallhöhle */
.hom--cave {
  --h-ink: #f1e8ff; --h-sub: #b9a5dd; --h-acc: #cfb2ff; --h-glow: rgba(170, 120, 255, 0.45); --h-shadow: rgba(40, 10, 80, 0.9);
  --h-logo: linear-gradient(180deg, #f5edff, #cfb2ff 45%, #9a6cf0 80%, #6a3cc8); --h-btn: linear-gradient(180deg, #e2d2ff, #b48cff 50%, #8a5ae6); --h-btn-ink: #1c0b3a;
  --h-tile: rgba(30, 18, 50, 0.82); --h-line: rgba(207, 178, 255, 0.55); --h-rays: hue-rotate(250deg) saturate(1.4); --green: #cfb2ff;
  --h-bg: url("../assets/hom/crystals-bottom.png") center bottom / 100% auto no-repeat, url("../assets/hom/crystals-top.png") center top / 100% auto no-repeat,
    radial-gradient(ellipse at 50% 32%, rgba(80, 40, 140, 0.85) 0%, rgba(40, 20, 70, 0.75) 38%, rgba(10, 8, 14, 0.55) 70%), url("../assets/hom/stone.png") 0 0 / 160px auto repeat;
  image-rendering: pixelated;
}
.hom--cave .fx-canvas, .hom--cave .stage3d, .hom--cave canvas { image-rendering: auto; }
.hom--cave .welcome-hi, .hom--cave .headline, .hom--cave .hub-tile b, .hom--cave .cc-txt b, .hom--cave .btn span {
  font-family: "Press Start 2P", var(--mono) !important; font-size: 11px !important; line-height: 1.6 !important; letter-spacing: 0 !important; text-transform: none; }
.hom--cave .welcome-hi { font-size: 12px !important; }
.hom--cave .btn, .hom--cave .hub-tile, .hom--cave .connect-cta, .hom--cave .cc-pill, .hom--cave .cc-ics span, .hom--cave .pf, .hom--cave .msheet-pnl, .hom--cave .field input, .hom--cave .field select { border-radius: 0 !important; }
.hom--cave .btn { box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.35), inset 4px 4px 0 rgba(255, 255, 255, 0.45), 0 0 24px var(--h-glow) !important; }
.hom--cave .hub-tile, .hom--cave .connect-cta { border-width: 3px !important; box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.35), inset 4px 4px 0 rgba(255, 255, 255, 0.12), 0 0 20px rgba(170, 120, 255, 0.3) !important; }
.hom--cave .hub-tile::before, .hom--cave .connect-cta::before, .hom--cave .hub-tile::after, .hom--cave .connect-cta::after { display: none; }
.hom--cave.screen--welcome .splash-logo { padding-top: max(84px, calc(env(safe-area-inset-top) + 64px)); }
.hom-achv { position: absolute; z-index: 5; left: 50%; top: max(14px, env(safe-area-inset-top)); display: flex; gap: 10px; align-items: center; padding: 10px 14px;
  background: #1b1424; border: 3px solid #6a4aa8; box-shadow: inset 0 0 0 3px #0d0a12; font: 10px/1.7 "Press Start 2P", monospace; color: #fff; white-space: nowrap;
  transform: translate(-50%, 0); animation: achv-in 0.6s steps(6) 0.8s both; }
.hom-achv b { display: block; color: #f5d64a; font-weight: 400; }
.hom-achv i { width: 28px; height: 28px; background: url("../assets/hom/pick.png") center / contain no-repeat; image-rendering: pixelated; }
@keyframes achv-in { from { transform: translate(-50%, -140%); } }
.hom-torch { position: absolute; z-index: 1; top: 30px; width: 18px; height: 24px; background: url("../assets/hom/torch.png") center / contain no-repeat; image-rendering: pixelated; filter: drop-shadow(0 0 12px rgba(255, 180, 60, 0.9)); animation: torch 2.4s ease-in-out infinite; }
.hom-torch--l { left: 22px; } .hom-torch--r { right: 22px; animation-delay: 0.7s; }
@keyframes torch { 50% { filter: drop-shadow(0 0 7px rgba(255, 160, 50, 0.7)); } }
.hom-pick { position: absolute; z-index: 2; left: 10px; top: 86px; width: 64px; height: 52px; background: url("../assets/hom/pick.png") center / contain no-repeat; image-rendering: pixelated; transform: rotate(-12deg); filter: drop-shadow(0 0 10px rgba(180, 140, 255, 0.6)); }
.hom-xp { position: absolute; z-index: 2; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); width: 250px; height: 8px; background: #1a1a1a; border: 2px solid #000; box-shadow: inset 0 0 0 1px #3a3a3a; }
.hom-xp i { position: absolute; inset: 0 38% 0 0; background: linear-gradient(#b8ff5a, #6ccf1e 60%, #3e8a0c); }
.hom-xp b { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font: 11px "Press Start 2P", monospace; color: #9dff3a; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000; }
.hom--cave .welcome-hi { margin-top: 26px; }
.hom-hotbar { position: relative; z-index: 5; align-self: center; margin: 14px auto 0; display: flex; padding: 3px; background: rgba(20, 20, 20, 0.88); border: 3px solid #5a5a5a; box-shadow: inset 0 0 0 2px #1a1a1a; }
.hom-hotbar span { width: 30px; height: 30px; margin: 1px; border: 2px solid; border-color: #3a3a3a #8b8b8b #8b8b8b #3a3a3a; background: center / 70% no-repeat; image-rendering: pixelated; }
.hom-hotbar .sel { border: 3px solid #fff; box-shadow: 0 0 0 1px #000; }
.hom-hotbar .i-pick { background-image: url("../assets/hom/pick.png"); } .hom-hotbar .i-gem { background-image: url("../assets/hom/gem.png"); } .hom-hotbar .i-torch { background-image: url("../assets/hom/torch.png"); }

/* Neon-Nacht */
.hom--neon {
  --h-ink: #f4f1ff; --h-sub: #9aa3c8; --h-acc: #ff5fd2; --h-glow: rgba(255, 80, 200, 0.35); --h-shadow: rgba(0, 0, 0, 0.9);
  --h-logo: linear-gradient(110deg, #ff5fd2, #7a7bff 30%, #35f0ff 50%, #9dff7a 70%, #ffb347 90%); --h-btn: linear-gradient(110deg, #ff5fd2, #7a7bff 35%, #35f0ff 65%, #9dff7a); --h-btn-ink: #0a0a14;
  --h-tile: rgba(20, 22, 40, 0.55); --h-line: rgba(140, 150, 255, 0.5); --h-rays: hue-rotate(260deg) saturate(2) brightness(0.8); --green: #ff5fd2;
  --h-bg: radial-gradient(circle at 12% 18%, rgba(255, 80, 200, 0.35), transparent 14%), radial-gradient(circle at 88% 26%, rgba(53, 240, 255, 0.3), transparent 13%),
    radial-gradient(circle at 20% 70%, rgba(255, 179, 71, 0.22), transparent 12%), radial-gradient(circle at 80% 78%, rgba(157, 255, 122, 0.2), transparent 12%),
    linear-gradient(180deg, #07070d 0%, #0e0f1c 60%, #05050a 100%);
}
.hom-neon { position: absolute; z-index: 2; font: 800 15px/1 var(--mono); letter-spacing: 0.12em; pointer-events: none; animation: neon 6s steps(1) infinite; }
.hom-neon--top { top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); font-size: 12px; white-space: nowrap; color: #ffe7c2; text-shadow: 0 0 4px #ffb347, 0 0 12px #ffb347, 0 0 22px #ff8a1f; }
.hom-neon--a { top: 4px; left: 6px; color: #ffd1f3; text-shadow: 0 0 4px #ff5fd2, 0 0 12px #ff5fd2, 0 0 26px #ff5fd2; transform: rotate(-8deg); animation-delay: 1.3s; }
.hom-neon--b { top: 14px; right: 6px; color: #d6fbff; text-shadow: 0 0 4px #35f0ff, 0 0 12px #35f0ff, 0 0 26px #35f0ff; transform: rotate(7deg); animation-delay: 3.1s; }
@keyframes neon { 0%, 100% { opacity: 1; } 91% { opacity: 0.35; } 93% { opacity: 1; } 95% { opacity: 0.5; } }
.hom-cosmos { position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 95, 210, 0.18) 0 6deg, transparent 6deg 14deg, rgba(53, 240, 255, 0.16) 14deg 19deg, transparent 19deg 27deg, rgba(157, 255, 122, 0.14) 27deg 31deg, transparent 31deg 40deg);
  -webkit-mask: radial-gradient(circle, transparent 0 16%, #000 30%, transparent 70%); mask: radial-gradient(circle, transparent 0 16%, #000 30%, transparent 70%); animation: cosmos 60s linear infinite; }
@keyframes cosmos { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hom-fish { position: absolute; z-index: 2; left: 2px; top: 71px; width: 96px; height: 52px; transform: rotate(-10deg); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
.hom-ball { position: absolute; z-index: 2; left: 14px; top: 135px; width: 46px; height: 46px; border-radius: 50%; transform: rotate(-18deg); overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #ffb070, #e5661d 55%, #a83d0c); box-shadow: 0 0 18px rgba(255, 140, 60, 0.55), inset -6px -8px 14px rgba(0, 0, 0, 0.35); }
.hom-ball::before, .hom-ball::after { content: ""; position: absolute; border: 2px solid #2a1206; }
.hom-ball::before { inset: -2px 19px; border-radius: 50%; }
.hom-ball::after { inset: 21px -2px auto; border-width: 2px 0 0; }
.hom-slip { position: absolute; z-index: 2; right: 8px; top: 97px; width: 82px; padding: 8px 8px 10px; background: #f4f1e8; color: #111; font: 700 8.5px/1.45 var(--mono); transform: rotate(9deg); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); }
.hom-slip b { display: block; font-size: 10px; border-bottom: 1px dashed #555; margin-bottom: 4px; padding-bottom: 2px; }
.hom-slip s { color: #0a8a3a; text-decoration: none; font-weight: 800; }
.hom-buzz { position: absolute; z-index: 2; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); padding: 3px 8px; border: 1.5px solid #ff5fd2; border-radius: 4px; font: 700 9px var(--mono); letter-spacing: 0.14em; color: #ffd1f3; text-shadow: 0 0 6px #ff5fd2; box-shadow: 0 0 10px rgba(255, 95, 210, 0.5), inset 0 0 8px rgba(255, 95, 210, 0.35); white-space: nowrap; }
.hom--neon .welcome-hi { margin-top: 24px; }
.hom--neon.screen--welcome .splash-logo { padding-top: max(56px, calc(env(safe-area-inset-top) + 40px)); }

/* Tiefsee */
.hom--ocean {
  --h-ink: #eef7ff; --h-sub: #8fb2d4; --h-acc: #bfe4ff; --h-glow: rgba(110, 190, 255, 0.4); --h-shadow: rgba(10, 40, 80, 0.9);
  --h-logo: linear-gradient(180deg, #fff, #dbefff 45%, #8cc6f2 80%, #4f8fd0); --h-btn: linear-gradient(135deg, #f4fbff, #cfe6f7 30%, #9cc7ea 55%, #eef8ff 75%, #a9cdeb); --h-btn-ink: #0a1f38;
  --h-tile: rgba(190, 225, 255, 0.08); --h-line: rgba(200, 232, 255, 0.6); --h-rays: hue-rotate(170deg) saturate(1.6) brightness(0.9); --green: #bfe4ff;
  --h-bg: linear-gradient(180deg, rgba(120, 200, 255, 0.28) 0%, transparent 35%), radial-gradient(ellipse at 50% 0%, #1d5a8c 0%, #0b2a4a 35%, #06142a 65%, #020812 100%);
}
.hom-water { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.22; mix-blend-mode: screen; animation: water 18s linear infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.018 0.03' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.75 0 0 0 0 0.92 0 0 0 0 1 0 0 0 -2.2 1.25'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23f)'/%3E%3C/svg%3E") 0 0 / 400px 400px;
  -webkit-mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.4) 35%, transparent 60%); mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.4) 35%, transparent 60%); }
@keyframes water { to { background-position: 400px 200px; } }
.hom-stars { position: absolute; inset: 0 0 auto; height: 300px; z-index: 0; pointer-events: none;
  background-image: radial-gradient(1px 1px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 15%, #fff, transparent), radial-gradient(1px 1px at 75% 6%, #fff, transparent),
    radial-gradient(1px 1px at 88% 22%, #fff, transparent), radial-gradient(1px 1px at 20% 30%, #cfe8ff, transparent), radial-gradient(1.5px 1.5px at 66% 28%, #fff, transparent), radial-gradient(1px 1px at 42% 25%, #fff, transparent); }
.hom-bubble { position: absolute; z-index: 0; border-radius: 50%; border: 1px solid rgba(220, 240, 255, 0.55); pointer-events: none;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.05) 45%, transparent 60%); animation: bubble 9s ease-in var(--d, 0s) infinite; }
@keyframes bubble { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-260px); opacity: 0; } }
.hom-heart { position: absolute; z-index: 2; right: 14px; top: 110px; width: 74px; height: 110px; filter: drop-shadow(0 0 12px rgba(80, 150, 255, 0.8)); transform-origin: 50% 0; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(4deg); } }
.hom-bow { position: absolute; z-index: 3; left: -14px; top: 105px; width: 112px; height: 82px; filter: drop-shadow(0 0 8px rgba(150, 200, 255, 0.35)); pointer-events: none; }
.hom-berg { position: absolute; z-index: 0; right: -2px; top: 125px; width: 70px; height: 52px; opacity: 0.85; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .hom-achv, .hom-torch, .hom-neon, .hom-cosmos, .hom-water, .hom-bubble, .hom-heart { animation: none; } }

/* ---- Mondstein-Geschichte (Stufe 30): Buch öffnet sich beim Aufdecken (Ablauf in js/story.js) ---- */
.story { position: fixed; inset: 0; z-index: 90; cursor: pointer; contain: strict;
  background: radial-gradient(ellipse at 50% 45%, #2a1d14 0%, #120c08 55%, #050302 100%); }
.story-book { position: absolute; left: 10%; right: 10%; top: 12%; bottom: 14%; }
/* jede Seite eine Ebene, dunkler Grund (nie weiß), schmaler goldener Seitenrand */
.story-sheet { position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; overflow: hidden; transform-origin: 0 50%;
  background: #0b0d14 center / cover no-repeat; backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform;
  box-shadow: inset 0 0 0 1px rgba(201, 164, 106, 0.55), inset 6px 0 18px rgba(0, 0, 0, 0.55), 0 26px 50px rgba(0, 0, 0, 0.7); }
.story-dim { position: absolute; inset: 0; background: #000; opacity: 0.55; pointer-events: none; }
.story-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #e6c47a;
  background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.08), transparent 55%), repeating-radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 5px), linear-gradient(135deg, #3b1410, #5a1e16 45%, #2a0d0a);
  box-shadow: inset 0 0 0 1px #1a0705, inset 8px 0 16px rgba(0, 0, 0, 0.6), 0 26px 50px rgba(0, 0, 0, 0.7); }
.story-frame { position: absolute; inset: 14px; border: 1.5px solid rgba(230, 196, 122, 0.75); border-radius: 3px; }
.story-frame::before { content: ""; position: absolute; inset: 6px; border: 0.8px solid rgba(230, 196, 122, 0.5); }
.story-corner { position: absolute; width: 26px; height: 26px; border: 1.5px solid rgba(230, 196, 122, 0.8); border-radius: 50%; }
.story-gold { background: linear-gradient(180deg, #fff2c8, #e6c47a 45%, #a8792e 80%, #f3dc96); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-author { font: 700 15px/1 "Cormorant Garamond", Georgia, serif; letter-spacing: 0.32em; }
.story-title { font: 700 40px/1 "Cormorant Garamond", Georgia, serif; margin: 6px 0 4px; }
.story-sub { font: italic 500 15px "Cormorant Garamond", Georgia, serif; color: #d9b36c; }
.story-year { margin-top: 26px; font: 600 12px "Cormorant Garamond", Georgia, serif; letter-spacing: 0.36em; color: #d9b36c; }
.story-emblem { position: relative; width: 56px; height: 56px; margin: 20px auto; border-radius: 50%; border: 1.5px solid #e6c47a; box-shadow: 0 0 18px rgba(230, 196, 122, 0.35); }
.story-emblem::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #cfe0ff 45%, #7fa6ff 80%); }
.story-shine { position: absolute; top: -20%; bottom: -20%; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 240, 200, 0.18), transparent); transform: translateX(-150%) skewX(-15deg); animation: story-shine 1.1s ease 0.25s both; }
@keyframes story-shine { to { transform: translateX(320%) skewX(-15deg); } }
.story-glow { position: absolute; left: 50%; top: 52%; width: 700px; height: 700px; border-radius: 50%; opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(0.05); background: radial-gradient(circle, #fff, #bcd6ff 30%, rgba(120, 170, 255, 0) 65%); }
.story-skip { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); text-align: center; font: 500 11px var(--mono); letter-spacing: 0.08em; color: rgba(243, 234, 214, 0.45); }

/* Krimi-Nacht „Der Mondstein“ (Stufe 30): Landsitz bei Vollmond, Leder und Gold wie der Bucheinband */
.hom--moon {
  --h-ink: #f1ece0; --h-sub: #aab3c8; --h-acc: #e6c47a; --h-glow: rgba(200, 215, 255, 0.3); --h-shadow: rgba(10, 14, 30, 0.9);
  --h-logo: linear-gradient(180deg, #fff, #e4e9f5 45%, #aab6d0 85%, #7d8aa8); --h-btn: linear-gradient(135deg, #3b1410, #5e2018 45%, #2a0d0a); --h-btn-ink: #f0d590;
  --h-tile: rgba(12, 16, 30, 0.72); --h-line: rgba(230, 196, 122, 0.55); --h-rays: grayscale(1) brightness(1.3); --green: #e6c47a;
  --h-bg: linear-gradient(180deg, rgba(7, 10, 20, 0.15) 0%, rgba(7, 10, 20, 0.55) 30%, rgba(7, 10, 20, 0.92) 52%, #070a14 70%), url("../assets/moon/landsitz.jpg") center top / 100% auto no-repeat, #070a14;
}
.hom--moon .welcome-hi, .hom--moon .headline, .hom--moon .hub-tile b, .hom--moon .cc-txt b, .hom--moon h1, .hom--moon h2 { font-family: "Cormorant Garamond", Georgia, serif !important; letter-spacing: 0.01em; text-transform: none; }
.hom--moon .welcome-hi { font-size: 25px !important; font-style: italic; }
.hom--moon .hub-tile b, .hom--moon .cc-txt b { font-size: 18px !important; }
.hom--moon .btn span { font: 700 20px "Cormorant Garamond", Georgia, serif !important; letter-spacing: 0.06em; }
.hom--moon .btn { border-radius: 4px !important; box-shadow: inset 0 0 0 1px #1a0705, inset 0 0 0 4px rgba(230, 196, 122, 0.55), 0 10px 26px rgba(0, 0, 0, 0.6) !important; }
.hom--moon .hub-tile, .hom--moon .connect-cta, .hom--moon .pf, .hom--moon .stat, .hom--moon .msheet-pnl { border-radius: 5px !important;
  box-shadow: inset 0 0 0 4px rgba(10, 14, 28, 0.9), inset 0 0 0 5px rgba(230, 196, 122, 0.35), 0 12px 30px rgba(0, 0, 0, 0.55) !important; }
.hom--moon .hub-tile::before, .hom--moon .connect-cta::before, .hom--moon .hub-tile::after, .hom--moon .connect-cta::after { display: none; }
.hom--moon .vault-ring { border-color: rgba(230, 236, 250, 0.7) !important; }
.hom--moon .vault-runes text { fill: #dfe6f5 !important; }
.hom--moon .logo-dia { filter: grayscale(1) brightness(1.5) drop-shadow(0 0 10px var(--h-glow)) !important; }
.hom-fog { position: absolute; z-index: 0; left: -30%; right: -30%; top: 34%; height: 180px; pointer-events: none; filter: blur(8px); opacity: 0.8;
  background: radial-gradient(ellipse at 30% 60%, rgba(200, 210, 235, 0.22), transparent 60%), radial-gradient(ellipse at 75% 40%, rgba(200, 210, 235, 0.18), transparent 60%); animation: fog 26s ease-in-out infinite alternate; }
.hom-fog--2 { top: 60%; opacity: 0.55; animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes fog { to { transform: translateX(18%); } }
.hom-news { position: absolute; z-index: 2; left: 6px; top: 56px; width: 108px; padding: 7px 8px 9px; background: #e9e2cf; color: #1b1b1b; transform: rotate(-7deg); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); font: 700 7px/1.25 Georgia, serif; }
.hom-news b { display: block; margin: 3px 0 4px; padding-bottom: 3px; border-bottom: 1px solid #333; font: 900 11px/1.05 Georgia, serif; text-transform: uppercase; }
.hom-news i { display: block; font: 400 6.5px/1.3 Georgia, serif; color: #444; }
.hom-news u { display: block; padding-bottom: 2px; border-bottom: 1px solid #333; font: 700 6px Georgia, serif; letter-spacing: 0.12em; text-decoration: none; }
.hom-lens { position: absolute; z-index: 3; right: 6px; top: 86px; width: 92px; height: 92px; transform: rotate(18deg); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); animation: lens 7s ease-in-out infinite; }
@keyframes lens { 50% { transform: rotate(10deg) translate(-8px, 4px); } }
.hom-rose { position: absolute; z-index: 2; right: 64px; top: 150px; width: 26px; height: 60px; transform: rotate(-24deg); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); }
@media (prefers-reduced-motion: reduce) { .hom-fog, .hom-lens { animation: none; } }
