/* ==========================================================================
   Nyuszo – Link-Seite & RebirthMC
   Aufbau: Schriften · Design-Variablen (hell/dunkel) · Basis · Hintergrund ·
           Layout · Komponenten · Animationen · Seitenwechsel · Reduzierte Bewegung
   ========================================================================== */

/* ---------- Schriften (lokal, variabel) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Variablen ---------- */
:root {
  /* Abstände */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --gutter: 16px;
  --content: 520px;

  /* Rundungen */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Bewegung */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --dur-fast: 120ms;
  --dur: 240ms;
  --dur-enter: 520ms;
  --stagger: 45ms;

  /* Typografie */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Farben ----------
   Modus: color-scheme steuert light-dark(). „System“ = beide erlaubt, der Browser wählt.
   Akzentfarbe: ein Farbton (--h) im OKLCH-Farbraum, alle Akzenttöne werden daraus berechnet. */
:root { color-scheme: light dark; --h: 125; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Akzentfarben (ids wie in content/site.mjs) */
:root[data-accent="tuerkis"] { --h: 190; }
:root[data-accent="blau"] { --h: 255; }
:root[data-accent="lila"] { --h: 300; }
:root[data-accent="rosa"] { --h: 350; }
:root[data-accent="orange"] { --h: 50; }

/* Ersatz für ältere Browser ohne light-dark()/OKLCH: festes helles Grün */
:root {
  --bg: #f5f3ea;
  --surface: #fffdf7;
  --surface-glass: rgb(255 253 247 / 0.75);
  --panel-bg: rgb(255 253 247 / 0.55);
  --panel-edge: rgb(255 255 255 / 0.8);
  --panel-inset: rgb(255 255 255 / 0.9);
  --field: #f5f3ea;
  --ink: #1f231b;
  --ink-2: #474d3e;
  --ink-3: #5f6551;
  --line: #e3e1d1;
  --line-strong: #cfccb8;
  --accent: #4b681f;
  --accent-muted: #7c9c3c;
  --accent-soft: #e4eecb;
  --accent-softer: #f1f6e2;
  --accent-edge: #bcd77a;
  --accent-fill: #d4e79a;
  --accent-fill-hover: #bcd77a;
  --accent-on: #243414;
  --done-fill: #4b681f;
  --done-on: #fbfaf4;
  --brand: #d4e79a;
  --brand-2: #bcd77a;
  --brand-hi: #eef6d2;
  --brand-deep: #243414;
  --brand-hover: #e2f0b4;
  --marker: rgb(212 231 154 / 0.95);
  --halo: rgb(212 231 154 / 0.75);
  --ring-track: rgb(75 104 31 / 0.16);
  --emblem-a: #e4eecb;
  --emblem-b: #d4e79a;
  --emblem-gloss: rgb(255 255 255 / 0.6);
  --feature-a: #42601f;
  --feature-b: #36501a;
  --feature-c: #243414;
  --feature-edge: transparent;
  --blob-1: rgb(212 231 154 / 0.85);
  --blob-2: rgb(242 220 205 / 0.95);
  --blob-3: rgb(217 238 223 / 0.9);
  --dots: rgb(75 104 31 / 0.2);
  --shape: rgb(124 156 60 / 0.38);
  --pixel: rgb(188 215 122 / 0.8);
  --sheen: rgb(255 255 255 / 0.5);
  --tint-twitch: #ece5f8;   --tint-twitch-ink: #6a4bbd;
  --tint-tiktok: #e3f0ef;   --tint-tiktok-ink: #1f231b;
  --tint-instagram: #f8e3dc; --tint-instagram-ink: #b23f63;
  --tint-discord: #e6e8fa;  --tint-discord-ink: #4f5bd5;
  --hint-bg: #fbefd9;
  --hint-ink: #5b4413;
  --danger: #a3271f;
  --danger-bg: #fbe4df;
  --toast-bg: #1f231b;
  --toast-ink: #fbfaf4;
  --menu-bg: #fffdf7;
  --shell: rgb(255 255 255 / 0.5);
  --ring: rgb(31 35 27 / 0.08);
  --core-hi: rgb(255 255 255 / 0.9);
  --spot: rgb(212 231 154 / 0.5);
  --noise-opacity: 0.5;
  --shadow-sm: 0 1px 2px rgb(36 52 20 / 0.06), 0 2px 10px -2px rgb(36 52 20 / 0.05);
  --shadow-md: 0 2px 4px rgb(36 52 20 / 0.05), 0 14px 30px -10px rgb(36 52 20 / 0.2);
  --shadow-lg: 0 4px 8px rgb(36 52 20 / 0.06), 0 24px 48px -14px rgb(36 52 20 / 0.28);
}

@supports (color: light-dark(#000, #fff)) and (color: oklch(0.5 0.1 120)) {
  :root {
    --bg: light-dark(#f5f3ea, oklch(0.19 0.013 var(--h)));
    --surface: light-dark(#fffdf7, oklch(0.232 0.017 var(--h)));
    --surface-glass: light-dark(rgb(255 253 247 / 0.82), oklch(0.25 0.018 var(--h) / 0.85));
    --panel-bg: light-dark(rgb(255 253 247 / 0.55), oklch(0.232 0.017 var(--h) / 0.6));
    --panel-edge: light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.07));
    --panel-inset: light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.05));
    --field: light-dark(#f5f3ea, oklch(0.202 0.014 var(--h)));
    --ink: light-dark(#1f231b, oklch(0.95 0.014 var(--h)));
    --ink-2: light-dark(#474d3e, oklch(0.84 0.024 var(--h)));
    --ink-3: light-dark(#5f6551, oklch(0.73 0.03 var(--h)));
    --line: light-dark(#e3e1d1, oklch(0.303 0.022 var(--h)));
    --line-strong: light-dark(#cfccb8, oklch(0.374 0.028 var(--h)));

    --accent: light-dark(oklch(0.478 0.105 var(--h)), oklch(0.838 0.123 var(--h)));
    --accent-muted: light-dark(oklch(0.648 0.129 var(--h)), oklch(0.7 0.12 var(--h)));
    --accent-soft: light-dark(oklch(0.932 0.047 var(--h)), oklch(0.296 0.043 var(--h)));
    --accent-softer: light-dark(oklch(0.964 0.027 var(--h)), oklch(0.262 0.036 var(--h)));
    --accent-edge: light-dark(oklch(0.838 0.123 var(--h)), oklch(0.549 0.114 var(--h)));
    --accent-fill: light-dark(oklch(0.896 0.101 var(--h)), oklch(0.869 0.112 var(--h)));
    --accent-fill-hover: light-dark(oklch(0.838 0.123 var(--h)), oklch(0.91 0.09 var(--h)));
    --accent-on: light-dark(oklch(0.302 0.057 var(--h)), oklch(0.247 0.046 var(--h)));
    --done-fill: var(--accent);
    --done-on: light-dark(#fbfaf4, oklch(0.247 0.046 var(--h)));

    --brand: oklch(0.896 0.101 var(--h));
    --brand-2: oklch(0.838 0.123 var(--h));
    --brand-hi: oklch(0.958 0.048 var(--h));
    --brand-deep: oklch(0.302 0.057 var(--h));
    --brand-hover: oklch(0.93 0.08 var(--h));

    --marker: light-dark(oklch(0.896 0.101 var(--h) / 0.95), oklch(0.648 0.129 var(--h) / 0.5));
    --halo: light-dark(oklch(0.896 0.101 var(--h) / 0.75), oklch(0.7 0.12 var(--h) / 0.22));
    --ring-track: light-dark(oklch(0.478 0.105 var(--h) / 0.16), oklch(0.838 0.123 var(--h) / 0.18));
    --emblem-a: light-dark(oklch(0.932 0.047 var(--h)), oklch(0.3 0.045 var(--h)));
    --emblem-b: light-dark(oklch(0.896 0.101 var(--h)), oklch(0.36 0.06 var(--h)));
    --emblem-gloss: light-dark(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.06));
    --feature-a: light-dark(oklch(0.45 0.099 var(--h)), oklch(0.48 0.105 var(--h)));
    --feature-b: light-dark(oklch(0.397 0.086 var(--h)), oklch(0.397 0.086 var(--h)));
    --feature-c: light-dark(oklch(0.302 0.057 var(--h)), oklch(0.28 0.055 var(--h)));
    --feature-edge: light-dark(transparent, oklch(0.838 0.123 var(--h) / 0.18));

    --blob-1: light-dark(oklch(0.91 0.09 var(--h) / 0.85), oklch(0.6 0.12 var(--h) / 0.26));
    --blob-2: light-dark(rgb(242 220 205 / 0.95), rgb(150 100 70 / 0.2));
    --blob-3: light-dark(oklch(0.93 0.04 calc(var(--h) + 40) / 0.9), oklch(0.55 0.09 calc(var(--h) + 40) / 0.2));
    --dots: light-dark(oklch(0.478 0.105 var(--h) / 0.2), oklch(0.838 0.123 var(--h) / 0.13));
    --shape: light-dark(oklch(0.648 0.129 var(--h) / 0.38), oklch(0.838 0.123 var(--h) / 0.22));
    --pixel: light-dark(oklch(0.838 0.123 var(--h) / 0.8), oklch(0.838 0.123 var(--h) / 0.35));
    --sheen: light-dark(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.06));

    --tint-twitch: light-dark(#ece5f8, #2a2440);   --tint-twitch-ink: light-dark(#6a4bbd, #bba8f7);
    --tint-tiktok: light-dark(#e3f0ef, #1e2c2b);   --tint-tiktok-ink: light-dark(#1f231b, #eaf2f1);
    --tint-instagram: light-dark(#f8e3dc, #3a2229); --tint-instagram-ink: light-dark(#b23f63, #f39ab7);
    --tint-discord: light-dark(#e6e8fa, #242948);  --tint-discord-ink: light-dark(#4f5bd5, #a9b0ff);

    --hint-bg: light-dark(#fbefd9, #3a2f17);
    --hint-ink: light-dark(#5b4413, #f3dfb0);
    --danger: light-dark(#a3271f, #ffb3a7);
    --danger-bg: light-dark(#fbe4df, #3d1d19);
    --toast-bg: light-dark(#1f231b, oklch(0.3 0.02 var(--h)));
    --toast-ink: light-dark(#fbfaf4, oklch(0.95 0.014 var(--h)));
    --menu-bg: light-dark(#fffdf7, oklch(0.256 0.02 var(--h)));
    --shell: light-dark(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.04));
    --ring: light-dark(oklch(0.3 0.03 var(--h) / 0.09), rgb(255 255 255 / 0.08));
    --core-hi: light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.06));
    --spot: light-dark(oklch(0.896 0.101 var(--h) / 0.55), oklch(0.7 0.12 var(--h) / 0.16));
    --noise-opacity: 0.45;

    --shadow-sm: 0 1px 2px light-dark(oklch(0.3 0.05 var(--h) / 0.06), rgb(0 0 0 / 0.3)), 0 2px 10px -2px light-dark(oklch(0.3 0.05 var(--h) / 0.05), rgb(0 0 0 / 0.25));
    --shadow-md: 0 2px 4px light-dark(oklch(0.3 0.05 var(--h) / 0.05), rgb(0 0 0 / 0.25)), 0 14px 30px -10px light-dark(oklch(0.3 0.05 var(--h) / 0.2), rgb(0 0 0 / 0.55));
    --shadow-lg: 0 4px 8px light-dark(oklch(0.3 0.05 var(--h) / 0.06), rgb(0 0 0 / 0.3)), 0 24px 48px -14px light-dark(oklch(0.3 0.05 var(--h) / 0.28), rgb(0 0 0 / 0.65));
  }
}

/* Ohne light-dark() bleibt die Seite hell – dann die Darstellungsauswahl ausblenden */
@supports not ((color: light-dark(#000, #fff)) and (color: oklch(0.5 0.1 120))) {
  :root { color-scheme: light; }
  [data-appearance-dropdown] { display: none !important; }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; --content: 560px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 40px; --content: 1120px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Hintergrundfarbe liegt auf <html>, damit die Farbflächen dahinter sichtbar bleiben */
  color: var(--ink);
  font: 400 1rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, p, ol, ul { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
.sprite { display: none; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

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

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

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 20;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; }

::selection { background: var(--accent-fill); color: var(--accent-on); }

/* ---------- Hintergrund ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

/* Farbflächen: EINE Ebene mit drei Verläufen statt drei riesiger, einzeln bewegter Ebenen.
   Spart Grafikspeicher und hält die Seite flüssig; Bewegung ist sanft und endet nach ca. 4 Minuten. */
.glow {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(circle 36vmax at 12vmax 4vmax, var(--blob-1), transparent),
    radial-gradient(circle 36vmax at calc(100% - 4vmax) calc(100% + 2vmax), var(--blob-2), transparent),
    radial-gradient(circle 27vmax at calc(100% + 2vmax) calc(18% + 27vmax), var(--blob-3), transparent);
  animation: drift 30s ease-in-out 8 alternate both;
}

/* Feines Papierkorn: statisch, ohne Blend-Modus, als eigene Ebene (wird nur einmal gezeichnet) */
.grain {
  position: absolute;
  inset: 0;
  opacity: var(--grain-opacity, 0.4);
  transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0 0 0 -0.24'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .grain { filter: invert(1); --grain-opacity: 0.3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grain { filter: invert(1); --grain-opacity: 0.3; }
}

.dots {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 70vw);
  height: 460px;
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.6px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 100% 0, #000, transparent 70%);
  mask-image: radial-gradient(circle at 100% 0, #000, transparent 70%);
}

.shape { position: absolute; display: none; }
.shape--ring {
  left: 6%;
  bottom: 14%;
  width: 96px;
  height: 96px;
  border: 1.5px solid var(--shape);
  border-radius: 50%;
}
.shape--square {
  right: 9%;
  bottom: 22%;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--shape);
  border-radius: 6px;
  transform: rotate(18deg);
}
.shape--pixels {
  left: 44%;
  top: 9%;
  width: 24px;
  height: 24px;
  background:
    linear-gradient(var(--pixel), var(--pixel)) 0 0 / 8px 8px no-repeat,
    linear-gradient(var(--pixel), var(--pixel)) 16px 8px / 8px 8px no-repeat,
    linear-gradient(var(--pixel), var(--pixel)) 8px 16px / 8px 8px no-repeat;
  opacity: 0.8;
}
@media (min-width: 1024px) {
  .shape { display: block; }
}

/* ---------- Layout ---------- */
.topbar,
.page,
.signature {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: max(12px, env(safe-area-inset-top));
  margin-bottom: var(--space-4);
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--topbar-bg, var(--surface-glass));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--core-hi), var(--shadow-sm);
}
.topbar .pill,
.topbar .icon-btn {
  border-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.topbar .brand { padding-left: 4px; }
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.page {
  flex: 1;
  padding-block: var(--space-4) var(--space-7);
}

.layout {
  display: grid;
  gap: var(--space-6);
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
}
.hero:not(.hero--message) {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "emblem title"
    "eyebrow eyebrow"
    "lead lead"
    "chips chips";
  align-items: center;
  justify-items: start;
  column-gap: var(--space-4);
  text-align: left;
}
.hero:not(.hero--message) > .avatar,
.hero:not(.hero--message) > .emblem { grid-area: emblem; width: 76px; margin: 0; }
.hero:not(.hero--message) > .emblem { border-radius: 22px; }
.hero:not(.hero--message) > .title { grid-area: title; font-size: clamp(2.125rem, 1.25rem + 4.2vw, 3.25rem); }
.hero:not(.hero--message) > .eyebrow { grid-area: eyebrow; margin: var(--space-4) 0 0; }
.hero:not(.hero--message) > .lead { grid-area: lead; margin-top: var(--space-3); text-wrap: pretty; }
.hero:not(.hero--message) > .chips { grid-area: chips; justify-content: start; }

.panel {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

@media (min-width: 1024px) {
  .topbar { margin-top: var(--space-5); margin-bottom: var(--space-5); }
  .page { display: grid; align-items: center; padding-block: var(--space-6) var(--space-8); }
  .layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(48px, 6vw, 96px);
    align-items: center;
  }
  .hero {
    justify-items: start;
    text-align: left;
  }
  .hero:not(.hero--message) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "emblem" "eyebrow" "title" "lead" "chips";
  }
  .hero:not(.hero--message) > .avatar,
  .hero:not(.hero--message) > .emblem { width: 152px; margin-bottom: var(--space-6); }
  .hero:not(.hero--message) > .emblem { border-radius: 40px; }
  .hero:not(.hero--message) > .eyebrow { margin: 0 0 var(--space-4); }
  .hero:not(.hero--message) > .title { font-size: clamp(2.875rem, 1.5rem + 6vw, 5.75rem); }
  .hero:not(.hero--message) > .lead { margin-top: var(--space-4); }
  .panel {
    position: relative;
    gap: var(--space-4);
  }
  .panel::before {
    content: "";
    position: absolute;
    inset: -12% -10%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--halo), transparent);
    opacity: 0.55;
    pointer-events: none;
  }
}

/* ---------- Kopfzeile ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}
.brand__mark {
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 10px;
  background: var(--brand);
  color: #1f231b;
  box-shadow: inset 0 0 0 1px rgb(75 104 31 / 0.15);
}

.pill,
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}
.pill .icon { width: 1.1em; height: 1.1em; }
.pill:focus-visible,
.icon-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pill--back { padding-left: var(--space-3); }
@media (max-width: 419px) {
  .pill--share { width: 44px; padding: 0; }
  .pill--share .pill__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.pill__more { display: none; }
@media (min-width: 420px) {
  .pill__more { display: inline; }
}

/* Wechselnde Beschriftung ohne Layoutsprung: beide Zustände liegen übereinander */
.swap { display: inline-grid; }
.swap > * {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: opacity var(--dur-fast) ease, transform var(--dur) var(--ease-spring);
}
.swap__b,
.swap__busy { opacity: 0; visibility: hidden; transform: scale(0.85); }
.is-done .swap__a,
.is-busy .swap__a { opacity: 0; visibility: hidden; transform: scale(0.85); }
.is-busy .swap__busy { opacity: 1; visibility: visible; transform: none; }
.is-done .swap__b { opacity: 1; visibility: visible; transform: none; }
.swap--inline > * { justify-content: start; }

/* ---------- Auswahlmenüs (Sprache, Darstellung) ---------- */
.dropdown {
  position: relative;
  display: none; /* ohne JavaScript nicht bedienbar */
}
.js .dropdown { display: block; }

.icon-btn {
  width: 44px;
  padding: 0;
}
.icon-btn .icon { width: 20px; height: 20px; color: var(--accent); }
.icon-btn--text {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.theme__current { display: none; }
:root:not([data-theme-pref]) .theme__current--system,
:root[data-theme-pref="system"] .theme__current--system,
:root[data-theme-pref="light"] .theme__current--light,
:root[data-theme-pref="dark"] .theme__current--dark { display: block; }

.menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  min-width: 196px;
  padding: 6px;
  border: 0;
  border-radius: 22px;
  background: var(--menu-bg);
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--core-hi), var(--shadow-lg);
  transform-origin: top right;
}
.menu[hidden] { display: none; }
.menu__title {
  padding: 8px 12px 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.menu__label {
  padding: 10px 12px 4px;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 600;
}
.menu__group { display: grid; gap: 2px; }
.menu__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease;
}
.menu__item .icon { width: 18px; height: 18px; color: var(--ink-3); }
.menu__code {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-softer);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.menu__item .menu__check { color: var(--accent); opacity: 0; }
.menu__item[aria-pressed="true"],
.menu__item[aria-current="true"] { background: var(--accent-softer); }
.menu__item[aria-pressed="true"] .icon,
.menu__item[aria-current="true"] .icon { color: var(--accent); }
.menu__item[aria-pressed="true"] .menu__check,
.menu__item[aria-current="true"] .menu__check { opacity: 1; }
.menu__item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.swatches {
  display: grid;
  grid-template-columns: repeat(6, 44px);
  justify-content: space-between;
  gap: 0;
  padding: 2px 4px 6px;
}
.swatch {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.swatch::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease-out);
}
.swatch[aria-pressed="true"]::before { box-shadow: 0 0 0 2px var(--menu-bg), 0 0 0 4px var(--swatch); }
.swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }
.swatch--gruen { --swatch: #7d9c3b; }
.swatch--tuerkis { --swatch: #00a59e; }
.swatch--blau { --swatch: #5591dd; }
.swatch--lila { --swatch: #9c7bd2; }
.swatch--rosa { --swatch: #c96b9a; }
.swatch--orange { --swatch: #cd753f; }

/* ---------- Sprachhinweis ---------- */
.langhint {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin: 0 auto var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 1px solid var(--accent-edge);
  border-radius: var(--radius);
  background: var(--accent-softer);
  color: var(--ink);
  font-size: 0.9375rem;
}
.langhint[hidden] { display: none; }
.langhint__text { flex: 1 1 14rem; }
.langhint__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--accent-on);
  font-weight: 700;
  text-decoration: none;
}
.langhint__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.avatar {
  position: relative;
  width: 116px;
  aspect-ratio: 1;
  margin-bottom: var(--space-5);
  view-transition-name: emblem;
}
.avatar::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo), transparent);
  z-index: -1;
}
.avatar__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform 1.2s var(--ease-out);
}
.avatar__track { fill: none; stroke: var(--ring-track); stroke-width: 1.5; }
.avatar__arc {
  fill: none;
  stroke: var(--accent-muted);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 24 76;
  transform-origin: 60px 60px;
  transform: rotate(-70deg);
}
.avatar__disc {
  position: absolute;
  inset: 9px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, var(--brand-hi) 0, var(--brand) 52%, var(--brand-2) 100%);
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / 0.5), var(--shadow-md);
}
.avatar__mono { width: 54%; height: 54%; color: #1f231b; }

.emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  aspect-ratio: 1;
  margin-bottom: var(--space-5);
  border-radius: 32px;
  background:
    linear-gradient(var(--emblem-gloss), transparent) top / 100% 50% no-repeat,
    linear-gradient(145deg, var(--emblem-a), var(--emblem-b));
  box-shadow: inset 0 0 0 1px var(--ring-track), var(--shadow-md);
  view-transition-name: emblem;
}
.emblem::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo), transparent);
}
.emblem__cube { width: 66%; height: 66%; filter: drop-shadow(0 6px 8px rgb(20 30 10 / 0.25)); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  margin-bottom: var(--space-4);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-softer);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow--list { gap: 0.9em; }

.title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.875rem, 1.5rem + 6vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
.marker {
  padding-inline: 0.06em;
  background: linear-gradient(transparent 64%, var(--marker) 64%, var(--marker) 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lead {
  max-width: 36ch;
  text-wrap: balance;
  margin-top: var(--space-4);
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.6;
}
@media (min-width: 1024px) {
  .avatar, .emblem { width: 152px; margin-bottom: var(--space-6); }
  .emblem { border-radius: 40px; }
  .lead { font-size: 1.1875rem; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.chips li {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
}


/* ---------- Bereichsüberschrift ---------- */
.label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-inline: var(--space-1);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ---------- Gemeinsame Oberfläche für klickbare Karten ---------- */
.feature,
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}
/* Feiner Lichtreflex, nur beim Überfahren */
.feature::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 70%);
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
  pointer-events: none;
}
.feature:focus-visible,
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- „Mein Server“ ---------- */
.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  min-height: 104px;
  padding: var(--space-4);
  border: 6px solid var(--shell);
  border-radius: 32px;
  background: linear-gradient(135deg, var(--feature-a) 0%, var(--feature-b) 45%, var(--feature-c) 100%) padding-box;
  color: #fbfaf4;
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 rgb(255 255 255 / 0.14), var(--shadow-md);
}
.feature::before {
  /* Pixelraster als leiser Minecraft-Gruß */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 14px 14px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
}
.feature::after {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.13), transparent 70%);
}
.feature__emblem {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}
.feature__emblem svg {
  width: 42px;
  height: 42px;
  transition: transform var(--dur) var(--ease-spring);
}
.feature__text { display: grid; gap: 2px; min-width: 0; }
.feature__kicker {
  color: var(--brand);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.feature__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.feature__meta { color: rgb(251 250 244 / 0.8); font-size: 0.875rem; }
.feature__go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-deep);
  transition: transform var(--dur) var(--ease-spring), background-color var(--dur) var(--ease-out);
}
.feature__go .icon { transition: transform var(--dur) var(--ease-spring); }

@media (max-width: 359px) {
  .feature { gap: var(--space-3); padding-inline: var(--space-3); }
  .feature__emblem { width: 48px; height: 48px; border-radius: 14px; }
  .feature__emblem svg { width: 34px; height: 34px; }
  .feature__title { font-size: 1.3125rem; }
}

/* ---------- Social-Karten ---------- */
.cards {
  display: grid;
  gap: var(--space-3);
}
.cards li { display: grid; }
@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 82px;
  padding: 10px 10px 10px 10px;
  border: 5px solid var(--shell);
  border-radius: 26px;
  background: var(--surface) padding-box;
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--core-hi), var(--shadow-sm);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--tint, var(--accent-soft));
  color: var(--tint-ink, var(--ink));
  transition: transform var(--dur) var(--ease-spring);
}
.card__icon svg { width: 22px; height: 22px; }
.card__text { display: grid; min-width: 0; }
.card__title { font-weight: 650; font-size: 1rem; line-height: 1.3; letter-spacing: -0.005em; }
.card__end .icon { width: 17px; height: 17px; }
.card__meta {
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.card__end {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-softer);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
  color: var(--accent);
  transition: transform var(--dur) var(--ease-spring), color var(--dur) var(--ease-out);
}

.card--twitch { --tint: var(--tint-twitch); --tint-ink: var(--tint-twitch-ink); }
.card--tiktok { --tint: var(--tint-tiktok); --tint-ink: var(--tint-tiktok-ink); }
.card--instagram { --tint: var(--tint-instagram); --tint-ink: var(--tint-instagram-ink); }
.card--discord { --tint: var(--tint-discord); --tint-ink: var(--tint-discord-ink); }
.card__hint { display: grid; justify-items: start; color: var(--accent); font-size: 0.8125rem; font-weight: 600; }
.card--discord .swap__b { font-weight: 700; }
.card--discord.is-done { border-color: var(--accent-edge); }
.card--discord.is-done .card__end { background: var(--done-fill); color: var(--done-on); box-shadow: none; }

/* ---------- Server-Karten ---------- */
.server,
.community,
.form-card {
  padding: var(--space-4);
  border: 6px solid var(--shell);
  border-radius: 32px;
  background: var(--surface) padding-box;
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--core-hi), var(--shadow-sm);
}
@media (min-width: 400px) {
  .server, .community { padding: var(--space-5); }
}

.server__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.server__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.server__title {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.server__sub { color: var(--ink-3); font-size: 0.875rem; }

.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--field);
}
.address__value {
  flex: 1 1 17.5rem;
  min-width: 0;
  padding-block: var(--space-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
  cursor: text;
}
.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: auto;
  padding: 0 var(--space-4);
  border: 1px solid var(--accent-edge);
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--accent-on);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}
.copy:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.copy .icon { width: 1.1em; height: 1.1em; }
.copy.is-done { background: var(--done-fill); border-color: var(--done-fill); color: var(--done-on); }

.address__hint {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--hint-bg);
  color: var(--hint-ink);
  font-size: 0.875rem;
}

.steps {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
  counter-reset: step;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.steps li {
  position: relative;
  padding-left: 34px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-softer);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}
.steps strong { color: var(--ink); font-weight: 650; }

/* Discord-Community */
.community {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3) var(--space-4);
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), var(--surface) 70%) padding-box;
  color: var(--ink);
}
.community__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--tint-discord);
  color: var(--tint-discord-ink);
}
.community__icon svg { width: 26px; height: 26px; }
.community__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.community__text p { color: var(--ink-2); font-size: 0.9375rem; }
.button {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 52px;
  padding: 6px 6px 6px var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--accent-on);
  font-weight: 700;
  text-decoration: none;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}
.button__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: oklch(0.3 0.05 var(--h, 125) / 0.12);
  transition: transform var(--dur) var(--ease-spring), background-color var(--dur) var(--ease-out);
}
.button__icon .icon { width: 18px; height: 18px; }
.button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (min-width: 600px) {
  .button { grid-column: 2; justify-self: start; }
}

/* ---------- Fußzeile ---------- */
.signature {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2) max(var(--space-6), env(safe-area-inset-bottom));
  view-transition-name: signature;
}
.signature__line {
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent-edge);
}
.signature__name {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Hinweis zum manuellen Kopieren ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-3);
  width: min(100% - 2 * var(--gutter), 420px);
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--toast-bg);
  color: var(--toast-ink);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  animation: toast-in var(--dur) var(--ease-out);
}
.toast[hidden] { display: none; }
.toast__text { grid-column: 1; font-size: 0.9375rem; line-height: 1.45; }
.toast__field {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.08);
  color: var(--toast-ink);
  font: 600 0.9375rem var(--font-mono);
}
.toast__field:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.toast__close {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -10px -10px 0 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--toast-ink);
  cursor: pointer;
}
.toast__close:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }

/* ---------- Kontakt-Karte auf der Startseite ---------- */
@media (min-width: 600px) {
  .cards__wide { grid-column: 1 / -1; }
}
.card--contact { --tint: var(--accent-soft); --tint-ink: var(--accent); }
.card__icon { transition: transform var(--dur) var(--ease-spring), background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }

/* ---------- Icon-Emblem (Kontakt, Danke) ---------- */
.emblem--icon { color: var(--accent); }
.emblem__icon { width: 44%; height: 44%; }

/* ---------- Kontaktformular ---------- */
@media (min-width: 400px) {
  .form-card { padding: var(--space-5); }
}
.contact { display: grid; gap: var(--space-4); }
.field { display: grid; gap: 6px; }
.field__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.field__label { font-weight: 700; font-size: 0.9375rem; }
.field__counter { color: var(--ink-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.field__counter.is-near { color: var(--danger); }
.field__input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: inset 0 1px 2px oklch(0.3 0.03 var(--h, 125) / 0.06);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.field__input--area { min-height: 160px; resize: vertical; line-height: 1.5; }
.field__input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field__input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field__hint { color: var(--ink-3); font-size: 0.8125rem; }
.field__error {
  display: flex;
  gap: 6px;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 600;
}
.field__error[hidden] { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.5; }
.form-alert,
.notice {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
}
.form-alert { background: var(--danger-bg); color: var(--danger); }
.notice { margin-bottom: var(--space-4); background: var(--hint-bg); color: var(--hint-ink); }
.form-alert[hidden],
.notice[hidden] { display: none; }

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 52px;
  padding: 6px 6px 6px var(--space-5);
  border: 1px solid var(--accent-edge);
  border-radius: var(--radius-pill);
  background: var(--accent-fill);
  color: var(--accent-on);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.submit .button__icon .icon { width: 18px; height: 18px; }
.submit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.submit[aria-disabled="true"] { cursor: progress; }
.submit:disabled { opacity: 0.55; cursor: not-allowed; }
.submit.is-done { background: var(--done-fill); border-color: var(--done-fill); color: var(--done-on); }
.submit.is-done .button__icon { background: rgb(255 255 255 / 0.16); }
@media (min-width: 600px) {
  .submit { justify-self: start; }
}
.spinner {
  width: 1.1em;
  height: 1.1em;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { display: grid; justify-items: start; gap: var(--space-3); }
.form-success[hidden] { display: none; }
.form-success__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.form-success__icon .icon { width: 26px; height: 26px; }
.form-success__title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.form-success__title:focus { outline: none; }
.form-success p { color: var(--ink-2); }

/* ---------- Danke-, Fehler- und 404-Seiten ---------- */
.page-thanks .page,
.page-failed .page,
.page-notFound .page { display: grid; align-items: center; }
.hero--message { justify-items: center; text-align: center; }
.hero--message .title { font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem); }
.pill--cta { margin-top: var(--space-5); }

/* ==========================================================================
   Interaktion: Hover nur auf Geräten mit echtem Hover
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .pill:hover,
  .icon-btn:hover { background: var(--surface); border-color: var(--accent-edge); box-shadow: var(--shadow-sm); }
  .card:hover { box-shadow: 0 0 0 1px var(--accent-edge), inset 0 1px 0 var(--core-hi), var(--shadow-md); }
  .feature:hover { box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 rgb(255 255 255 / 0.14), var(--shadow-lg); }
  .card:hover .card__end { color: var(--accent); }
  .card:hover .card__icon { background: var(--tint-ink, var(--accent)); color: var(--surface); }
  .copy:hover { background: var(--accent-fill-hover); }
  .copy.is-done:hover { background: var(--done-fill); }
  .submit:hover { background: var(--accent-fill-hover); }
  .langhint__link:hover { background: var(--accent-fill-hover); }
  .button:hover { background: var(--accent-fill-hover); box-shadow: var(--shadow-md); }
  .menu__item:hover { background: var(--accent-softer); }
  .swatch:hover::before { transform: scale(1.08); }
}

/* Räumliche Bewegung nur, wenn Bewegung erwünscht ist */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .pill:hover,
  .icon-btn:hover { transform: translateY(-1px); }
  .icon-btn:hover .theme__current { transform: rotate(-12deg); }
  .card:hover,
  .feature:hover { transform: translateY(-3px); }
  .card:hover::after,
  .feature:hover::after { opacity: 1; }
  .card:hover .card__icon { transform: rotate(-6deg) scale(1.06); }
  .card:hover .card__end { transform: translate(2px, -2px) scale(1.06); }
  .card--discord:hover .card__end { transform: scale(1.1); }
  .feature:hover .feature__emblem svg { transform: translateY(-2px) rotate(-4deg); }
  .feature:hover .feature__go { transform: scale(1.08); }
  .feature:hover .feature__go .icon { transform: translateX(2px); }
  .button:hover { transform: translateY(-2px); }
  .button:hover .button__icon,
  .submit:hover .button__icon { transform: translate(2px, -1px) scale(1.06); }
  .copy:hover,
  .submit:hover { transform: translateY(-1px); }
  .avatar:hover .avatar__ring { transform: rotate(200deg); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Kurze Druckreaktion */
  .pill:active,
  .icon-btn:active,
  .submit:active,
  .copy:active { transform: scale(0.96); transition-duration: var(--dur-fast); }
  .card:active,
  .feature:active { transform: translateY(0) scale(0.98); transition-duration: var(--dur-fast); }
  .button:active { transform: scale(0.97); transition-duration: var(--dur-fast); }

  .is-done .swap__b .icon { animation: pop 360ms var(--ease-spring); }
  .theme__current { transition: transform var(--dur) var(--ease-spring); }
  .menu:not([hidden]) { animation: menu-in 180ms var(--ease-out); }

  /* ==========================================================================
     Einstieg: kurz, weich, zeitversetzt – nur beim ersten Laden
     ========================================================================== */
  .enter { animation: rise var(--dur-enter) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
  .d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; } .d5 { --i: 5; }
  .d6 { --i: 6; } .d7 { --i: 7; } .d8 { --i: 8; } .d9 { --i: 9; }
  .avatar.enter, .emblem.enter { animation-name: rise-scale; }
  .avatar__arc { animation: ring-in 1.1s var(--ease-out) 0.1s both; }

  /* Pixel-N baut sich Stein für Stein auf */
  .avatar .px {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: px-drop 520ms var(--ease-spring) both;
  }
  .avatar .px1 { animation-delay: 180ms; }
  .avatar .px2 { animation-delay: 260ms; }
  .avatar .px3 { animation-delay: 320ms; }
  .avatar .px4 { animation-delay: 380ms; }
  .avatar .px5 { animation-delay: 460ms; }

  /* Markierung unter dem Titel wischt einmal von links ein */
  .marker {
    background-repeat: no-repeat;
    animation: marker-wipe 700ms var(--ease-out) 380ms both;
  }

  /* Grasblock „landet“ einmal */
  .feature__emblem svg { animation: block-hop 820ms var(--ease-spring) 620ms both; }

  /* Menüeinträge leicht versetzt */
  .menu:not([hidden]) .menu__item,
  .menu:not([hidden]) .swatch { animation: item-in 280ms var(--ease-out) both; }
  .menu:not([hidden]) .menu__item:nth-of-type(2) { animation-delay: 30ms; }
  .menu:not([hidden]) .menu__item:nth-of-type(3) { animation-delay: 60ms; }
  .menu:not([hidden]) .swatch:nth-child(2) { animation-delay: 110ms; }
  .menu:not([hidden]) .swatch:nth-child(3) { animation-delay: 130ms; }
  .menu:not([hidden]) .swatch:nth-child(4) { animation-delay: 150ms; }
  .menu:not([hidden]) .swatch:nth-child(5) { animation-delay: 170ms; }
  .menu:not([hidden]) .swatch:nth-child(6) { animation-delay: 190ms; }
  .menu:not([hidden]) .swatch:nth-child(1) { animation-delay: 90ms; }

  .vt-arrival .avatar .px,
  .vt-arrival .marker,
  .vt-arrival .feature__emblem svg { animation: none; }

  /* Nach einem weichen Seitenwechsel übernimmt die View Transition */
  .vt-arrival .enter,
  .vt-arrival .avatar__arc { animation: none; }

  /* Beim Scrollen: nur Inhalte unterhalb des sichtbaren Bereichs, nur mit JavaScript */
  .js [data-reveal].is-pending { opacity: 0; transform: translateY(16px); }
  .js [data-reveal].is-revealed {
    transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out);
  }

}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes rise-scale {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
}
@keyframes ring-in {
  from { stroke-dasharray: 0 100; transform: rotate(-200deg); }
}
@keyframes px-drop {
  from { opacity: 0; transform: translateY(-40%) scale(0.6); }
}
@keyframes marker-wipe {
  from { background-size: 0% 100%; }
  to { background-size: 100% 100%; }
}
@keyframes block-hop {
  0% { transform: translateY(-10px) rotate(-8deg); opacity: 0; }
  55% { transform: translateY(1px) rotate(1deg); opacity: 1; }
  75% { transform: translateY(-2px) rotate(0deg); }
  100% { transform: none; }
}
@keyframes item-in {
  from { opacity: 0; transform: translateY(-4px); }
}
@keyframes pop {
  0% { transform: scale(0.4); }
  100% { transform: scale(1); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2vmax, 1.5vmax, 0) scale(1.03); }
  100% { transform: translate3d(-1.5vmax, 2.5vmax, 0) scale(1.01); }
}

/* ==========================================================================
   Seitenwechsel (View Transition API, progressive Verbesserung)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: vt-out 200ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 380ms var(--ease-out) 60ms both; }
::view-transition-group(emblem) { animation-duration: 460ms; animation-timing-function: var(--ease-out); }
::view-transition-group(signature) { animation-duration: 380ms; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-28px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(36px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(28px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-36px); } }
html:active-view-transition-type(back)::view-transition-old(root) { animation-name: vt-out-back; }
html:active-view-transition-type(back)::view-transition-new(root) { animation-name: vt-in-back; }

/* Farbschema-Wechsel: ruhige Überblendung ohne Bewegung */
.theme-switching::view-transition-old(root),
.theme-switching::view-transition-new(root),
.theme-switching::view-transition-old(emblem),
.theme-switching::view-transition-new(emblem),
.theme-switching::view-transition-old(signature),
.theme-switching::view-transition-new(signature) { animation: none; mix-blend-mode: normal; }
.theme-switching::view-transition-new(root) { animation: theme-reveal 560ms var(--ease-out) both; }
/* Beim Farbwechsel alles als ein Bild enthüllen (keine Einzelelemente) */
.theme-switching .avatar,
.theme-switching .emblem,
.theme-switching .signature { view-transition-name: none; }
.theme-switching::view-transition-group(emblem),
.theme-switching::view-transition-group(signature) { animation: none; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--rx, 100%) var(--ry, 0)); }
  to { clip-path: circle(var(--rr, 150vmax) at var(--rx, 100%) var(--ry, 0)); }
}

/* ==========================================================================
   Reduzierte Bewegung: keine Hintergrund-, Parallax- oder Raumbewegung
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .glow { animation: none !important; }
  .spinner { animation: spin 1.6s linear infinite !important; }
  .toast { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar { --topbar-bg: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
