/* steptale.de
 *
 * Papier und Tinte wie in der App, dazu die Karten als Bilder. Piazzolla für
 * Überschriften, Google Sans Flex für alles andere (Schriften in /fonts).
 * Jedes Element hat einen eigenen Klassennamen, damit man es ansteuern und
 * beim Reden darüber benennen kann.
 */

/* ── Farben und Maße ───────────────────────────────────────────── */

:root {
  color-scheme: light;

  --paper: #f7f1e3;
  --paper-raised: #fdf9ef;
  --paper-sunk: #efe6d2;
  --ink: #2a231a;
  --ink-soft: #594d3d;
  --ink-faint: #75674f;
  --line: #e0d4bc;
  --forest: #2f5d46;
  --forest-strong: #244a37;
  --on-forest: #f7f1e3;
  --ember: #a84f24;
  --bezel: #2a231a;
  --bezel-edge: transparent;
  --selection: #ead7a6;
  --shadow-soft: 0 22px 44px -24px rgb(74 52 24 / 0.45);
  --shadow-map: 0 30px 60px -36px rgb(74 52 24 / 0.55);
  --shadow-small: 0 6px 14px -8px rgb(74 52 24 / 0.45);

  /* Der Pfad am Rand und in der Power-Up-Szene: Sandweg wie auf den Karten. */
  --trail-bed: #eadbb8;
  --trail-line: #b59a6a;

  /* Steckbriefe: Pergament und Stempel, in beiden Designs gleich. */
  --parchment: #f3e6c4;
  --parchment-ink: #3b2a17;
  --stamp: #b3261e;

  /* Power-Up-Farben wie in der App. */
  --pu-tailwind: #2196f3;
  --pu-shield: #0391d1;
  --pu-banana: #e08600;
  --pu-slimetrail: #3f9a43;
  --pu-lasso: #795548;
  --pu-cloak: #9c27b0;
  --pu-stampede: #8d6e63;
  --pu-trackreader: #e64a19;

  --font-display: "Piazzolla", "Iowan Old Style", Georgia, serif;
  --font-text: "Google Sans Flex", "Segoe UI", system-ui, sans-serif;
  /* Rundung der Google Sans Flex: 0 = kantig, 100 = ganz rund. */
  --rond: 30;

  --page-max: 74rem;
  --gutter: clamp(1rem, 4.5vw, 3rem);
  --section-gap: clamp(5rem, 11vw, 9rem);
  --header-h: 4.75rem;
  --radius-map: 1.25rem;
  --radius-phone: 2.1rem;
}

/* Dunkel: per Schalter (data-theme, gesetzt von js/theme-init.js) oder, ohne
   JavaScript, nach der Systemeinstellung. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1813;
  --paper-raised: #26201a;
  --paper-sunk: #15120e;
  --ink: #efe6d3;
  --ink-soft: #c9bca3;
  --ink-faint: #a39479;
  --line: #3a3229;
  --forest: #93c6a6;
  --forest-strong: #b0d8bd;
  --on-forest: #14201a;
  --ember: #e39466;
  --bezel: #0d0b08;
  --bezel-edge: #3a3229;
  --selection: #5a4a2a;
  --shadow-soft: 0 22px 44px -24px rgb(0 0 0 / 0.7);
  --shadow-map: 0 30px 60px -36px rgb(0 0 0 / 0.8);
  --shadow-small: 0 6px 14px -8px rgb(0 0 0 / 0.7);
  --trail-bed: #3a3024;
  --trail-line: #8d7a58;
  --pu-tailwind: #64b5f6;
  --pu-shield: #4fc3f7;
  --pu-banana: #ffb74d;
  --pu-slimetrail: #81c784;
  --pu-lasso: #bcaaa4;
  --pu-cloak: #ce93d8;
  --pu-stampede: #bcaaa4;
  --pu-trackreader: #ff8a65;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #1c1813;
    --paper-raised: #26201a;
    --paper-sunk: #15120e;
    --ink: #efe6d3;
    --ink-soft: #c9bca3;
    --ink-faint: #a39479;
    --line: #3a3229;
    --forest: #93c6a6;
    --forest-strong: #b0d8bd;
    --on-forest: #14201a;
    --ember: #e39466;
    --bezel: #0d0b08;
    --bezel-edge: #3a3229;
    --selection: #5a4a2a;
    --trail-bed: #3a3024;
    --trail-line: #8d7a58;
  }
}

/* ── Grundlagen ─────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: var(--ink-faint) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "ROND" var(--rond);
  caret-color: var(--ember);
  accent-color: var(--forest);
  overflow-x: clip;
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--forest);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--forest-strong);
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

button {
  font: inherit;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 40;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: 1rem;
}

/* ── Knöpfe und Verweise ───────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  border: 0;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--on-forest);
  font-weight: 600;
  font-variation-settings: "ROND" 60;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.button:hover {
  background: var(--forest-strong);
  color: var(--on-forest);
}

.button:active {
  transform: translateY(1px);
}

.button-small {
  min-height: 2.5rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
}

.text-link {
  font-weight: 600;
  color: var(--forest);
}

/* ── Kopf: bleibt oben stehen ──────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease-out;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--page-max);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

/* Das Logo mit dem Blatt, das aus dem Kreis ragt: kein Zuschnitt. */
.brand-logo {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.site-nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
}

.site-nav-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 52rem) {
  .site-nav-link {
    display: none;
  }
}

/* Schalter hell/dunkel, wie auf rickinto.place: ein Knopf, der hinüberrutscht. */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 4.25rem;
  height: 2.5rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-sunk);
  cursor: pointer;
  transition: border-color 160ms ease-out;
}

.theme-switch:hover {
  border-color: var(--ink-faint);
}

.theme-switch-knob {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  transform: translateX(1.75rem) rotate(8deg);
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] .theme-switch-knob {
  transform: translateX(0) rotate(-8deg);
}

.theme-switch-icon {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.theme-switch-moon,
:root[data-theme="dark"] .theme-switch-sun {
  opacity: 0;
  transform: scale(0.6) rotate(-60deg);
}

:root[data-theme="dark"] .theme-switch-moon {
  opacity: 1;
  transform: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 320ms;
}

/* ── Erster Eindruck ───────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 2.5rem;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) 0;
}

.hero-title {
  max-width: 13ch;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.012em;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--ember);
}

.hero-lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.hero-facts {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-faint);
}

.hero-visual {
  position: relative;
  padding-bottom: 3rem;
}

.hero-map {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-map);
  box-shadow: var(--shadow-map);
}

.hero-phone {
  position: absolute;
  left: -0.25rem;
  bottom: 0;
  width: clamp(8.5rem, 34%, 13rem);
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
  }

  .hero-visual {
    /* Die Karte läuft rechts bis an den Rand des Fensters. */
    margin-right: calc(-1 * max(var(--gutter), (100vw - var(--page-max)) / 2 + var(--gutter)));
    padding-bottom: 4rem;
  }

  .hero-map {
    border-radius: var(--radius-map) 0 0 var(--radius-map);
    max-height: 44rem;
  }

  .hero-phone {
    left: -3.5rem;
    width: clamp(10rem, 30%, 14rem);
  }
}

/* ── Profilbild mit Skin ───────────────────────────────────────── */

/* Stapel von hinten nach vorn wie in der App (js/avatar.js): Skin-Hinter-
   grund 0, Rückseite der Krone 2, Foto 3, Skin 5, Vorderseite der Krone 20.
   Bild-Skins liegen auf einem doppelt so großen Quadrat (inset -50 %). */
.avatar {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
}

.avatar-photo {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--paper-raised);
  box-shadow: var(--shadow-small);
}

.avatar-layer {
  position: absolute;
  inset: -50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.avatar-skin-bg { z-index: 0; }
.avatar-skin-fg { z-index: 5; }

.avatar-crown-bg,
.avatar-crown-fg {
  inset: auto;
  left: 2%;
  top: -52%;
  width: 96%;
  height: 96%;
  transform: rotate(-10deg);
  transform-origin: 50% 74%;
}

.avatar-crown-bg { z-index: 2; }

.avatar-crown-fg {
  z-index: 20;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.35));
}

/* Die drei Ringe aus der App, reines CSS. */
.skin-gold > .avatar-photo {
  box-shadow: 0 0 0 3px rgb(255 215 0 / 0.75), 0 0 18px 6px rgb(255 215 0 / 0.35);
}

.skin-neon > .avatar-photo {
  box-shadow: 0 0 0 3px rgb(0 255 200 / 0.75), 0 0 18px 6px rgb(0 255 200 / 0.35);
}

.skin-dots > .avatar-photo {
  outline: 3px dotted #ff3f8e;
  outline-offset: 2px;
}

/* ── Pfad am Rand (js/trail.js) ────────────────────────────────── */

main {
  position: relative;
}

main > section {
  position: relative;
  z-index: 1;
}

.trail-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.trail-svg {
  position: absolute;
  top: 0;
  left: 0;
}

.trail-bed {
  fill: none;
  stroke: var(--trail-bed);
  stroke-width: 18;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trail-line {
  fill: none;
  stroke: var(--trail-line);
  stroke-width: 2;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}

.trail-mask {
  fill: none;
  stroke: #fff;
  stroke-width: 34;
  stroke-linecap: round;
}

.trail-walker {
  position: absolute;
  top: -1.25rem;
  left: -1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  transition: opacity 240ms ease-out;
  will-change: transform;
}

.trail-walker.is-hidden {
  opacity: 0;
}

.trail-walker-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--paper-raised);
  box-shadow: var(--shadow-small);
}

/* ── Handy-Rahmen ──────────────────────────────────────────────── */

.phone {
  margin: 0;
  padding: 0.45rem;
  background: var(--bezel);
  border-radius: var(--radius-phone);
  /* Im Dunkeln hebt eine feine Kante den Rahmen vom Hintergrund ab. */
  box-shadow: 0 0 0 1px var(--bezel-edge), var(--shadow-soft);
}

.phone-screen {
  width: 100%;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--radius-phone) - 0.45rem);
  background: var(--paper-raised);
}

/* ── Diesen Monat: Gastgeber und Belohnung ─────────────────────── */

.month {
  display: grid;
  gap: 2.5rem;
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

@media (min-width: 60rem) {
  .month {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
  }
}

.host {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  align-items: center;
}

.host-portrait {
  grid-row: span 2;
  width: clamp(6rem, 16vw, 9.5rem);
  height: auto;
}

.host-quote {
  margin: 0;
}

.host-words {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
}

.host-cite {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink-faint);
}

.host-note {
  grid-column: 2;
  max-width: 34rem;
  color: var(--ink-soft);
}

@media (max-width: 34rem) {
  .host {
    grid-template-columns: 1fr;
  }

  .host-portrait {
    grid-row: auto;
    width: 7rem;
  }

  .host-note {
    grid-column: 1;
  }
}

.reward {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  background: var(--paper-sunk);
  border-radius: 1.5rem;
}

/* Platz über dem Kopf, damit der Hut nicht an die Kante stößt. */
.reward-avatar {
  width: clamp(5.5rem, 12vw, 7rem);
  margin: 1.75rem 0.75rem 0.5rem;
}

.reward-title {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.reward-body {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.reward-countdown {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}

.reward-countdown:empty {
  display: none;
}

/* ── Abschnitte allgemein ──────────────────────────────────────── */

.section-title {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
}

.section-lede {
  max-width: 36rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

/* ── So geht’s ─────────────────────────────────────────────────── */

.steps {
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

.steps-list {
  display: grid;
  gap: 2.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  align-content: start;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.step::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1;
  color: var(--ember);
}

.step-title {
  font-size: 1.45rem;
}

.step-text {
  margin-top: 0.5rem;
  max-width: 30rem;
  color: var(--ink-soft);
}

@media (min-width: 56rem) {
  .steps-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .step::before {
    grid-row: auto;
    margin-bottom: 1rem;
  }
}

/* ── Power-Ups: Auswahl und Szene ──────────────────────────────── */

.powerups {
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

.powerups-layout {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 56rem) {
  .powerups-layout {
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
  }
}

.powerup-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

@media (min-width: 56rem) {
  .powerup-list {
    grid-template-columns: 1fr;
  }
}

.powerup-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.45rem 0.75rem 0.45rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}

.powerup-tab:hover {
  background: var(--paper-sunk);
  color: var(--ink);
}

.powerup-tab[aria-selected="true"] {
  background: var(--paper-raised);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-small);
}

.powerup-tab-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

.powerup-tab-svg {
  width: 1.3rem;
  height: 1.3rem;
}

.pu-tailwind { color: var(--pu-tailwind); }
.pu-shield { color: var(--pu-shield); }
.pu-banana { color: var(--pu-banana); }
.pu-slimetrail { color: var(--pu-slimetrail); }
.pu-lasso { color: var(--pu-lasso); }
.pu-cloak { color: var(--pu-cloak); }
.pu-stampede { color: var(--pu-stampede); }
.pu-trackreader { color: var(--pu-trackreader); }

.powerup-panel {
  display: grid;
  gap: 1.5rem;
}

.powerup-scene {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  overflow: hidden;
}

.scene-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.scene-trail {
  fill: none;
  stroke: var(--trail-bed);
  stroke-width: 30;
  stroke-linecap: round;
}

.scene-trail-dash {
  fill: none;
  stroke: var(--trail-line);
  stroke-width: 2;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}

.scene-actor-ring {
  fill: var(--paper-raised);
  stroke: var(--ink);
  stroke-width: 3;
}

.scene-du .scene-actor-ring {
  stroke: var(--forest);
}

.scene-ghost .scene-actor-ring {
  stroke-dasharray: 4 4;
}

.scene-actor-name {
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 700;
  fill: var(--ink-soft);
}

.scene-label {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 700;
  fill: var(--ink);
  transition: opacity 200ms ease-out;
}

.scene-label-bad { fill: var(--pu-slimetrail); }
.scene-label-good { fill: var(--forest); }
.scene-label-quiet { fill: var(--ink-faint); font-weight: 600; }
.scene-label-count { font-variant-numeric: tabular-nums; fill: var(--pu-trackreader); }

.scene-shield {
  fill: color-mix(in srgb, var(--pu-shield) 16%, transparent);
  stroke: var(--pu-shield);
  stroke-width: 2.5;
}

.scene-slime {
  fill: none;
  stroke: var(--pu-slimetrail);
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0.55;
}

.scene-rope {
  fill: none;
  stroke: var(--pu-lasso);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.scene-replay {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.scene-replay:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
}

.scene-replay-icon {
  width: 1rem;
  height: 1rem;
}

.powerup-name {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.powerup-text {
  max-width: 36rem;
  margin-top: 0.6rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.powerup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.powerup-meta > li {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--paper-sunk);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.powerup-target[data-target="Gegen andere"] {
  color: var(--ember);
}

.powerup-target[data-target="Für alle"] {
  color: var(--forest);
}

/* ── Anprobe: Profilbild, Skin, Krone ──────────────────────────── */

.wardrobe {
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

.wardrobe-layout {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 56rem) {
  .wardrobe-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
  }
}

.wardrobe-stage {
  display: grid;
  justify-items: center;
  padding: 5.5rem 1.5rem 2rem;
  background: var(--paper-sunk);
  border-radius: 1.5rem;
  text-align: center;
}

.wardrobe-avatar {
  width: clamp(8.5rem, 22vw, 11.5rem);
}

.wardrobe-label {
  margin-top: 3.25rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}

.wardrobe-how {
  margin-top: 0.25rem;
  color: var(--ink-soft);
}

.wardrobe-controls {
  display: grid;
  gap: 1.75rem;
}

.wardrobe-group-title {
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.wardrobe-photos,
.wardrobe-skins {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.wardrobe-photo,
.wardrobe-skin {
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid transparent;
  background: var(--paper-raised);
  cursor: pointer;
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}

.wardrobe-photo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  overflow: hidden;
}

.wardrobe-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wardrobe-skin {
  width: 4.25rem;
  height: 4.25rem;
  border-color: var(--line);
  border-radius: 1rem;
}

.wardrobe-photo:hover,
.wardrobe-skin:hover {
  transform: translateY(-2px);
}

.wardrobe-photo[aria-checked="true"],
.wardrobe-skin[aria-checked="true"] {
  border-color: var(--forest);
  box-shadow: 0 0 0 2px var(--forest);
}

.wardrobe-skin-thumb {
  width: 3.25rem;
  height: 3.25rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* "Kein Skin": ein leerer Kreis mit Schrägstrich. */
.wardrobe-skin-thumb.is-none {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--ink-faint);
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 46%, var(--ink-faint) 46% 54%, transparent 54%);
}

.wardrobe-skin-thumb.is-ring {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--paper-sunk);
}

.ring-gold { box-shadow: 0 0 0 3px rgb(255 215 0 / 0.8), 0 0 10px 3px rgb(255 215 0 / 0.35); }
.ring-neon { box-shadow: 0 0 0 3px rgb(0 255 200 / 0.8), 0 0 10px 3px rgb(0 255 200 / 0.35); }
.ring-dots { outline: 3px dotted #ff3f8e; }

.wardrobe-crown {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 700;
}

.wardrobe-crown-input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.15rem 0 0;
}

.wardrobe-crown-note {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ── Steckbriefe: Fotoaufträge ─────────────────────────────────── */

.quests {
  display: grid;
  gap: 2.5rem;
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

@media (min-width: 56rem) {
  .quests {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
  }
}

.quests-note {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--ink-soft);
}

.quests-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.quests-tab {
  min-height: 2.75rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
}

.quests-tab:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
}

.quests-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.quests-board {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2rem);
  background: #6b3d1f url("/img/bounties/board.webp") center / cover;
  border-radius: 1.5rem;
}

.poster {
  position: relative;
  width: min(100%, 23rem);
  padding: 2.25rem 1.75rem 1.5rem;
  background: var(--parchment);
  color: var(--parchment-ink);
  text-align: center;
  box-shadow: 0 18px 30px -18px rgb(0 0 0 / 0.75);
  transform: rotate(-1.2deg);
  overflow: hidden;
}

/* Die Reißzwecke. */
.poster::before {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: -0.45rem;
  border-radius: 50%;
  background: #2b2b2b;
  box-shadow: 0 2px 2px rgb(0 0 0 / 0.4);
}

.poster-kicker {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.poster-target {
  margin-top: 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgb(59 42 23 / 0.35);
  font-size: 1.25rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--parchment-ink);
}

.poster.is-rare .poster-target::after {
  content: " · selten";
  font-style: italic;
  font-variant: normal;
  letter-spacing: 0;
  color: #8a5a12;
}

.poster-image {
  width: 62%;
  margin: 0.75rem auto 0.25rem;
  mix-blend-mode: multiply;
}

.poster-story {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.45;
  text-align: left;
}

.poster-reward {
  margin-top: 0.9rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgb(59 42 23 / 0.4);
  font-size: 0.9rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
}

.poster-reward-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  font-variant: normal;
  letter-spacing: 0;
}

.poster-reward-powerup {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.poster-reward-icon {
  width: 1rem;
  height: 1rem;
}

.poster-signature {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-style: italic;
  text-align: right;
  font-size: 0.95rem;
}

.poster-stamp {
  position: absolute;
  top: 40%;
  left: 50%;
  padding: 0.2rem 1rem;
  border: 4px double var(--stamp);
  border-radius: 0.5rem;
  color: var(--stamp);
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-14deg) scale(1.7);
  transition: opacity 200ms ease-out, transform 360ms cubic-bezier(0.2, 1.4, 0.4, 1);
  mix-blend-mode: multiply;
}

.poster.is-found .poster-stamp {
  opacity: 0.9;
  transform: translate(-50%, -50%) rotate(-14deg) scale(1);
}

.poster-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.poster-snap {
  background: var(--parchment);
  color: var(--parchment-ink);
}

.poster-snap:hover {
  background: #fff4d8;
  color: var(--parchment-ink);
}

.poster-snap-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* ── Rundgang: Kapitel links, das Handy bleibt rechts stehen ───── */

.tour {
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

.tour-layout {
  margin-top: 2.5rem;
}

.tour-stage {
  display: none;
}

.tour-chapters {
  display: grid;
  gap: 4rem;
}

.chapter-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.chapter-text {
  max-width: 32rem;
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.chapter-phone {
  width: min(13.5rem, 64%);
  margin-top: 1.75rem;
}

@media (min-width: 56rem) {
  .tour-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
  }

  .tour-chapters {
    gap: 0;
  }

  .chapter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 62vh;
    opacity: 0.38;
    transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .chapter.is-current {
    opacity: 1;
  }

  .chapter-phone {
    display: none;
  }

  .tour-stage {
    display: block;
    order: 2;
    position: sticky;
    top: calc(50vh - 17rem);
    align-self: start;
  }

  .tour-phone {
    position: relative;
    width: 17rem;
    margin: 0 auto;
  }

  /* Alle Bildschirme liegen übereinander; der aktuelle wird scharf. */
  .tour-screen {
    transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
                filter 500ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .tour-screen + .tour-screen {
    position: absolute;
    inset: 0.45rem;
    width: calc(100% - 0.9rem);
  }

  .tour-screen:not(.is-active) {
    opacity: 0;
    filter: blur(6px);
  }
}

/* ── Monatskarten ──────────────────────────────────────────────── */

.months {
  margin: var(--section-gap) 0 0;
}

.months-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Blättern mit der Maus; auf Touch-Geräten wischt man ohnehin. */
.months-controls {
  display: none;
  gap: 0.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .months-controls {
    display: flex;
  }
}

.months-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.months-button:hover:not(:disabled) {
  background: var(--paper-sunk);
  border-color: var(--ink-faint);
}

.months-button:disabled {
  color: var(--ink-faint);
  opacity: 0.45;
  cursor: default;
}

.months-button-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.months-strip {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 2.5rem;
  padding: 0.5rem max(var(--gutter), (100vw - var(--page-max)) / 2 + var(--gutter)) 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100vw - var(--page-max)) / 2 + var(--gutter));
  scrollbar-width: thin;
}

.months-strip:focus-visible {
  outline-offset: -2px;
}

.month-card {
  flex: 0 0 clamp(14rem, 62vw, 21rem);
  margin: 0;
  scroll-snap-align: start;
}

.month-map {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-map);
  box-shadow: var(--shadow-soft);
}

.month-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-top: 0.9rem;
}

.month-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.month-date {
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ── Datenschutz in kurz ───────────────────────────────────────── */

.privacy {
  display: grid;
  gap: 1.5rem;
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

.privacy-body {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

@media (min-width: 56rem) {
  .privacy {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
  }
}

/* ── Mitmachen ─────────────────────────────────────────────────── */

.join {
  display: grid;
  gap: 0 clamp(2rem, 6vw, 6rem);
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  background: var(--paper-sunk);
}

/* Ab Tablet ist die Fläche so breit wie der Inhalt darüber, nicht wie das Fenster. */
@media (min-width: 40rem) {
  .join {
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(var(--page-max) - 2 * var(--gutter));
    padding-inline: clamp(1.5rem, 5vw, 4rem);
    border-radius: 1.5rem;
  }
}

@media (min-width: 56rem) {
  .join {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .join > .join-steps {
    margin-top: 0.4rem;
  }

  .join > .join-actions {
    grid-column: 2;
  }
}

.join-steps {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
  margin: 2rem 0 0;
  padding-left: 1.4rem;
  font-size: 1.125rem;
}

.join-step::marker {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ember);
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

.join-hint {
  color: var(--ink-soft);
}

/* ── Fragen ────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 2rem clamp(2rem, 6vw, 6rem);
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--gutter);
}

@media (min-width: 56rem) {
  .faq {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--forest);
}

/* Plus aus zwei Strichen; beim Öffnen klappt der senkrechte weg. */
.faq-icon {
  position: relative;
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  border-radius: 1px;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-icon::before {
  height: 2px;
}

.faq-icon::after {
  width: 2px;
}

.faq-item[open]:not(.is-closing) .faq-icon::after {
  transform: rotate(90deg) scaleX(0);
}

.faq-answer {
  max-width: 40rem;
  overflow: hidden;
  color: var(--ink-soft);
}

.faq-answer > p {
  padding-bottom: 1rem;
}

.faq-answer > p:last-child {
  padding-bottom: 1.4rem;
}

/* ── Fuß ───────────────────────────────────────────────────────── */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  max-width: var(--page-max);
  margin: var(--section-gap) auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand .brand-logo {
  width: 2rem;
  height: 2rem;
}

.footer-brand .brand-name {
  font-size: 1.2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Rechtstexte (Impressum, Datenschutz, Regeln) ──────────────── */

.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) 0;
}

.legal-title {
  font-size: clamp(2.2rem, 5.4vw, 3.4rem);
}

.legal-meta {
  margin-top: 0.75rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.legal-section {
  margin-top: 2.75rem;
}

.legal-heading {
  font-size: 1.5rem;
}

.legal-subheading {
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.legal p,
.legal ul,
.legal address,
.legal table {
  margin-top: 0.85rem;
}

.legal address {
  font-style: normal;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

.legal-table-wrap {
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  font-weight: 600;
  color: var(--ink-faint);
}

/* ── Seite nicht gefunden ──────────────────────────────────────── */

.not-found {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 7rem) var(--gutter) 0;
}

.not-found-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.not-found-text {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.not-found-actions {
  margin-top: 2rem;
}

/* ── Weniger Bewegung ──────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
  }
}
