/* =========================================================================
   Farb-Match (Lab) — Speed-Dating fuer Farben. Eigene Seite ohne
   Partikelfeld. Ablauf und Modell: assets/js/farb-match.js
   ========================================================================= */

@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* --ahnung: die Farbe, die sich waehrend des Spiels formt (weich animiert) */
@property --ahnung { syntax: '<color>'; inherits: true; initial-value: #34A7B9; }

:root {
  --bg: #0B0B0C;
  --text: #F5F5F7;
  --muted: rgba(245, 245, 247, 0.62);
  --line: #26272C;
  --eis: #34A7B9;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --display: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  /* Ergebnisfarben (setzt das Skript) */
  --farbe: #34A7B9; --hell: #EEF6F7; --tief: #0F3F47; --nachbar: #3F8FC0;
  --kontrast: #C0704F; --ruhe: #8D9496; --nacht: #0E1314; --auf: #0B0B0C; --auf-kontrast: #F5F5F7;
  transition: --ahnung 1.2s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6;
  background: var(--bg); color: var(--text); min-height: 100svh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
kbd { font: inherit; font-size: .85em; border: 1px solid currentColor; border-radius: 5px; padding: 0 .38em; opacity: .7; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--eis); color: #0B0B0C; border-radius: 30px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--eis); outline-offset: 3px; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { font-family: var(--display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.eyebrow b { color: var(--eis); font-weight: 600; }

/* ---------- Pillen ---------------------------------------------------------- */
.pille {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; cursor: pointer;
  font-family: var(--display); font-size: 16px; font-weight: 500; text-decoration: none;
  border: 1px solid rgba(245,245,247,.28); background: transparent; color: var(--text);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.pille span { transition: transform .45s var(--ease); }
.pille:hover { border-color: var(--text); }
.pille:hover span { transform: translateX(4px); }
.pille:active { transform: scale(.97); }
.pille--akzent { background: var(--eis); color: #0B0B0C; border-color: transparent; font-weight: 600; }
.pille--akzent:hover { background: #F5F5F7; }
.pille--gross { min-height: 60px; padding: 0 34px; font-size: 18px; }
.pille--auf { background: var(--auf); color: var(--grund, var(--farbe)); border-color: transparent; font-weight: 600; }
.pille--auf:hover { background: transparent; color: var(--auf); border-color: var(--auf); }
.pille--auf:hover span { transform: rotate(-180deg); }
.pille--rand { color: var(--auf); border-color: color-mix(in srgb, var(--auf) 35%, transparent); }
.pille--rand:hover { border-color: var(--auf); }
.pille--rand:hover span { transform: translateY(3px); }

/* ---------- Leiste oben ---------------------------------------------------- */
.leiste {
  position: absolute; left: 0; right: 0; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px var(--gutter); font-family: var(--display);
  transition: color .6s var(--ease);
}
.leiste__links { display: flex; align-items: center; gap: 14px; }
.leiste__marke img { width: 36px; height: 36px; }
.leiste__weg {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; text-decoration: none; font-size: 15px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.leiste__weg:hover { border-color: currentColor; }
.leiste__weg span { transition: transform .3s var(--ease); }
.leiste__weg:hover span { transform: translateX(-3px); }
.leiste__titel { margin: 0; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.leiste__status {
  justify-self: end; display: flex; align-items: center; gap: 14px;
  font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .5s var(--ease);
}
.leiste__uhr { opacity: .55; min-width: 3.2ch; text-align: right; }
.leiste__ahnung {
  width: 14px; height: 14px; border-radius: 50%; background: var(--ahnung);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ahnung) 22%, transparent);
}
body[data-zustand='spiel'] .leiste__status { opacity: 1; }
body[data-zustand='ergebnis'] .leiste { color: var(--auf); }
body[data-zustand='ergebnis'] .leiste__marke img { filter: var(--logo-filter, none); }

/* ---------- 1 · Einstieg --------------------------------------------------- */
.intro { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.intro__feld { position: absolute; inset: -10%; z-index: -1; filter: blur(90px) saturate(.92); opacity: .42; }
.intro__feld i {
  position: absolute; width: 44vmax; height: 44vmax; border-radius: 50%;
  mix-blend-mode: screen; will-change: transform;
  animation: treiben 40s var(--ease-io) infinite alternate;
}
.intro__feld i:nth-child(1) { left: 52%; top: -6%; background: #FF5A4E; animation-delay: 0s, -3s; }
.intro__feld i:nth-child(2) { left: 70%; top: 30%; background: #2D6BFF; animation-delay: -6s, -9s; width: 38vmax; height: 38vmax; }
.intro__feld i:nth-child(3) { left: 30%; top: 12%; background: #34A7B9; animation-delay: -11s, -15s; width: 30vmax; height: 30vmax; }
.intro__feld i:nth-child(4) { left: 85%; top: -18%; background: #F2C230; animation-delay: -4s, -21s; width: 28vmax; height: 28vmax; }
.intro__feld i:nth-child(5) { left: 58%; top: 52%; background: #B04DE0; animation-delay: -16s, -5s; width: 34vmax; height: 34vmax; }
@keyframes treiben {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vmax, 3vmax) scale(1.08); }
  100% { transform: translate(3vmax, -2vmax) scale(.96); }
}
.intro::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,11,12,.15) 0%, rgba(11,11,12,.35) 45%, var(--bg) 92%);
}
.intro__innen { width: 100%; max-width: 1400px; margin: 0 auto; padding: 140px var(--gutter) clamp(40px, 7vh, 80px); }
.intro__titel {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.04em; line-height: .92;
  font-size: clamp(52px, 9.5vw, 156px); margin: 0; text-wrap: balance;
}
.intro__z1, .intro__z2 { display: block; }
.intro__z2 { color: rgba(245, 245, 247, .5); font-weight: 500; }
.intro__zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; margin-top: clamp(28px, 5vh, 56px); }
.intro__lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); max-width: 44ch; margin: 0; }
.intro__lead strong { color: var(--text); font-weight: 500; }
.intro__los { display: grid; justify-items: end; gap: 14px; }
.intro__hinweis { margin: 0; font-size: 13px; color: var(--muted); }
.intro__schritte {
  list-style: none; margin: clamp(40px, 7vh, 72px) 0 0; padding: 22px 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; font-family: var(--display); font-size: 15px;
}
.intro__schritte b { color: var(--eis); font-weight: 600; font-size: 12px; margin-right: 10px; }
.intro__schritte span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 4px; font-family: var(--body); }
@media (max-width: 760px) {
  .intro__zeile { grid-template-columns: 1fr; }
  .intro__los { justify-items: start; }
  .intro__schritte { grid-template-columns: 1fr; gap: 12px; }
  .intro__schritte span { display: inline; margin-left: 6px; }
  .intro__hinweis { display: none; }
}

/* Einstieg kommt herein */
.js .intro__innen > * { opacity: 0; transform: translateY(28px); }
.ist-bereit .intro__innen > * { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.ist-bereit .intro__innen > :nth-child(2) { transition-delay: .08s; }
.ist-bereit .intro__innen > :nth-child(3) { transition-delay: .2s; }
.ist-bereit .intro__innen > :nth-child(4) { transition-delay: .32s; }

/* ---------- 2 · Das Spiel -------------------------------------------------- */
.spiel {
  position: relative; height: 100svh; min-height: 520px; isolation: isolate;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(14px, 2.4vh, 26px);
  padding: 86px var(--gutter) clamp(18px, 3vh, 30px);
}
/* die werdende Farbe glimmt von unten herauf */
.spiel::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 115%, color-mix(in srgb, var(--ahnung) 18%, transparent), transparent 70%);
}
.spiel__frage {
  margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(28px, 4vw, 56px); text-align: center;
}
.spiel__buehne { display: flex; gap: clamp(10px, 1.4vw, 18px); min-height: 0; }
.karte {
  color: var(--text);
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; cursor: pointer;
  border: 0; border-radius: clamp(20px, 2.4vw, 34px); background-color: #1A1B1F;
  --mx: 50%; --my: 50%;
  transition: flex-grow .7s var(--ease), background-color .55s var(--ease), opacity .45s var(--ease),
              transform .5s var(--ease), border-radius .7s var(--ease), box-shadow .6s var(--ease);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.06);
  -webkit-tap-highlight-color: transparent;
}
.karte__licht {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(42% 42% at var(--mx) var(--my), rgba(255,255,255,.16), transparent 70%);
  transition: opacity .5s var(--ease);
  mix-blend-mode: soft-light;
}
.karte__taste, .karte__code {
  position: absolute; bottom: clamp(16px, 2vw, 26px); font-family: var(--display); font-size: 14px;
  letter-spacing: .04em; opacity: 0; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.karte__taste { left: clamp(18px, 2vw, 28px); }
.karte[data-karte='1'] .karte__taste { left: auto; right: clamp(18px, 2vw, 28px); }
.karte__code { right: clamp(18px, 2vw, 28px); font-variant-numeric: tabular-nums; opacity: 0; }
.karte[data-karte='1'] .karte__code { right: auto; left: clamp(18px, 2vw, 28px); }
@media (hover: hover) {
  .spiel__buehne:not([class*='ist-']) .karte:hover { flex-grow: 1.1; }
  .karte:hover .karte__licht { opacity: 1; }
  .karte:hover .karte__taste { opacity: .8; transform: none; }
  .karte:hover .karte__code { opacity: .55; transform: none; }
}
.karte:active { transform: scale(.985); }
.karte:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }

/* Wahl: die Gewinnerin dehnt sich, die andere weicht */
.ist-wahl-0 .karte[data-karte='0'], .ist-wahl-1 .karte[data-karte='1'] { flex-grow: 7; }
.ist-wahl-0 .karte[data-karte='1'], .ist-wahl-1 .karte[data-karte='0'] { flex-grow: .0001; opacity: 0; transform: scale(.92); }
.ist-keine .karte { transform: scale(.94); opacity: .25; }
.ist-neu .karte { opacity: 0; transform: scale(.96); }
.spiel__buehne[class*='ist-'] .karte { pointer-events: none; }

.karte__welle {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.25); mix-blend-mode: soft-light;
  animation: welle .9s var(--ease) forwards;
}
@keyframes welle { to { transform: scale(160); opacity: 0; } }

.spiel__fuss { display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.spiel__weg { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; flex: 1 1 auto; max-width: 560px; }
.spiel__weg i {
  height: 6px; border-radius: 6px; background: rgba(245,245,247,.12);
  transform-origin: left; transition: background .5s var(--ease), transform .6s var(--ease);
}
.spiel__weg i.ist-voll { animation: segment .6s var(--ease); }
.spiel__weg i.ist-keine { opacity: .45; }
@keyframes segment { from { transform: scaleX(0); } }
.spiel__keine {
  flex: none; background: none; border: 1px solid rgba(245,245,247,.22); border-radius: 999px; cursor: pointer;
  min-height: 44px; padding: 0 18px; font-family: var(--display); font-size: 14.5px; color: var(--muted);
  display: inline-flex; gap: 10px; align-items: center;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.spiel__keine:hover { color: var(--text); border-color: var(--text); }

/* Telefon und Hochformat: Karten uebereinander */
@media (max-width: 700px), (orientation: portrait) and (max-width: 1000px) {
  .spiel { padding-top: 78px; }
  .spiel__buehne { flex-direction: column; }
  .karte__taste { display: none; }
  .karte__code, .karte[data-karte='1'] .karte__code { left: 18px; right: auto; bottom: 14px; opacity: .5; transform: none; }
}
@media (max-width: 700px) {
  .leiste__titel { display: none; }
  .leiste { grid-template-columns: 1fr auto; }
  .spiel__fuss { gap: 14px; }
  .spiel__keine kbd { display: none; }
}
@media (hover: none) { .spiel__keine kbd, .karte__taste { display: none; } }

/* ---------- Mischen (Uebergang zum Ergebnis) ------------------------------- */
.misch { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: rgba(11,11,12,.82); }
.misch__punkt, .misch__kern {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0);
}
.misch__punkt { width: 42px; height: 42px; box-shadow: 0 0 30px rgba(0,0,0,.4); }
.misch__kern { left: 50%; top: 50%; width: 24px; height: 24px; }

/* ---------- 3 · Ergebnis --------------------------------------------------- */
.enthuellung {
  position: relative; min-height: 100svh; background: var(--grund, var(--farbe)); color: var(--auf);
  display: grid; grid-template-rows: auto 1fr auto; gap: clamp(28px, 5vh, 56px);
  padding: 110px var(--gutter) clamp(28px, 5vh, 52px);
}
.enthuellung > * { width: 100%; max-width: 1400px; margin: 0 auto; }
.eyebrow--auf { color: var(--auf); opacity: .65; }
.enthuellung__name {
  margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.04em; line-height: .88;
  font-size: clamp(58px, 12vw, 200px); outline: none; overflow-wrap: anywhere;
}
.enthuellung__name span span { display: inline-block; }
.ist-da .enthuellung__name span span { animation: buchstabe 1.1s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms + .1s); }
@keyframes buchstabe { from { opacity: 0; transform: translateY(.16em); filter: blur(4px); } }
.enthuellung__merkmale { margin: 20px 0 0; font-family: var(--display); font-size: clamp(16px, 1.3vw, 19px); opacity: .78; }
.enthuellung__merkmale b { font-weight: 600; opacity: 1; }
.enthuellung__mitte { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px 72px; align-items: end; }
.enthuellung__vibe { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.6vw, 40px); line-height: 1.22; max-width: 30ch; }
.enthuellung__verhalten { margin: 0; font-size: 15.5px; line-height: 1.6; opacity: .75; max-width: 42ch; }
.enthuellung__fuss {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 40px;
  padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--auf) 22%, transparent);
}
.ist-da .enthuellung__kopf > *:not(.enthuellung__name), .ist-da .enthuellung__mitte, .ist-da .enthuellung__fuss { animation: steigen 1.1s var(--ease) backwards; }
.ist-da .enthuellung__merkmale { animation-delay: .45s !important; }
.ist-da .enthuellung__mitte { animation-delay: .6s; }
.ist-da .enthuellung__fuss { animation-delay: .75s; }
@keyframes steigen { from { opacity: 0; transform: translateY(12px); } }

.codes { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.code {
  display: grid; gap: 2px; text-align: left; cursor: pointer; padding: 10px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--auf) 8%, transparent); border: 1px solid color-mix(in srgb, var(--auf) 18%, transparent);
  color: var(--auf); font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 15px;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.code small { font-size: 10.5px; letter-spacing: .14em; opacity: .6; }
.code:hover { background: color-mix(in srgb, var(--auf) 16%, transparent); }
.code:active { transform: scale(.97); }
.zahlen { display: flex; gap: 28px; margin: 0; font-family: var(--display); }
.zahlen dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.zahlen dd { margin: 4px 0 0; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.reise { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; justify-self: center; }
.reise i, .reise b {
  width: 14px; height: 14px; flex: none; border-radius: 50%; display: block;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--auf) 45%, transparent);
}
.reise i.ist-keine { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--auf) 35%, transparent); }
.reise b { width: 28px; height: 28px; background: var(--farbe); box-shadow: 0 0 0 2px var(--auf); }
.reise span { opacity: .55; margin: 0 4px; }
.ist-da .reise > * { animation: punkt .7s var(--ease) backwards; animation-delay: calc(var(--i, 12) * 55ms + .9s); }
@keyframes punkt { from { opacity: 0; transform: scale(0); } }
.enthuellung__wege { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 1100px) {
  .enthuellung__wege { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .enthuellung { padding-top: 96px; }
  .enthuellung__mitte { grid-template-columns: 1fr; }
  .enthuellung__fuss { flex-direction: column; align-items: flex-start; }
  .reise { flex-wrap: wrap; }
  .zahlen { gap: 20px; }
  .zahlen dd { font-size: 22px; }
}

/* Abschnitte darunter */
.kontext, .palette, .entstehung, .nochmal { background: var(--nacht); }
.kontext { padding: clamp(80px, 13vh, 150px) 0 clamp(40px, 6vh, 80px); }
.abschnitt { margin-bottom: clamp(32px, 5vh, 56px); max-width: 60ch; }
.abschnitt__titel {
  margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; line-height: 1;
  font-size: clamp(38px, 5.2vw, 84px); text-wrap: balance;
}
.abschnitt__text { color: var(--muted); margin: 20px 0 0; max-width: 46ch; font-size: 17px; }

[data-zeige] { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
[data-zeige].ist-sichtbar { opacity: 1; transform: none; }

.mockups { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.mock { margin: 0; position: relative; border-radius: clamp(18px, 2vw, 28px); overflow: hidden; background: #15161A; }
.mock--raum { grid-column: 1 / -1; }
.mock svg { width: 100%; height: auto; }
.mock--objekt svg { aspect-ratio: 1; height: 100%; object-fit: cover; }
.mock figcaption {
  position: absolute; left: 18px; top: 16px; padding: 7px 14px; border-radius: 999px;
  background: rgba(11,11,12,.62);
  font-family: var(--display); font-size: 13px; color: #F5F5F7;
}
.mock figcaption span { opacity: .6; margin-left: 6px; }
.mockups .mock:nth-child(2) { transition-delay: .1s; }
.mockups .mock:nth-child(3) { transition-delay: .2s; }

.f-farbe { fill: var(--farbe); } .f-hell { fill: var(--hell); } .f-tief { fill: var(--tief); }
.f-nachbar { fill: var(--nachbar); } .f-kontrast { fill: var(--kontrast); } .f-ruhe { fill: var(--ruhe); }
.f-tief-strich { stroke: var(--tief); }
.mock svg * { transition: fill 1s var(--ease); }

/* App-Oberflaeche */
.mock--ui { display: grid; place-items: center; background: var(--hell); padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 48px); }
.ui {
  width: min(100%, 340px); background: #fff; color: #16171A; border-radius: 26px; padding: 22px;
  box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--tief) 55%, transparent), 0 2px 6px rgba(0,0,0,.05);
  font-family: var(--display);
}
.ui__kopf { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.ui__logo { width: 22px; height: 22px; border-radius: 7px; background: var(--farbe); }
.ui__avatar { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--hell); color: var(--tief); }
.ui__klein { margin: 22px 0 0; font-size: 12.5px; color: #6B6D74; }
.ui__zahl { margin: 2px 0 0; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--tief); }
.ui__balken { display: flex; align-items: flex-end; gap: 7px; height: 96px; margin-top: 14px; }
.ui__balken i { flex: 1; height: var(--h); border-radius: 6px; background: var(--hell); }
.ui__balken i:nth-child(6) { background: var(--farbe); }
.ui__reihe { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.ui__chip { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; background: var(--hell); color: var(--tief); }
.ui__chip--leer { background: none; box-shadow: inset 0 0 0 1px #E1E2E6; color: #6B6D74; }
.ui__schalter { margin-left: auto; width: 42px; height: 24px; border-radius: 99px; background: var(--farbe); position: relative; }
.ui__schalter::after { content: ''; position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.ui__knopf {
  display: flex; justify-content: center; gap: 8px; margin-top: 18px; padding: 14px; border-radius: 14px;
  background: var(--farbe); color: var(--auf-farbe, var(--auf)); font-weight: 600; font-size: 15px;
}

@media (max-width: 760px) {
  .mockups { grid-template-columns: 1fr; }
  .mock--ui { padding: 40px 20px; }
}

/* Palette */
.palette { padding: clamp(60px, 10vh, 120px) 0; }
.palette__reihe { display: flex; gap: 8px; height: clamp(260px, 42vh, 420px); }
.farbe {
  position: relative; flex: 1 1 0; min-width: 0; border: 0; cursor: pointer; text-align: left;
  border-radius: 22px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  font-family: var(--display); overflow: hidden;
  transition: flex-grow .7s var(--ease), transform .4s var(--ease);
}
.farbe:hover, .farbe:focus-visible { flex-grow: 1.8; }
.farbe:active { transform: scale(.98); }
.farbe__rolle { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.farbe__wozu { font-size: 13px; opacity: .65; white-space: nowrap; }
.farbe__hex { font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 10px; opacity: .85; }
.farbe__kopie {
  position: absolute; top: 18px; right: 18px; font-size: 12px; padding: 4px 10px; border-radius: 99px;
  border: 1px solid currentColor; opacity: 0; transform: translateY(-6px); transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.farbe:hover .farbe__kopie { opacity: .7; transform: none; }
.palette__reihe.ist-sichtbar .farbe { animation: kachel .9s var(--ease) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes kachel { from { transform: translateY(14px); opacity: 0; } }
@media (max-width: 760px) {
  .palette__reihe { display: grid; grid-template-columns: 1fr 1fr; height: auto; }
  .farbe { min-height: 150px; }
}

/* Entstehung */
.entstehung { padding: clamp(40px, 8vh, 100px) 0 clamp(60px, 10vh, 120px); }
.entstehung__innen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.entstehung__wolke { width: 100%; aspect-ratio: 1; max-width: 600px; justify-self: center; }
.entstehung__text p { color: var(--muted); max-width: 50ch; font-size: 16.5px; }
.entstehung__text .abschnitt__titel { margin-bottom: 26px; }
.entstehung__legende { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13.5px !important; margin-top: 28px; }
.entstehung__legende > span { display: inline-flex; align-items: center; gap: 8px; }
.entstehung__legende i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--farbe); opacity: .8; }
.entstehung__legende i.ring { background: none; box-shadow: inset 0 0 0 1px rgba(245,245,247,.7); width: 10px; height: 10px; }
.entstehung__legende i.ziel { width: 12px; height: 12px; box-shadow: 0 0 0 2px #F5F5F7; opacity: 1; }
@media (max-width: 900px) { .entstehung__innen { grid-template-columns: 1fr; } }

/* Noch einmal */
.nochmal { padding: clamp(60px, 12vh, 140px) 0; text-align: center; border-top: 1px solid rgba(245,245,247,.08); }
.nochmal__titel { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; line-height: 1; font-size: clamp(38px, 5.2vw, 84px); }
.nochmal__text { color: var(--muted); font-size: 18px; margin: 20px 0 36px; }
.nochmal__wege { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Fuss, Hinweis ------------------------------------------------- */
.fuss { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 28px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; background: var(--bg); }
.fuss nav { display: flex; gap: 22px; }
.fuss a { text-decoration: none; } .fuss a:hover { color: var(--text); }
body[data-zustand='spiel'] .fuss { display: none; }
body[data-zustand='ergebnis'] .fuss { background: var(--nacht); border-color: rgba(245,245,247,.08); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 70; margin: 0; padding: 12px 20px; border-radius: 999px;
  background: #F5F5F7; color: #0B0B0C; font-family: var(--display); font-size: 14.5px; font-weight: 500;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.toast.ist-da { opacity: 1; transform: translate(-50%, 0); }
.ohne-js { padding: 160px var(--gutter); font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-zeige] { opacity: 1; transform: none; }
}
.enthuellung__name > span { display: inline-block; white-space: nowrap; }


/* =========================================================================
   Zwei Modi: eine Farbe oder eine Palette
   ========================================================================= */
body:not([data-modus='palette']) [data-nur='palette'],
body[data-modus='palette'] [data-nur='farbe'] { display: none !important; }

/* Umschalter im Einstieg — eine Pille, darin gleitet ein Licht */
.modus {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 0;
  border-radius: 999px; background: rgba(245,245,247,.06); border: 1px solid rgba(245,245,247,.14);
  isolation: isolate;
}
.modus::before {
  content: ''; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: #F5F5F7;
  transition: transform .6s var(--ease), background .6s var(--ease);
}
body[data-modus='palette'] .modus::before {
  transform: translateX(100%);
}
.modus__knopf {
  min-height: 42px; padding: 0 20px; border: 0; background: none; cursor: pointer; border-radius: 999px;
  font-family: var(--display); font-size: 15px; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: color .45s var(--ease);
}
.modus__knopf[aria-pressed='true'] { color: #0B0B0C; }
.modus__knopf:not([aria-pressed='true']):hover { color: var(--text); }
.intro__titel.ist-wechsel .intro__z1, .intro__titel.ist-wechsel .intro__z2 { animation: titelwechsel .8s var(--ease); }
.intro__titel.ist-wechsel .intro__z2 { animation-delay: .06s; animation-fill-mode: backwards; }
.intro__lead { animation: none; }
body[data-modus] .intro__lead { animation: einblenden .7s var(--ease); }
@keyframes titelwechsel { from { opacity: 0; transform: translateY(.08em); filter: blur(4px); } }
@keyframes einblenden { from { opacity: 0; transform: translateY(8px); } }

/* Spiel: Karten als Paletten in fuenf Streifen */
.karte__streifen { position: absolute; inset: 0; display: none; }
body[data-modus='palette'] .karte__streifen { display: flex; }
.karte__streifen i { display: block; height: 100%; transition: background-color .55s var(--ease), flex-grow .7s var(--ease); }
.karte__streifen i:nth-child(1) { flex: 1 1 0; }
.karte__streifen i:nth-child(2) { flex: 2.2 1 0; }
.karte__streifen i:nth-child(3) { flex: 1.5 1 0; }
.karte__streifen i:nth-child(4) { flex: 1.1 1 0; }
.karte__streifen i:nth-child(5) { flex: 1.6 1 0; }
body[data-modus='palette'] .karte__taste,
body[data-modus='palette'] .karte__code {
  padding: 5px 12px; border-radius: 999px; color: #F5F5F7;
  background: rgba(11,11,12,.6);
}
body[data-modus='palette'] .karte__licht { mix-blend-mode: overlay; }
@media (max-width: 700px), (orientation: portrait) and (max-width: 1000px) {
  body[data-modus='palette'] .karte__code { opacity: .9; }
}

/* Ergebnis im Paletten-Modus */
body[data-modus='palette'] .enthuellung { grid-template-rows: auto auto 1fr auto; }
.baender {
  display: flex; gap: 6px; height: clamp(150px, 26vh, 260px); padding: 0;
}
.band {
  position: relative; flex: 1 1 0; min-width: 0; border: 0; cursor: pointer; border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; padding: 16px 18px; text-align: left;
  font-family: var(--display); transform-origin: bottom;
  transition: flex-grow .7s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--auf) 22%, transparent);
}
.band:nth-child(2) { flex-grow: 1.7; }
.band:hover, .band:focus-visible { flex-grow: 2.2; }
.band:active { transform: scale(.98); }
.band__rolle { font-size: 18px; font-weight: 600; }
.band__wozu { font-size: 12.5px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band__hex { font-size: 13.5px; font-variant-numeric: tabular-nums; margin-top: 8px; opacity: .85; }
.ist-da .band { animation: band 1.1s var(--ease) backwards; animation-delay: calc(var(--i) * 80ms + .25s); }
@keyframes band { from { transform: scaleY(.4); opacity: 0; } }
.ist-da .band > * { animation: steigen .8s var(--ease) backwards; animation-delay: calc(var(--i) * 80ms + .7s); }
@media (max-width: 760px) {
  .baender { flex-direction: column; height: auto; }
  .band, .band:nth-child(2) { flex: none; min-height: 64px; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .band__wozu { display: none; }
  .band__hex { margin: 0; }
  .ist-da .band { animation-name: kachel; }
}
body[data-modus='palette'] .enthuellung__name { font-size: clamp(56px, 11vw, 190px); }
body[data-modus='palette'] .enthuellung { gap: clamp(22px, 4vh, 44px); }

/* Zum Mitnehmen: CSS und Vorschau */
.mitnehmen { background: var(--nacht); padding: clamp(60px, 10vh, 120px) 0; }
.mitnehmen__code {
  display: grid; gap: 18px; justify-items: start; margin-bottom: clamp(28px, 5vh, 56px);
}
.mitnehmen__code pre {
  margin: 0; width: 100%; max-width: 760px; overflow-x: auto; padding: 24px 26px; border-radius: 20px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(245,245,247,.1);
  font: 14.5px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #E7E7EA;
}
.vorschau { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.vorschau > div { border-radius: clamp(18px, 2vw, 28px); padding: clamp(26px, 4vw, 56px); font-family: var(--display); min-height: 360px; display: flex; flex-direction: column; }
.vorschau__seite { background: var(--v4); color: var(--v0); }
.vorschau__nacht { background: var(--v0n, var(--v0)); color: var(--v4); }
.vorschau__marke { margin: 0 0 auto; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.vorschau__marke i { width: 18px; height: 18px; border-radius: 50%; background: var(--v1); box-shadow: 8px 0 0 -2px var(--v2); }
.vorschau__titel { margin: 40px 0 0; font-size: clamp(34px, 4.4vw, 64px); font-weight: 600; letter-spacing: -0.04em; line-height: .98; }
.vorschau__text { margin: 16px 0 0; max-width: 40ch; opacity: .75; font-family: var(--body); font-size: 15px; }
.vorschau__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.vorschau__knoepfe span { padding: 11px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 600; }
.vorschau__knoepfe span:first-child { background: var(--v1); color: var(--auf-v1); }
.vorschau__knoepfe span:last-child { box-shadow: inset 0 0 0 1.5px var(--v2); color: inherit; }
.vorschau__nacht .vorschau__knoepfe span:first-child { background: var(--v2); color: var(--auf-v2); }
.vorschau__nacht .vorschau__knoepfe span:last-child { box-shadow: inset 0 0 0 1.5px var(--v3); }
@media (max-width: 760px) { .vorschau { grid-template-columns: 1fr; } .vorschau > div { min-height: 300px; } }

.nochmal__wege .pille b { font-weight: inherit; }

a.code { text-decoration: none; }
.entstehung__legende b { font-weight: inherit; }

/* Auswahl und Scrollleiste aus der Palette der Seite */
::selection { background: color-mix(in srgb, var(--eis) 40%, transparent); color: inherit; }
body[data-zustand='ergebnis'] .enthuellung ::selection { background: color-mix(in srgb, var(--auf) 22%, transparent); }
html { scrollbar-color: rgba(245,245,247,.22) var(--bg); }
