/* =========================================================
   PRIMAL ISLE
   Dschungel: Blätterdach, Moos, Lianen und Glühwürmchen
   ========================================================= */

/* ---------- Schriften (lokal, siehe server.js) ---------- */

/* Metamorphous gibt es nur in einer Stärke – fettere Stufen erzeugt der Browser */
@font-face {
  font-family: "Metamorphous";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/metamorphous/metamorphous-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Metamorphous";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/metamorphous/metamorphous-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design-Tokens ---------- */

/* Dschungel-Palette: tiefes Blätterdach, Moos, Lianen, Sonnenlicht durchs Laub.
   Das Lava-Rot aus dem Logo bleibt nur für Bedeutung (Kampf, Fleischfresser, Strafen). */
:root {
  --bg: #050a06;
  --bg-rgb: 5, 10, 6;
  --bg-2: #0a130b;
  --surface: rgba(190, 230, 160, 0.03);
  --surface-2: rgba(190, 230, 160, 0.06);
  --line: rgba(170, 215, 130, 0.12);
  --line-strong: rgba(170, 215, 130, 0.26);
  --text: #e8eedb;
  --muted: #97a58a;

  --leaf-light: #e3f1b4;          /* helles Blatt – Titel in Karten */
  --leaf-light-rgb: 227, 241, 180;
  --leaf: #a9cf62;                /* Blattgrün – Links, Ränder */
  --leaf-rgb: 169, 207, 98;
  --bark: #5f7a35;                /* Rinde/Moos – dunkle Akzente */
  --bark-rgb: 95, 122, 53;
  --accent: #8fd14b;              /* frisches Grün – Labels, Markierungen */
  --glow-rgb: 196, 232, 92;       /* Glühwürmchen-Licht – Schein und Schatten */
  --lava: #ff5a1f;                /* aus dem Logo, sparsam */
  --blood: #ff4a3a;
  --amber: #ffb547;
  --moss: #6fcf7a;
  --blurple: #7983f5;

  --grad-title: linear-gradient(180deg, #f4f9df 0%, #d3e89c 36%, #92b955 68%, #426a28 100%);
  --grad-accent: linear-gradient(180deg, #f0f7a6 0%, #b4dc55 50%, #4f8a26 100%);
  --grad-button: linear-gradient(180deg, #e0f2a4 0%, #a2cc5a 50%, #57832d 100%);

  --font-display: "Metamorphous", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 80px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & Basis ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(50, 100, 40, 0.18), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}

/* Filmkorn über der ganzen Seite */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  font-weight: 700;
}

p {
  margin: 0;
}

::selection {
  background: var(--leaf);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
}

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

.container {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
}

/* Goldene Verlaufsschrift */
.section-head h2,
.page-hero h1,
.cta h2,
.stats strong {
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Kleine Großbuchstaben-Labels */
.eyebrow,
.kicker,
.site-nav a:not(.button),
.button,
.stats span,
.feature .index,
.member-role,
.tags li,
.code-box-label,
.link-arrow,
.toc-title,
.rule-cat,
.footer-nav a,
.footer-bottom {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: max(16px, calc((100% - 1200px) / 2));
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, height 0.3s var(--ease);
}

.site-header.scrolled,
.nav-open .site-header {
  --header-h: 68px;
  background: rgba(var(--bg-rgb), 0.85);
  border-color: var(--line);
  backdrop-filter: blur(14px) saturate(140%);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  height: 46px;
  width: auto;
  filter: drop-shadow(0 4px 14px rgba(var(--glow-rgb), 0.25));
  transition: transform 0.4s var(--ease), filter 0.4s ease, height 0.3s var(--ease);
}

.scrolled .brand img {
  height: 40px;
}

.brand:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 20px rgba(var(--glow-rgb), 0.5));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a:not(.button) {
  position: relative;
  padding: 8px 14px;
  font-size: 0.76rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

/* Wiederkehrendes Motiv: kleines Blatt (statt der Wildlands-Raute) */
.site-nav a:not(.button)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 0 100%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--glow-rgb), 0.7);
  transform: translateX(-50%) scale(0) rotate(-45deg);
  transition: transform 0.35s var(--ease);
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current="page"] {
  color: var(--leaf-light);
}

.site-nav a:not(.button):hover::after,
.site-nav a[aria-current="page"]::after {
  transform: translateX(-50%) scale(1) rotate(0);
}

.site-nav .button {
  margin-left: 14px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

.nav-toggle span:not(.sr-only) {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--leaf);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 25px; }

.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(12, 22, 13, 0.6);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.3s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Lichtreflex beim Hover */
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.button:hover::after {
  transform: translateX(120%);
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--leaf);
  color: var(--leaf-light);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: var(--grad-button);
  border-color: #d4eba0;
  color: #0f1a07;
  text-shadow: 0 1px 0 rgba(235, 255, 200, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 0 rgba(25, 50, 12, 0.35),
    0 10px 30px -8px rgba(var(--glow-rgb), 0.6);
}

.button-primary:hover {
  color: #0f1a07;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 0 rgba(25, 50, 12, 0.35),
    0 0 0 4px rgba(var(--glow-rgb), 0.18),
    0 14px 44px -6px rgba(var(--glow-rgb), 0.85);
}

.button-small {
  padding: 0.65rem 1.1rem;
  font-size: 0.7rem;
}

/* ---------- Hero (Startseite) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 140px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background: var(--bg);
}

.hero-banner {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

/* Etwas größer als der Hero, damit beim Parallax keine Kanten sichtbar werden */
.hero-banner-img {
  position: absolute;
  inset: -5%;
  will-change: transform;
}

.hero-banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

/* Dunkler Schleier hinter Logo und Text + weicher Übergang in den Seitenhintergrund */
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 48%, rgba(var(--bg-rgb), 0.55), transparent 75%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.6) 0%, rgba(var(--bg-rgb), 0.15) 25%, rgba(var(--bg-rgb), 0.35) 60%, var(--bg) 100%);
}

.js .hero-banner-img img {
  animation: bg-in 1.8s var(--ease) both;
}

@keyframes bg-in {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: none; }
}

/* Langsam ziehender Nebel */
/* Nebelbänder (deco-fog-a/b) ziehen langsam hin und her */
@keyframes drift {
  from { transform: translateX(-6%); }
  to { transform: translateX(6%); }
}

.hero-fireflies {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.55);
  backdrop-filter: blur(6px);
  font-size: 0.68rem;
  color: var(--muted);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--glow-rgb), 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(var(--glow-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--glow-rgb), 0); }
}

/* Schriftzug mit Glüh-Aura und wanderndem Lichtreflex */
.hero-logo {
  position: relative;
  width: min(980px, 100%);
  margin: 0;
}

.hero-logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 50px rgba(var(--glow-rgb), 0.25));
}

.hero-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(235, 255, 200, 0.55) 50%, transparent 60%) no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  mix-blend-mode: overlay;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
  animation: glint 7s ease-in-out 1.6s infinite;
  pointer-events: none;
}

@keyframes glint {
  0% { background-position: 150% 0; }
  30%, 100% { background-position: -60% 0; }
}

.js .hero-logo {
  animation: forge 1.4s var(--ease) both;
}

@keyframes forge {
  from {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(12px) brightness(2.2);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.js .hero-inner > :not(.hero-logo) {
  animation: rise 1s var(--ease) both;
  animation-delay: 0.6s;
}

.js .hero-inner > .kicker { animation-delay: 0.2s; }
.js .hero-inner > .hero-actions { animation-delay: 0.75s; }
.js .hero-inner > .stats { animation-delay: 1s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.lead {
  max-width: 580px;
  margin-top: 22px;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: #c3d0b2;
}

.hero .lead {
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

/* Kennzahlen unter dem Hero */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 52px 0 0;
  padding: 0;
  list-style: none;
}

.stats li {
  display: grid;
  gap: 6px;
  padding: 0 clamp(20px, 4vw, 48px);
}

.stats li + li {
  border-left: 1px solid var(--line-strong);
}

.stats strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 14px rgba(var(--glow-rgb), 0.35));
}

.stats span {
  font-size: 0.66rem;
  color: var(--muted);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 0 rgba(143, 191, 90, 0.6);
  animation: pulse-live 2s infinite;
  vertical-align: middle;
}

@keyframes pulse-live {
  70% { box-shadow: 0 0 0 8px rgba(143, 191, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(143, 191, 90, 0); }
}

[data-live-status].offline .live-dot {
  background: var(--blood);
  animation: none;
}

/* ---------- Page Hero (Unterseiten) ---------- */

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 90px) 0 72px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 50% 90% at 80% 0%, rgba(var(--glow-rgb), 0.16), transparent 70%),
    linear-gradient(180deg, #08120a, var(--bg));
  border-bottom: 1px solid var(--line);
}

/* Riesiges Wasserzeichen hinter der Überschrift */
.page-hero::after {
  content: attr(data-watermark);
  position: absolute;
  left: -0.03em;
  bottom: -0.28em;
  z-index: -2;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(5rem, 18vw, 15rem);
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--leaf-rgb), 0.08);
  pointer-events: none;
  white-space: nowrap;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.5vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.6));
}

/* Variante mit Banner-Grafik: Der Titel steckt im Bild.
   Das Banner beginnt ganz oben hinter dem (transparenten) Header und läuft
   an allen Seiten weich in den Hintergrund aus. */
.page-hero-banner {
  padding: 0 0 64px;
  text-align: center;
  /* Transparent, damit es keine Kante zum Seitenhintergrund gibt */
  background: radial-gradient(ellipse 60% 45% at 50% 40%, rgba(var(--glow-rgb), 0.14), transparent 70%);
  border-bottom: 0;
}

.page-hero-banner::after {
  display: none;
}

/* Glühwürmchen und Nebel liegen über dem Banner */
.page-hero-banner .hero-fireflies,
/* Partikel nach unten weich ausblenden – keine sichtbare Startlinie */
.page-hero-banner .hero-fireflies {
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.page-hero .page-banner {
  position: relative;
  width: min(100%, 1920px);
  margin: 0 auto -48px;
  filter: none;
}

.page-banner img {
  width: 100%;
  height: auto;
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(180deg, transparent, #000 20%, #000 66%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(180deg, transparent, #000 20%, #000 66%, transparent);
  mask-composite: intersect;
}

.js .page-banner img {
  animation: banner-in 1.6s var(--ease) both;
}

/* Langsam heranzoomen und aus dem Dunkel aufglühen */
@keyframes banner-in {
  from { opacity: 0; transform: scale(1.08); filter: brightness(1.8) saturate(1.4) blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.page-hero-banner .container {
  position: relative;
  z-index: 2;
}

.js .page-hero-banner .container {
  animation: rise 1s var(--ease) 0.5s both;
}

.page-hero-banner .lead {
  margin-inline: auto;
}

/* Erster Abschnitt nach dem Seitenkopf: weniger Abstand */
.page-hero + .section {
  padding-top: clamp(40px, 6vw, 72px);
}

/* ---------- Laufband ---------- */

/* Moosbewachsenes Band mit geflochtenen Lianen oben und unten */
.marquee {
  position: relative;
  z-index: 2;
  margin-top: -64px;
  padding: 20px 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 35% 160% at 15% 50%, rgba(var(--glow-rgb), 0.1), transparent 70%),
    radial-gradient(ellipse 35% 160% at 85% 50%, rgba(var(--leaf-rgb), 0.08), transparent 70%),
    linear-gradient(180deg, #102310 0%, #070e07 100%);
  transform: rotate(-1.6deg) scale(1.03);
  box-shadow:
    0 20px 60px -20px rgba(0, 0, 0, 0.9),
    0 0 50px -20px rgba(var(--glow-rgb), 0.35),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Liane: zwei versetzte, verdrehte Stränge, die langsam "wachsen" */
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background:
    repeating-linear-gradient(120deg, var(--bark) 0 6px, #3a5420 6px 10px, var(--leaf) 10px 12px, var(--bark) 12px 16px) 0 0 / 200% 100%;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(var(--glow-rgb), 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  animation: marquee-vine 30s linear infinite;
}

.marquee::before { top: 0; }
.marquee::after { bottom: 0; animation-direction: reverse; }

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(var(--glow-rgb), 0.35));
}

/* Emblem als Trenner */
.marquee-track span::after {
  content: "";
  flex: none;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: url("/img/favicon-192.png") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(var(--glow-rgb), 0.8));
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes marquee-vine {
  to { background-position: 100% 0; }
}

/* ---------- Tour (Rahmen + Vorschau; Folien-Styles in tour.css) ---------- */

.tour-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(140deg, rgba(var(--leaf-light-rgb), 0.55), rgba(var(--leaf-rgb), 0.08) 40%, rgba(var(--glow-rgb), 0.5)) border-box;
  box-shadow: 0 30px 80px -30px rgba(var(--glow-rgb), 0.45);
}

.tour-frame:fullscreen {
  border: 0;
  border-radius: 0;
}

.tour-frame .reveal {
  visibility: hidden;
}

.tour.is-ready .tour-frame .reveal {
  visibility: visible;
}

.tour-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  transition: opacity 0.6s ease;
}

.tour-poster-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.tour-poster-logo {
  position: relative;
  width: min(60%, 640px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.7));
}

.tour-poster-hint {
  position: relative;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.tour.is-ready .tour-poster {
  opacity: 0;
  pointer-events: none;
}

.tour.is-failed .tour-poster-hint::after {
  content: " – konnte nicht geladen werden";
}

/* Glühwürmchen über den Folien */
.tour-fireflies {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tour-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .tour-frame { aspect-ratio: 720 / 1040; }
}

/* ---------- Abschnitte ---------- */

.section {
  padding: clamp(80px, 11vw, 140px) 0;
}

.section + .section {
  padding-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head > div {
  max-width: 700px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  color: var(--accent);
}

/* Ranke mit Blatt am Ende */
.eyebrow::before {
  content: "";
  width: 34px;
  height: 10px;
  background:
    radial-gradient(ellipse 5px 4px at calc(100% - 5px) 50%, var(--accent) 98%, transparent) no-repeat,
    linear-gradient(90deg, transparent, var(--accent)) left center / calc(100% - 8px) 2px no-repeat;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.02;
  padding-bottom: 0.06em;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  text-decoration: none;
  color: var(--leaf-light);
}

.link-arrow::after {
  content: "→";
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(6px);
}

/* Intro-Block: Überschrift links, Fließtext rechts */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 24px clamp(40px, 6vw, 96px);
}

.intro .section-head {
  margin-bottom: 0;
}

.intro-text {
  display: grid;
  gap: 16px;
  color: var(--muted);
}

.intro-text .intro-lead {
  font-size: 1.1rem;
  color: var(--text);
}

.intro-text strong {
  color: var(--leaf-light);
}

/* ---------- Karten (Bronze-Rahmen + Lichtkegel) ---------- */

.card {
  --mx: 50%;
  --my: 50%;
  --edge: rgba(var(--leaf-rgb), 0.32);
  position: relative;
  padding: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #0f1a10, #080f09) padding-box,
    linear-gradient(155deg, var(--edge), rgba(var(--leaf-rgb), 0.05) 35%, rgba(var(--leaf-rgb), 0.05) 65%, rgba(var(--glow-rgb), 0.25)) border-box;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}

/* Lichtkegel folgt der Maus (Position setzt main.js) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(var(--glow-rgb), 0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  --edge: rgba(var(--leaf-light-rgb), 0.6);
  box-shadow: 0 24px 60px -24px rgba(var(--glow-rgb), 0.35);
}

.card:hover::before {
  opacity: 1;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Feature-Karten */

.feature:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 40px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 25%, rgba(var(--leaf-light-rgb), 0.25), rgba(var(--bark-rgb), 0.12));
  border: 1px solid rgba(var(--leaf-rgb), 0.35);
  color: var(--leaf-light);
  box-shadow: 0 0 30px -6px rgba(var(--glow-rgb), 0.4);
  transform: rotate(-4deg);
  transition: transform 0.4s var(--ease);
}

.feature:hover .feature-icon {
  transform: rotate(0) scale(1.06);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--leaf-light);
}

.feature p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature .index {
  position: absolute;
  top: 26px;
  right: 26px;
  font-size: 0.7rem;
  color: rgba(var(--leaf-rgb), 0.45);
}

.feature-wide {
  grid-column: span 2;
}

.feature-wide p {
  max-width: 440px;
}

/* ---------- Dashboard-Übersicht ---------- */

.login-page.dashboard-home {
  display: block;
  padding: 150px 24px 80px;
}

.dashboard-home-inner { position: relative; width: min(1200px, 100%); margin: 0 auto; }
.dashboard-home-heading { max-width: 800px; margin-bottom: 42px; }
.dashboard-home-heading h1 { font-size: clamp(2.1rem, 4.5vw, 4rem); line-height: 1.15; color: var(--leaf-light); }
.dashboard-home-heading > p:last-child { margin-top: 20px; color: var(--muted); line-height: 1.7; }
.dashboard-home-heading strong { color: var(--leaf-light); }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.dashboard-tile { display: flex; flex-direction: column; text-decoration: none; min-width: 0; background: linear-gradient(145deg, #102010f5, #071009f5); border-color: var(--line-strong); }
.dashboard-tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.dashboard-tile-icon { display: grid; place-items: center; width: 54px; height: 54px; color: var(--accent); border: 1px solid var(--line-strong); border-radius: 14px; background: #8fd14b0d; }
.dashboard-tile-icon svg { width: 26px; height: 26px; }
.dashboard-tile-number { color: var(--muted); font-size: .75rem; letter-spacing: .18em; }
.dashboard-tile h2 { font-size: clamp(1.25rem, 1.7vw, 1.6rem); color: var(--leaf-light); overflow-wrap: anywhere; line-height: 1.4; }
.dashboard-tile > p { color: var(--muted); line-height: 1.7; margin: 16px 0 24px; flex: 1; }
.dashboard-tile-details { color: var(--muted); font-size: .75rem; line-height: 1.8; }
.dashboard-tile-action { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--leaf-light); border-top: 1px solid var(--line-strong); padding-top: 20px; margin-top: 24px; font-size: .85rem; font-weight: 600; }
.dashboard-tile-action > span { color: var(--accent); font-size: 1.3rem; }
.dashboard-tile:hover { transform: translateY(-4px); }
.dashboard-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.dashboard-home-back { display: inline-block; color: var(--muted); margin-top: 30px; font-size: .85rem; }
.dashboard-home-back:hover { color: var(--leaf-light); }
@media (max-width: 960px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .login-page.dashboard-home { padding: 120px 16px 48px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 18px; }
  .dashboard-home-heading { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-tile:hover { transform: none; }
}

/* ---------- Team ---------- */

.member {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.member-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

/* Avatar im Lianen-Ring – später das Discord-Profilbild statt des Anfangsbuchstabens */
.member-avatar {
  position: relative;
  flex: none;
  width: 92px;
  aspect-ratio: 299 / 328;
  transition: transform 0.5s var(--ease);
}

.member-ring {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

/* Liegt im Loch des Rings (Lage aus dem Bild gemessen) */
.member-face {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 62%;
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, hsl(var(--hue) 70% 55% / 0.55), transparent 70%),
    linear-gradient(160deg, #1d3318, #0a140b);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.8), 0 0 24px -4px hsl(var(--hue) 80% 55% / 0.7);
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  color: hsl(var(--hue) 80% 82%);
}

/* Das Loch im Ring ist gefüllt – das Gesicht liegt deshalb darüber */
.member-face {
  z-index: 1;
}

.member:hover .member-avatar {
  transform: rotate(-6deg) scale(1.06);
}

.member-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.team-sync-status {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

[data-team-empty] { color: var(--muted); }

.member-role {
  font-size: 0.66rem;
  color: var(--accent);
}

.member h3 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: auto;
  color: var(--leaf-light);
}

/* Schmale Karten (Team-Vorschau auf der Startseite): Avatar über dem Namen */
.grid-4 .member-head {
  flex-direction: column;
  align-items: flex-start;
}

.grid-4 .member-avatar {
  margin-bottom: 4px;
}

.grid-4 .member h3 {
  font-size: 1.3rem;
}

.member p {
  flex: 1;
  color: var(--muted);
  font-size: 0.95rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.62rem;
  color: #c8d6b4;
}

/* ---------- Call to Action ---------- */

.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 40px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid transparent;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, rgba(var(--glow-rgb), 0.22), transparent 60%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(var(--bark-rgb), 0.18), transparent 60%),
    linear-gradient(135deg, #0f1b0e, #060c07) padding-box,
    linear-gradient(140deg, rgba(var(--leaf-light-rgb), 0.6), rgba(var(--leaf-rgb), 0.08) 40%, rgba(var(--glow-rgb), 0.5)) border-box;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  padding-bottom: 0.06em;
}

.cta h2 em {
  font-style: normal;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
}

.cta p {
  margin-top: 18px;
  max-width: 480px;
  color: #c3d0b2;
}

.code-box {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px dashed rgba(var(--leaf-rgb), 0.45);
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.75);
  box-shadow: inset 0 0 40px rgba(var(--glow-rgb), 0.06);
}

.code-box p {
  margin: 0;
}

.code-box-label {
  font-size: 0.66rem;
  color: var(--muted);
}

.invite-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.invite-title em {
  font-style: normal;
  color: var(--leaf-light);
  text-shadow: 0 0 24px rgba(var(--glow-rgb), 0.6);
}

.invite-text {
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  line-height: 1.6;
}

.code-box .button {
  width: 100%;
}

/* ---------- Regeln ---------- */

.rules-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 18, 11, 0.9);
  backdrop-filter: blur(12px);
}

.search {
  position: relative;
  flex: 1 1 240px;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus {
  border-color: var(--leaf);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(var(--leaf-rgb), 0.12);
}

.rules-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 100px);
}

.toc-title {
  margin-bottom: 14px;
  font-size: 0.66rem;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.toc a {
  display: flex;
  gap: 12px;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.toc a span {
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 1.6em;
  opacity: 0.7;
}

.toc a:hover {
  color: var(--text);
}

.toc a.active {
  color: var(--leaf-light);
  border-color: var(--accent);
}

.toc a.dim {
  opacity: 0.25;
}

.rules-list {
  display: grid;
  gap: 16px;
}

.rule {
  padding: 30px 32px;
  scroll-margin-top: calc(var(--header-h) + 100px);
}

.rule[hidden] {
  display: none;
}

.rule:target {
  --edge: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 50px -10px rgba(var(--glow-rgb), 0.5);
}

.rule-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

/* Eingravierte Regelnummer in Kategoriefarbe */
.rule-num {
  flex: none;
  width: 4.2rem;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cat, var(--leaf));
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--cat, var(--leaf)) 40%, transparent));
}

.rule-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--leaf-light);
}

.rule-cat {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.62rem;
  color: var(--cat, var(--leaf));
}

.rule ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule li {
  position: relative;
  padding-left: 24px;
  color: #cfdabf;
}

.rule li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 0 100%;
  background: var(--cat, var(--leaf));
  box-shadow: 0 0 8px var(--cat, var(--leaf));
}

.rule li strong,
.rule-text strong,
.rule-note strong {
  color: var(--text);
}

/* Regeltitel in der Liste, z. B. "Kein Combat-Logging" */
.rule .rule-item-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--leaf-light);
}

.rule-text,
.rule-sub {
  color: #cfdabf;
}

.rule-sub {
  font-weight: 700;
  color: var(--text);
}

/* Abstand zwischen den Bausteinen einer Regel */
.rule > :not(.rule-head) + :not(.rule-head) {
  margin-top: 16px;
}

/* Discord-Logo statt Nummer */
.rule-num svg {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--cat);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--cat) 50%, transparent));
}

/* Grenzwerte, z. B. Gruppenlimits */
.limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.limit {
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--cat) 30%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--cat) 6%, transparent);
}

.limit strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.limit span {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* Filter-Buttons */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 0.6rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip:hover {
  color: var(--leaf-light);
  border-color: var(--leaf);
}

.chip[aria-pressed="true"] {
  background: var(--grad-button);
  border-color: #d4eba0;
  color: #0f1a07;
}

.rule mark {
  background: rgba(var(--glow-rgb), 0.35);
  color: #fff;
  border-radius: 3px;
  padding: 0 2px;
}

.cat-kampf { --cat: var(--blood); }
.cat-verhalten { --cat: var(--amber); }
.cat-gruppen { --cat: var(--moss); }
.cat-fairplay { --cat: var(--leaf); }
.cat-discord { --cat: var(--blurple); }

/* Strafstufen: Kacheln von Gelb bis Schwarz */
.rule .levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule .level {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
  border-top: 3px solid var(--tone);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--tone) 8%, transparent);
}

.rule .level::before {
  display: none;
}

.level span {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--tone);
}

.level strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--text);
}

.tone-yellow { --tone: #ffd23f; }
.tone-amber { --tone: var(--amber); }
.tone-orange { --tone: var(--lava); }
.tone-red { --tone: var(--blood); }
.tone-black { --tone: #b0a4a0; }

/* Hinweisbox über den Regeln */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 181, 71, 0.3);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: rgba(255, 181, 71, 0.07);
  color: #f3d9a8;
  font-size: 0.94rem;
}

.callout svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--amber);
}

.callout a {
  color: var(--leaf);
}

.callout-ok {
  border-color: rgba(143, 191, 90, 0.35);
  background: rgba(143, 191, 90, 0.07);
  color: #dfeccf;
}

.callout-ok svg {
  color: var(--moss);
}

/* Abschluss-Karte unter den Regeln */
.rule-final {
  --edge: rgba(var(--leaf-light-rgb), 0.7);
  background:
    radial-gradient(ellipse 60% 100% at 100% 0%, rgba(var(--glow-rgb), 0.18), transparent 60%),
    linear-gradient(180deg, #0f1a0e, #080f09) padding-box,
    linear-gradient(155deg, var(--edge), rgba(var(--leaf-rgb), 0.08) 40%, rgba(var(--glow-rgb), 0.5)) border-box;
}

.rule-final p {
  position: relative;
  z-index: 1;
  max-width: 62%;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--leaf-light);
}

/* Steintafel ragt rechts in die Grundsatz-Karte */
.rule-tablet {
  position: absolute;
  right: -20px;
  top: 50%;
  width: 235px;
  height: auto;
  translate: 0 -50%;
  rotate: 4deg;
  filter: brightness(0.85) drop-shadow(0 14px 24px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.rule-final .rule-head {
  position: relative;
  z-index: 1;
}

/* Dinos-Seite: Fußabdruck-Medaillon über dem Hinweis */
.empty-track {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.empty-track img {
  width: 90px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
  animation: track-bob 3s ease-in-out infinite alternate;
}

@keyframes track-bob {
  from { transform: translateY(0) rotate(-4deg); }
  to { transform: translateY(-6px) rotate(4deg); }
}

/* Krallen-Medaillon rechts im Kopf der Kampf-Regeln */
.rule-badge {
  flex: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  filter: drop-shadow(0 0 10px rgba(255, 74, 58, 0.35));
  transition: transform 0.4s var(--ease);
}

.rule:hover .rule-badge {
  transform: rotate(-12deg) scale(1.1);
}

@media (max-width: 640px) {
  .rule-final p { max-width: none; }
  .rule-tablet { width: 150px; right: -40px; top: 20px; translate: none; opacity: 0.35; }
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty-state[hidden] {
  display: none;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding: 64px 0 40px;
  margin-top: clamp(40px, 8vw, 100px);
  background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(var(--glow-rgb), 0.12), transparent 70%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--leaf), transparent);
  opacity: 0.5;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner p {
  margin-top: 14px;
  max-width: 340px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .brand img {
  height: 64px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-nav a {
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--leaf-light);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--leaf-light);
}

/* ---------- Dschungel-Dekoration (views/partials/deco.ejs) ---------- */

.deco {
  position: absolute;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Hängende Lianen am oberen Rand von Hero und Seitenbannern –
   nur an den Seiten sichtbar, die Mitte bleibt frei für Banner und Schriftzug */
.deco-top {
  top: 0;
  left: -6%;
  z-index: -1;
  width: 112%; /* breiter als der Bereich, damit beim Schwingen nie der Bildrand sichtbar wird */
  height: clamp(110px, 15vw, 220px);
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.5) saturate(0.9);
  -webkit-mask-image:
    linear-gradient(90deg, #000 0%, transparent 28%, transparent 72%, #000 100%),
    linear-gradient(180deg, #000 35%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, #000 0%, transparent 28%, transparent 72%, #000 100%),
    linear-gradient(180deg, #000 35%, transparent);
  mask-composite: intersect;
  transform-origin: 50% 0;
}

/* Leichtes Schwingen im Wind */
.deco-sway {
  animation: deco-sway 9s ease-in-out infinite alternate;
}

@keyframes deco-sway {
  from { transform: rotate(-0.4deg) translateX(-1%); }
  to { transform: rotate(0.4deg) translateX(1%); }
}

/* Farn-Unterholz als dunkler Vordergrund am unteren Rand */
.deco-bottom {
  bottom: 0;
  left: -5%;
  z-index: -1;
  width: 110%;
  height: clamp(110px, 15vw, 230px);
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.32) saturate(0.85);
}

/* In den Seitenbannern liegen Lianen und Farne über dem Bild, aber unter dem Text */
.page-hero-banner .deco {
  z-index: 1;
}

.page-hero-banner .deco-bottom {
  bottom: 20px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}

/* Nebelbänder im unteren Drittel – "screen" lässt nur das Helle durch, Dunkles verschwindet */
.deco-fog {
  left: -20%;
  width: 140%;
  height: auto;
  z-index: -1;
  mix-blend-mode: screen;
  animation: drift 40s ease-in-out infinite alternate;
}

.deco-fog-back {
  bottom: 18%;
  opacity: 0.22;
  animation-duration: 60s;
  animation-direction: alternate-reverse;
}

.deco-fog-front {
  bottom: -6%;
  opacity: 0.35;
}

.page-hero-banner .deco-fog-front {
  bottom: 14%;
  opacity: 0.25;
}

/* Lichtstrahl fällt von oben rechts durchs Blätterdach und atmet leicht */
.deco-ray {
  top: 0;
  right: 4%;
  z-index: -1;
  width: clamp(240px, 34vw, 520px);
  mix-blend-mode: screen;
  opacity: 0.4;
  transform-origin: 100% 0;
  animation: ray-breathe 9s ease-in-out infinite alternate;
}

@keyframes ray-breathe {
  from { opacity: 0.25; transform: rotate(-2deg); }
  to { opacity: 0.5; transform: rotate(2deg); }
}

/* Glühwürmchen-Schwarm schimmert in der Mitmach-Box */
.deco-cta-swarm {
  left: 25%;
  bottom: -10%;
  width: 60%;
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: swarm-glow 6s ease-in-out infinite alternate;
}

@keyframes swarm-glow {
  from { opacity: 0.2; transform: translateY(6px); }
  to { opacity: 0.45; transform: translateY(-6px); }
}

/* 404: Tropfen hängen von oben ins Bild */
.deco-lost-drops {
  top: 0;
  right: 0;
  width: clamp(260px, 45vw, 640px);
  opacity: 0.55;
  filter: brightness(0.7);
}

/* Mitmach-Box: Blätter wachsen in die obere rechte Ecke, Blüten lugen unten links hervor */
.cta > :not(.deco) {
  position: relative;
  z-index: 1;
}

.deco-cta-corner {
  top: -40px;
  right: -50px;
  width: clamp(180px, 22vw, 300px);
  scale: -1 1;
  filter: brightness(0.6) saturate(0.95);
  opacity: 0.9;
}

.deco-cta-flowers {
  bottom: -120px;
  left: -90px;
  width: clamp(160px, 18vw, 250px);
  rotate: 18deg;
  filter: brightness(0.7);
  opacity: 0.85;
}

/* Ast hängt über den Rand des Footers */
/* 404: Moosfelsen und Blätter */
.lost {
  position: relative;
  overflow: hidden;
}

.lost-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.lost-inner .lead {
  margin-top: 0;
}

.lost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.deco-lost-rocks {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  filter: brightness(0.8) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7));
}

.deco-lost-corner {
  top: 0;
  left: -60px;
  width: clamp(160px, 20vw, 300px);
  filter: brightness(0.45);
  opacity: 0.8;
}

@media (max-width: 760px) {
  .deco-top { height: 80px; }
  .deco-bottom { height: 80px; }
  .deco-cta-flowers { display: none; }
  .lost-inner { grid-template-columns: 1fr; }
}

/* ---------- Scroll-Reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), box-shadow 0.4s ease;
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

.js .feature[data-reveal].in:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .rules-layout { grid-template-columns: 1fr; }
  .toc { display: none; }

  .intro,
  .cta { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .brand img { height: 38px; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 24px;
    background: rgba(var(--bg-rgb), 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0.25s;
  }

  .nav-open .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav a:not(.button) {
    padding: 16px 4px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:not(.button)::after {
    display: none;
  }

  .site-nav .button {
    margin: 20px 0 0;
  }
}

@media (max-width: 640px) {
  .grid-4,
  .grid-2 { grid-template-columns: 1fr; }

  .feature-wide { grid-column: auto; }

  .rule { padding: 24px 20px; }
  .rule-head { gap: 14px; }
  .rule-num { width: 3.2rem; font-size: 2.1rem; }
  .rule .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero-banner .eyebrow { letter-spacing: 0.16em; }

  /* Schmale Bildschirme: Banner unter dem Header beginnen, sonst verdeckt der Header den Titel */
  .page-hero-banner { padding-top: calc(var(--header-h) - 8px); }
  .page-hero .page-banner { margin-bottom: -16px; }
  .page-banner img {
    -webkit-mask-image:
      linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
      linear-gradient(180deg, transparent, #000 8%, #000 72%, transparent);
    mask-image:
      linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
      linear-gradient(180deg, transparent, #000 8%, #000 72%, transparent);
  }
  .page-hero-banner .eyebrow::before { display: none; }
  .limits { grid-template-columns: 1fr; }
  .rules-toolbar { position: static; }
  .chips { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 2px; }
  .chip { flex: none; }

  .hero-actions .button { flex: 1 1 100%; }

  /* Hochformat: Ausschnitt zum T-Rex verschieben */
  .hero-banner-img img { object-position: 30% 40%; }

  .stats { flex-wrap: nowrap; }
  .stats li { padding: 0 12px; }
  .stats span { font-size: 0.58rem; letter-spacing: 0.08em; }

  .rules-toolbar { position: static; }
}

/* ---------- Seitenübergänge (native View Transitions) ---------- */

/* Browser ohne Unterstützung laden die Seite ganz normal */
@view-transition {
  navigation: auto;
}

/* Header bleibt beim Seitenwechsel stehen, nur der Inhalt blendet über */
.site-header {
  view-transition-name: site-header;
}

/* Nebel-Überblendung: alte Seite verschwindet im Dschungeldunst, neue tritt daraus hervor */
@property --mist {
  syntax: "<number>";
  initial-value: 0;
  inherits: false;
}

::view-transition {
  background:
    radial-gradient(ellipse 80% 60% at 50% 60%, rgba(150, 200, 150, calc(var(--mist) * 0.16)), transparent 70%),
    radial-gradient(ellipse 50% 35% at 30% 70%, rgba(var(--glow-rgb), calc(var(--mist) * 0.1)), transparent 70%),
    var(--bg);
  animation: mist-rise 1.1s ease-out both;
}

::view-transition-old(root),
::view-transition-new(root) {
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation: page-fade-out 0.5s cubic-bezier(0.5, 0, 0.75, 0) both;
}

::view-transition-new(root) {
  animation: page-fade-in 0.85s var(--ease) 0.2s both;
}

::view-transition-group(site-header) {
  animation-duration: 0.4s;
  z-index: 2;
}

@keyframes mist-rise {
  0% { --mist: 0; }
  40% { --mist: 1; }
  100% { --mist: 0; }
}

@keyframes page-fade-out {
  to {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(10px) brightness(0.6);
  }
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: scale(1.03);
    filter: blur(12px) brightness(1.3) saturate(0.7);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- Weiche Ränder für alle Effekt-Ebenen ----------
   Nebel, Licht und Schwärme haben einen halbtransparenten Dunst bis zum Bildrand –
   ohne Maske wird dieser Rand als harte Kante sichtbar. */
.deco-fog,
.deco-cta-swarm {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%);
}

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

.login-page {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 85svh;
  padding: calc(var(--header-h) + 64px) 24px 80px;
  overflow: hidden;
}

.login-background {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      180deg,
      rgba(5, 10, 6, 0.6),
      rgba(5, 10, 6, 0.88) 75%,
      var(--bg)
    ),
    url("/img/hero-bg-1400.webp") center / cover no-repeat;
}

.login-page > .deco-fog {
  z-index: -1;
  opacity: 0.2;
}

.login-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 560px);
  padding: clamp(28px, 6vw, 56px);
  overflow: hidden;
  text-align: center;
  background: rgba(8, 19, 10, 0.9);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.login-card > :not(.deco) {
  position: relative;
  z-index: 1;
}

.login-card .deco-cta-corner {
  opacity: 0.45;
}

.login-card h1 {
  margin: 8px 0 24px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 1.15;
  color: var(--leaf-light);
}

.login-description {
  color: var(--muted);
  line-height: 1.7;
}

.login-sign {
  display: block;
  width: min(100%, 360px);
  margin: 28px auto 12px;
  padding: 0;
  border: 0;
  background: transparent;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.login-sign img {
  display: block;
  width: 100%;
  height: auto;
}

.login-sign:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.login-sign:not(:disabled):hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 0 18px rgba(143, 209, 75, 0.3));
}

.login-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.login-back {
  display: inline-block;
  margin-top: 28px;
  color: var(--leaf-light);
}

.login-error {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(218, 153, 77, 0.4);
  border-radius: 12px;
  background: rgba(77, 45, 14, 0.3);
  text-align: left;
}

.login-error strong {
  color: #efca91;
}

.login-error p {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.logout-sign {
  display: block;
  width: min(60vw, 240px);
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* Im Header sitzt das Schild ohne den Abstand der bisherigen Dashboard-Karte. */
.dashboard-header .brand {
  flex-shrink: 0;
}

.dashboard-logout {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0 0 0 12px;
}

.dashboard-header .logout-sign {
  width: 150px;
  min-height: 44px;
  margin: 0;
}

/* Die längeren Dashboard-Menüpunkte brauchen früher das mobile Menü. */
@media (max-width: 1000px) {
  .dashboard-header .nav-toggle {
    display: block;
  }

  .dashboard-header .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 24px;
    background: rgba(var(--bg-rgb), 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0.25s;
  }

  .nav-open .dashboard-header .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .dashboard-header .site-nav a:not(.button) {
    padding: 16px 4px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-header .site-nav a:not(.button)::after {
    display: none;
  }

  .dashboard-logout {
    justify-content: flex-end;
    margin: 16px 0 0;
  }
}

.logout-sign img {
  display: block;
  width: 100%;
  height: auto;
}

.logout-sign:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 0 14px rgba(143, 209, 75, 0.3));
}

.logout-sign:active {
  transform: translateY(0) scale(0.97);
}

.logout-sign:focus-visible {
  outline: 2px solid var(--leaf-light);
  outline-offset: 6px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .logout-sign {
    transition: none;
  }

  .logout-sign:hover,
  .logout-sign:active {
    transform: none;
  }
}

.welcome-overview {
  width: min(100%, 760px);
}

.welcome-values {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px 24px;
  margin: 32px 0 0;
  text-align: left;
}

.welcome-values dt {
  color: var(--leaf-light);
  font-weight: 600;
}

.welcome-values dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.welcome-description {
  white-space: pre-wrap;
}

@media (max-width: 540px) {
  .welcome-values {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .welcome-values dd {
    margin-bottom: 16px;
  }
}

/* ---------- Welcome-Editor ---------- */

.welcome-form {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  text-align: left;
}

.welcome-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.welcome-field label,
.welcome-toggle {
  color: var(--leaf-light);
  font-weight: 600;
}

.welcome-field input,
.welcome-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(5, 10, 6, 0.65);
  color: var(--text);
  font: inherit;
}

.welcome-field textarea {
  min-height: 150px;
  resize: vertical;
}

.welcome-field input:focus-visible,
.welcome-field textarea:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
}

.welcome-field small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.welcome-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-toggle input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--leaf);
}

.welcome-form > .button {
  justify-self: start;
}

.welcome-feedback {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  text-align: left;
}

.welcome-feedback-success {
  background: rgba(100, 160, 60, 0.12);
  color: var(--leaf-light);
}

.welcome-feedback-error {
  background: rgba(160, 80, 30, 0.15);
  color: #efca91;
}

.welcome-feedback-error ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.welcome-feedback-error li + li {
  margin-top: 6px;
}

.welcome-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0b160d;
  color: var(--text);
  font: inherit;
  color-scheme: dark;
}

.welcome-field select:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
}

.welcome-field .welcome-color-picker {
  appearance: none;
  -webkit-appearance: none;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.welcome-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.welcome-color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.welcome-color-picker::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.welcome-field select:disabled,
.welcome-form > button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Welcome-Embed-Vorschau ---------- */

.welcome-editor {
  width: min(100%, 1180px);
}

.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-top: 32px;
}

.welcome-layout .welcome-form {
  margin-top: 0;
}

.welcome-preview {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  min-width: 0;
  text-align: left;
}

.welcome-preview h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--leaf-light);
}

.welcome-preview-hint {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.discord-preview {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #41434a;
  border-radius: 12px;
  background: #313338;
  color: #dbdee1;
  font-family: var(--font-body);
}

.discord-message-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.discord-message-heading strong {
  color: #f2f3f5;
}

.discord-bot-badge {
  padding: 1px 5px;
  border-radius: 4px;
  background: #5865f2;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
}

.discord-preview-time {
  color: #b5bac1;
  font-size: 0.75rem;
}

.discord-embed {
  padding: 16px;
  border-left: 4px solid #8fd14b;
  border-radius: 4px;
  background: #2b2d31;
}

.discord-embed-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.discord-embed-copy {
  flex: 1;
  min-width: 0;
}

.discord-embed-copy h3 {
  margin: 0 0 8px;
  color: #f2f3f5;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.discord-embed-copy p {
  margin: 0;
  color: #dbdee1;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-embed-thumbnail {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: contain;
}

.discord-embed-image {
  width: 100%;
  max-height: 300px;
  margin-top: 16px;
  border-radius: 6px;
  object-fit: contain;
}

.discord-preview img[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .welcome-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-preview {
    position: static;
  }
}

/* ---------- Getrennte Editor- und Vorschau-Karten ---------- */

.role-button-settings {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.role-button-settings legend {
  padding-inline: 8px;
  color: var(--leaf-light);
}

.role-button-list {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.role-button-row {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.role-button-row > .button {
  justify-self: end;
}

.role-button-settings > small {
  display: block;
  margin-bottom: 0;
}

.role-preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.role-preview-button {
  max-width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  background: #4e5058;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  opacity: 1;
}

.role-preview-accept {
  background: #248046;
}

.panel-status {
  margin: 16px 0;
  color: var(--leaf-light);
  font-size: 0.85rem;
}

.role-panel-editor button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.welcome-test {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.welcome-test-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.welcome-test-form > .button {
  justify-self: start;
  white-space: normal;
  text-align: center;
}

.welcome-test-form > small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.welcome-test-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-page.welcome-page {
  display: block;
  overflow: visible;
}

.welcome-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  width: min(100%, 1240px);
  margin-inline: auto;
}

.welcome-workspace .welcome-form-card,
.welcome-workspace .welcome-preview {
  width: 100%;
  min-width: 0;
  padding: clamp(24px, 3vw, 40px);
}

.welcome-form-card h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.welcome-workspace .welcome-preview {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  text-align: left;
}

@media (max-width: 960px) {
  .welcome-workspace {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }

  .welcome-workspace .welcome-preview {
    position: static;
  }
}

.member {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* Eigener Bereich unter den Tags für die untere Dekoration. */
  padding-bottom: 76px;
}

.deco-member-corner,
.deco-member-flowers {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.member > .member-head,
.member > p,
.member > .tags {
  position: relative;
  z-index: 1;
}

.deco-member-corner {
  top: -30px;
  right: -30px;
  left: auto;
  width: 140px;
  opacity: 0.8;
  mask-image: none;
  transform: scaleX(-1);
}

.deco-member-flowers {
  bottom: -40px;
  left: -30px;
  right: auto;
  width: 121px;
  opacity: 0.75;
  mask-image: linear-gradient(to top, #000 45%, transparent 95%);
}
