/* BG-Aufkleber – Oberfläche. Luft-nach-oben-Farben, flächig, ohne Umrandungen. Mobil zuerst.
   Hover nur in `@media (hover: hover)`: Auf Touch bliebe er nach dem Tippen hängen. */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/AtkinsonHyperlegibleNext-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/AtkinsonHyperlegibleNext-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --cyan: #039eec;
  --cyan-light: #5cc3f5;
  --ink: #062a3a;
  --ink-soft: #17465c;
  --yellow: #f5c21e;
  --lano-ink: #15181c; /* Leiste und Menü wie auf lanoinc.de: Gelb trägt Ink */
  --white: #ffffff;
  --tint: #e2f4fd;
  --muted-on-ink: #b9dbea;
  --radius: 18px;
  --ease-pop: cubic-bezier(0.2, 1.4, 0.4, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; } /* Platz für die feste Leiste */

body {
  margin: 0;
  font-family: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
}

h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); display: flex; align-items: center; gap: 12px; }
h3 { font-size: 1.15rem; margin: 32px 0 12px; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus, var(--ink)); outline-offset: 3px; }
/* hidden gilt auch für Elemente mit eigenem display (Karten, Knöpfe, Beschriftungen). */
[hidden] { display: none !important; }

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

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--yellow); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; font-weight: 700; z-index: 10;
}
.skip:focus { top: 16px; }

/* Leiste und Menü wie auf lanoinc.de (Werte von der Redesign-Session) */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  padding: 13px 18px;
  background: var(--yellow); color: var(--lano-ink);
  border-bottom: 1px solid rgba(21, 24, 28, 0.18);
}
.brand { display: block; line-height: 0; }
.brand img { width: 130px; max-width: 42vw; height: auto; filter: invert(1); } /* Logo ist weiß, auf Gelb ink */
.menu-button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 30px; cursor: pointer;
  background: rgba(255, 255, 255, 0.35); color: var(--lano-ink);
  border: 1.6px solid rgba(21, 24, 28, 0.3);
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
}
.menu-button svg, .site-menu-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (hover: hover) { .menu-button:hover { border-color: var(--lano-ink); background: rgba(255, 255, 255, 0.55); } }
.menu-button[aria-expanded='true'] { background: var(--lano-ink); color: var(--white); }

.site-menu {
  inset: 0 0 0 auto; margin: 0; padding: 18px 18px 32px;
  width: min(300px, 82vw); height: 100dvh; max-width: none; max-height: none;
  border: 0; overflow-y: auto;
  background: var(--yellow); color: var(--lano-ink); --focus: var(--lano-ink);
}
.site-menu[open] { animation: menu-in 0.2s ease-out; }
.site-menu::backdrop { background: rgba(10, 16, 22, 0.5); }
@keyframes menu-in { from { transform: translateX(100%); } }
.site-menu-close {
  display: grid; place-items: center; margin-left: auto;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.35); color: var(--lano-ink); border: 1.6px solid rgba(21, 24, 28, 0.3);
}
.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu a { text-decoration: none; }
@media (hover: hover) { .site-menu a:hover { color: var(--ink); text-decoration: underline; } }
.site-menu a[aria-current='page'] { color: var(--ink); text-decoration: underline; }
.site-menu-list > li { border-bottom: 1px solid rgba(21, 24, 28, 0.18); padding: 10px 0; }
.site-menu-list > li:last-child { border-bottom: 0; }
.site-menu-heading {
  display: block; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid rgba(21, 24, 28, 0.18);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(21, 24, 28, 0.78);
}
.site-menu-list ul a { display: block; padding: 6px 12px; font-size: 0.92rem; font-weight: 700; color: rgba(21, 24, 28, 0.78); }
.site-menu-top { display: block; padding: 4px 0; font-size: 1.05rem; font-weight: 700; }

/* Bänder: vollflächig, je Abschnitt eine Farbe */
.band { --step-bg: var(--yellow); --step-fg: var(--ink); }
.band-white { background: var(--white); }
.band-tint { background: var(--tint); }
.band-cyan { background: var(--cyan); --step-bg: var(--ink); --step-fg: var(--white); }
.band-ink { background: var(--ink); color: var(--white); --focus: var(--yellow); }
.band-yellow { background: var(--yellow); --step-bg: var(--ink); --step-fg: var(--yellow); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 16px 48px; }

.step {
  flex: none;
  display: inline-grid; place-items: center;
  width: 1.6em; height: 1.6em;
  border-radius: 50%;
  background: var(--step-bg); color: var(--step-fg);
  font-size: 0.85em;
}

.note { margin-top: 8px; }
.band-ink .note { color: var(--muted-on-ink); }

/* Knöpfe */
.button {
  border: 0; border-radius: 999px;
  padding: 0.65em 1.3em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.button:active:not(:disabled) { transform: scale(0.96); }
.button:disabled { cursor: not-allowed; opacity: 0.45; }
.button-cyan { background: var(--cyan); color: var(--ink); }
@media (hover: hover) { .button-cyan:hover:not(:disabled) { background: var(--cyan-light); } }
.button-tint { background: var(--tint); color: var(--ink); }
@media (hover: hover) { .button-tint:hover { background: #c9ebfb; } }
.button-ink { background: var(--ink); color: var(--white); }
@media (hover: hover) { .button-ink:hover:not(:disabled) { background: var(--ink-soft); } }
.button-big { font-size: 1.2rem; padding: 0.8em 1.8em; margin-top: 20px; }

/* Meldungen */
.message:empty { display: none; }
.message { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius); }
.message-ok { background: var(--tint); }
.message-error { background: var(--ink); color: var(--white); }
.band-yellow .message-ok { background: var(--white); }

/* Kopf: schmal Titel, Stapel, Satz untereinander; breit der Stapel rechts neben dem Text */
.masthead .wrap {
  display: grid; padding-top: 24px; padding-bottom: 56px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'title' 'hero' 'lead' 'privacy';
}
.masthead h1 { grid-area: title; font-size: clamp(2.1rem, 8vw, 3.8rem); margin-top: 8px; max-width: 14ch; }
.lead { grid-area: lead; font-size: 1.2rem; margin-top: 20px; max-width: 34rem; }
.privacy {
  grid-area: privacy; justify-self: start; margin-top: 20px;
  background: var(--yellow); color: var(--ink);
  padding: 6px 14px; border-radius: 16px; font-weight: 700;
}

/* Spielestapel (hero.js): Schachteln fallen nacheinander, Aufkleber kleben danach auf. Einheiten im SVG = mm. */
.hero { grid-area: hero; width: min(100%, 260px); justify-self: center; margin-top: 28px; }
.hero svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero .is-intro [data-part='box'] {
  animation: box-drop 0.7s linear backwards;
  animation-delay: calc(0.1s + var(--i) * 0.17s);
}
.hero .is-intro [data-part='sticker'] {
  transform-box: fill-box; transform-origin: center;
  animation: sticker-stick 0.4s var(--ease-pop) backwards;
  animation-delay: calc(0.75s + var(--i) * 0.17s);
}
@keyframes box-drop {
  from { transform: translateY(-110px); opacity: 0; animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
  25% { opacity: 1; }
  70% { transform: none; animation-timing-function: ease-out; }
  85% { transform: translateY(-4px); animation-timing-function: ease-in; }
  to { transform: none; }
}
@keyframes sticker-stick { from { transform: scale(1.9) rotate(-35deg); opacity: 0; } }

/* 0 BoardGameGeek: Anleitung als Kacheln mit eigener Zählung */
.howto {
  list-style: none; counter-reset: howto;
  display: grid; gap: 12px;
  margin: 20px 0 0; padding: 0;
}
.howto li {
  counter-increment: howto;
  position: relative;
  padding: 16px 18px 16px 64px; border-radius: var(--radius);
  background: var(--white);
}
.howto li::before {
  content: counter(howto);
  position: absolute; left: 16px; top: 13px;
  display: grid; place-items: center;
  width: 2em; height: 2em; border-radius: 50%;
  background: var(--cyan); color: var(--ink); font-weight: 700;
}

/* 1 Sammlung */
.drop {
  display: grid; justify-items: center; gap: 4px;
  margin-top: 20px; padding: 36px 20px;
  border-radius: var(--radius);
  background: var(--cyan); color: var(--ink);
  text-align: center; cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
@media (hover: hover) { .drop:hover { background: var(--cyan-light); } }
.drop.is-over { background: var(--yellow); transform: scale(1.02); }
.drop:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.drop-title { font-size: 1.35rem; font-weight: 700; }
.drop-link { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }

/* Aufklappen: eigener Pfeil statt Systemmarker (der kann auf iOS als Emoji erscheinen) */
summary {
  display: flex; align-items: center; gap: 10px; width: fit-content;
  cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ''; flex: none; width: 0.55em; height: 0.65em;
  background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: transform 0.2s;
}
details[open] > summary::before { transform: rotate(90deg); }

/* 2 Vorlage */
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
@media (min-width: 720px) { .templates { grid-template-columns: repeat(4, 1fr); } }
.template {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px; border-radius: var(--radius);
  background: var(--white); cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
@media (hover: hover) { .template:hover { background: #f3fbff; } }
.template:has(input:checked) { background: var(--ink); color: var(--white); }
.template:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.template-sheet { flex: none; width: 40px; height: auto; }
.template-page { fill: var(--tint); }
.template:has(input:checked) .template-page { fill: var(--white); }
.template-dot { fill: var(--cyan); }
.template-text { display: grid; gap: 2px; line-height: 1.35; }
.template-title { font-weight: 700; font-size: 1.05rem; }
.template-text .badge { justify-self: start; margin-top: 2px; }
/* Suchen und Aufklappen: gleiche Fläche wie eine Vorlage, kein Auswählen */
.template-more { cursor: default; }
@media (hover: hover) { .template-more:hover { background: var(--white); } }
.template-search {
  width: 100%; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--tint);
}
.template-hint { font-size: 0.9rem; }
.template-hint:empty { display: none; }
.template-more-button { margin-top: auto; }
.template-buy { justify-self: start; margin-top: 4px; font-size: 0.95rem; font-weight: 700; color: inherit; }
.aff-note { margin-top: 12px; font-size: 0.9rem; }
/* Vorlage für kleine Schachteln, aufklappbar unter der Auswahl */
.small-sheet { margin-top: 20px; }
.small-sheet .templates { margin-top: 12px; }
.badge {
  display: inline-block; vertical-align: 0.1em;
  background: var(--yellow); color: var(--ink);
  font-size: 0.75rem; padding: 2px 8px; border-radius: 999px;
}

/* 3 Gestaltung: Designs, Bühne mit Aufkleber und Beschriftungen, Farben */
/* Vorschau für normale oder kleine Schachteln */
.preview-target { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.segment {
  border: 0; border-radius: 999px; padding: 6px 14px;
  background: var(--ink-soft); color: var(--white); font-weight: 700; cursor: pointer;
}
.segment[aria-pressed='true'] { background: var(--cyan); color: var(--ink); }
.designs { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.design {
  display: grid; justify-items: center; gap: 4px;
  width: 104px; border: 0; border-radius: var(--radius);
  padding: 10px 6px; background: var(--ink-soft); color: var(--white);
  cursor: pointer; transition: background-color 0.2s, transform 0.15s;
}
@media (hover: hover) { .design:hover { background: #235a73; } }
.design:active { transform: scale(0.96); }
.design[aria-pressed='true'] { background: var(--cyan); color: var(--ink); }
.design-mini { display: block; width: 64px; aspect-ratio: 1; transition: transform 0.3s var(--ease-pop); }
.design[aria-pressed='true'] .design-mini { transform: rotate(-12deg) scale(1.06); }
@media (hover: hover) { .design:hover .design-mini { transform: rotate(-12deg) scale(1.06); } }
.design-mini svg { display: block; width: 100%; height: 100%; }
.design-name { font-weight: 700; font-size: 0.85rem; line-height: 1.2; text-align: center; }

/* Schmal: Beschriftungen in einer Reihe über und unter dem Aufkleber; Aufgeklapptes in eigener Zeile
   darüber bzw. darunter (.callout ist dafür display: contents), damit die Linien frei bleiben. */
.stage {
  position: relative;
  display: grid; gap: 24px;
  grid-template-areas: 'a' 'sticker' 'b';
  margin-top: 24px;
}
.leaders {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible; z-index: 2;
  filter: drop-shadow(0 0 1px var(--ink)) drop-shadow(0 0 1px var(--ink));
}
.leader { stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; transition: stroke-width 0.2s, opacity 0.2s; }
.leader-dot { fill: var(--yellow); transition: r 0.2s, opacity 0.2s; }
.leader.is-off, .leader-dot.is-off { opacity: 0.45; }
.leader.is-off { stroke-dasharray: 3 5; }
.leader.is-focus { stroke-width: 3.5; opacity: 1; }
.leader-dot.is-focus { r: 5.5; opacity: 1; }
.is-hidden { display: none; }

.sticker-box {
  grid-area: sticker;
  position: relative; z-index: 1;
  width: min(100%, 300px); aspect-ratio: var(--sticker-ratio, 1);
  justify-self: center;
}
.stage[data-shape='rect'] .sticker-box { width: min(100%, 440px); } /* quer: breiter, damit die Punkte groß genug sind */
.sticker { position: absolute; inset: 0; }
.sticker svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sticker-ghost { visibility: hidden; pointer-events: none; }

.sticker svg > * { transition: opacity 0.25s; }
.sticker svg.has-focus > :not(.is-focus) { opacity: 0.3; }
.sticker g.is-entering, .sticker g.is-leaving { transform-box: fill-box; transform-origin: center; }
.sticker g.is-entering { animation: info-in 0.5s var(--ease-pop) backwards; }
.sticker g.is-leaving { animation: info-out 0.3s ease-in forwards; }
.sticker svg.is-swapping { animation: swap-in 0.7s var(--ease-pop); }
@keyframes info-in { from { opacity: 0; transform: scale(0.2); } }
@keyframes info-out { to { opacity: 0; transform: scale(0.2); } }
@keyframes swap-in { from { opacity: 0; transform: rotate(-140deg) scale(0.4); } }

.callouts {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(var(--count, 3), minmax(0, 1fr)); column-gap: 8px;
}
.callouts-a { grid-area: a; }
.callouts-b { grid-area: b; }
.callouts-a .callout-head { grid-row: 2; }
.callouts-a .callout-more { grid-row: 1; }
.callouts-b .callout-head { grid-row: 1; }
.callouts-b .callout-more { grid-row: 2; }
.callouts-a .callout-more:not(.is-collapsed) { margin-bottom: 10px; }
.callouts-b .callout-more:not(.is-collapsed) { margin-top: 10px; }

/* Beschriftung als Fläche; Farben als Variablen, damit Kopf und Aufgeklapptes (schmal getrennt) gleich aussehen */
.callout {
  --card: var(--cyan); --card-fg: var(--ink); --card-hover: var(--cyan-light);
  --chip: var(--tint); --chip-fg: var(--ink); --chip-on: var(--ink); --chip-on-fg: var(--white);
  --focus: var(--ink);
  display: contents;
}
.callout.is-off {
  --card: var(--ink-soft); --card-fg: var(--white); --card-hover: #235a73;
  --chip: #235a73; --chip-fg: var(--white); --chip-on: var(--cyan); --chip-on-fg: var(--ink);
  --focus: var(--yellow);
}
.callout-head, .callout-panel { background: var(--card); color: var(--card-fg); border-radius: 14px; transition: background-color 0.2s, color 0.2s; }
.callout-head { display: grid; align-content: start; gap: 6px; padding: 6px; min-width: 0; }
.callout-more { grid-column: 1 / -1; }
.callout-panel { display: grid; gap: 10px; padding: 10px 12px 12px; }

.callout-toggle {
  display: grid; justify-items: center; align-content: center;
  width: 100%; min-width: 0; border: 0; border-radius: 10px;
  padding: 4px;
  background: none; color: inherit;
  cursor: pointer; transition: background-color 0.2s, transform 0.15s;
}
@media (hover: hover) { .callout-toggle:hover { background: var(--card-hover); } }
.callout-toggle:active { transform: scale(0.95); }
.callout-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.callout-label { font-weight: 700; font-size: 0.95rem; line-height: 1.2; overflow-wrap: anywhere; }
.callout-state { font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; }
/* Pfeil der aufklappenden Beschriftungen, als Fläche (kein Zeichen, das als Emoji erscheinen kann) */
.has-menu .callout-state::after {
  content: ''; width: 0.5em; height: 0.6em;
  background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: rotate(90deg); transition: transform 0.2s;
}
/* Schmal zeigt der Pfeil zur Zeile, in der sich die Beschriftung öffnet (oben über, unten unter dem Aufkleber) */
.callouts-a .has-menu .callout-state::after, .callouts-b .is-open .has-menu .callout-state::after { transform: rotate(-90deg); }
.callouts-a .is-open .has-menu .callout-state::after { transform: rotate(90deg); }
.callout-hint { display: none; font-size: 0.9rem; line-height: 1.3; }

.swatch {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; padding: 0;
  border: 0; border-radius: 999px;
  background: none; cursor: pointer;
}
.swatch::-webkit-color-swatch-wrapper { padding: 0; }
.swatch::-webkit-color-swatch { border: 0; border-radius: 999px; }
.swatch::-moz-color-swatch { border: 0; border-radius: 999px; }
.callout.is-off .swatch { opacity: 0.6; }

/* Kleine Auswahlflächen in den Beschriftungen */
.chips { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips legend { padding: 0; margin-bottom: 4px; font-size: 0.8rem; font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; }
.callout-symbols { justify-content: center; }
.chip {
  --hole: var(--chip);
  display: inline-grid; justify-items: center; align-content: center;
  border-radius: 999px; padding: 4px 10px;
  background: var(--chip); color: var(--chip-fg);
  font-size: 0.85rem; font-weight: 700; line-height: 1.2;
  cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.15s;
}
.chip:active { transform: scale(0.94); }
.chip:has(input:checked) { --hole: var(--chip-on); background: var(--chip-on); color: var(--chip-on-fg); }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.chip:has(input:disabled) { opacity: 0.45; cursor: not-allowed; transform: none; }
.chip-icon-only { padding: 4px; }
.chip-icon { display: block; width: 20px; height: 20px; }
.chip-icon [fill='#000000'] { fill: currentColor; }
.chip-icon [fill='#ffffff'] { fill: var(--hole); }
.chip-icon [stroke='#ffffff'] { stroke: var(--hole); }
.chip-note { font-size: 0.72rem; font-weight: 400; }
.chip-note:empty { display: none; }
.text-field { padding-top: 8px; }
.text-field input {
  width: 100%; border: 0; border-radius: 999px;
  padding: 8px 14px; background: var(--white); color: var(--ink);
}
.field-hint { margin-top: 6px; font-size: 0.85rem; }
.field-hint:empty { display: none; }

.collapse {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, opacity 0.3s, margin 0.3s, visibility 0.3s;
}
/* Innen Platz für den Fokusrahmen lassen, den overflow sonst abschneidet */
.collapse > * { min-height: 0; overflow: hidden; padding: 6px; margin: -6px; }
.collapse.is-collapsed { grid-template-rows: 0fr; opacity: 0; visibility: hidden; }

.preview-bar { display: grid; justify-items: center; gap: 12px; margin-top: 24px; text-align: center; }
.preview-name { font-weight: 700; font-size: 1.15rem; min-height: 1.5em; overflow-wrap: anywhere; white-space: pre-line; }

/* Paletten als Farbstreifen, beliebig viele, umbrechend */
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.palette {
  display: grid; gap: 6px; align-content: start;
  border: 0; border-radius: 14px; padding: 8px 10px 10px;
  background: var(--ink-soft); color: var(--white);
  font-size: 0.85rem; font-weight: 700; line-height: 1.2; text-align: left;
  cursor: pointer; transition: background-color 0.2s, transform 0.15s;
}
@media (hover: hover) { .palette:hover { background: #235a73; } }
.palette:active { transform: scale(0.96); }
.palette[aria-pressed='true'] { background: var(--cyan); color: var(--ink); }
.palette-strip { display: flex; height: 16px; border-radius: 999px; overflow: hidden; }
.palette-strip > span { flex: 1; }
.palette-custom {
  display: none; align-self: center; justify-self: start;
  background: var(--yellow); color: var(--ink);
  font-size: 0.85rem; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
.palettes.is-custom .palette-custom { display: block; }

.more-colors { margin-top: 20px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; margin-top: 16px; }
.color-field {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--white); color: var(--ink); cursor: pointer;
}
.color-field .swatch { flex: none; width: 52px; height: 28px; }
/* Hauchfeine Kante, damit Weiß auf Weiß als Farbe erkennbar bleibt */
.color-field .swatch::-webkit-color-swatch { box-shadow: inset 0 0 0 1px rgb(6 42 58 / 0.2); }
.color-field .swatch::-moz-color-swatch { box-shadow: inset 0 0 0 1px rgb(6 42 58 / 0.2); }

/* 4 Spiele */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; }
.search { flex: 1 1 100%; }
.search input {
  width: 100%; border: 0; border-radius: 999px;
  padding: 10px 18px; background: var(--tint);
}
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input[type='checkbox'] { width: 1.15em; height: 1.15em; accent-color: var(--ink); margin: 0; flex: none; }
.counter { margin-top: 20px; font-size: 1.3rem; font-weight: 700; }
.game-list {
  list-style: none; margin: 12px 0 0; padding: 10px;
  max-height: 28rem; overflow: auto;
  background: var(--tint); border-radius: var(--radius);
}
.game-list li { display: flex; align-items: center; gap: 6px; }
.game-list label {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 10px; cursor: pointer;
}
/* Kleine Schachtel: Schalter neben dem Spiel, gedrückt dunkel */
.small-toggle {
  flex: none; border: 0; border-radius: 999px; padding: 2px 10px;
  background: var(--white); color: var(--ink); font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.small-toggle[aria-pressed='true'] { background: var(--ink); color: var(--white); }
@media (hover: hover) { .game-list label:hover { background: var(--white); } }
.game-name { overflow-wrap: anywhere; }
.game-list-empty { padding: 6px 10px; }
.tag {
  flex: none; margin-left: auto;
  background: var(--cyan); color: var(--ink);
  font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
}
.tag + .tag { margin-left: 0; }

/* 5 PDF */
.pdf-summary { margin-top: 12px; font-size: 1.15rem; }
.print-hint { margin-top: 16px; font-weight: 700; }
/* Angebrochener Bogen (Abschnitt 5): Plätze an ihrer echten Position (download.js), benutzte blass, der Start dunkel */
.start { margin-top: 20px; }
.start-sheet {
  position: relative; width: 200px; aspect-ratio: 210 / 297; margin-top: 12px;
  background: var(--white); border-radius: 6px;
}
.start-place {
  position: absolute; padding: 0; border: 0;
  background: var(--cyan); cursor: pointer; transition: background-color 0.15s, transform 0.15s;
}
@media (hover: hover) { .start-place:hover { transform: scale(1.12); } }
.start-place.is-used { background: var(--tint); }
.start-place[aria-pressed='true'] { background: var(--ink); }
.start-place:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.pdf-actions { display: flex; flex-wrap: wrap; gap: 0 12px; }
.button-white { background: var(--white); color: var(--ink); }
@media (hover: hover) { .button-white:hover:not(:disabled) { background: var(--tint); } }

/* Fuß */
.footer .wrap { padding-top: 32px; padding-bottom: 40px; display: grid; gap: 8px; color: var(--muted-on-ink); }
.footer a { color: var(--yellow); }

@media (min-width: 640px) {
  .search { flex: 0 1 18rem; }
  .game-list { columns: 2; column-gap: 16px; }
  .game-list li { break-inside: avoid; }
  .sticker-box { width: min(100%, 340px); }
}

@media (min-width: 720px) {
  .wrap { padding: 56px 32px 64px; }
  .howto { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  /* Stapel rechts; der Titel wächst mit der Breite, damit er nicht in den Stapel läuft */
  .masthead .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px); column-gap: 56px;
    grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas: '. hero' 'title hero' 'lead hero' 'privacy hero' '. hero';
  }
  .masthead h1 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); }
  .hero { width: 100%; margin-top: 32px; }
}

@media (min-width: 900px) {
  /* Breit: Beschriftungen als Karten links und rechts */
  .stage {
    grid-template-areas: 'a sticker b';
    grid-template-columns: 1fr minmax(320px, 400px) 1fr;
    align-items: center; gap: 48px;
  }
  .sticker-box { width: 100%; }
  .callouts { display: flex; flex-direction: column; gap: 20px; }
  .callouts-a { align-items: flex-end; }
  .callouts-b { align-items: flex-start; }
  .callout {
    position: relative;
    display: grid; gap: 2px; padding: 8px;
    width: 100%; max-width: 270px; border-radius: 16px;
    background: var(--card); color: var(--card-fg);
    transition: background-color 0.2s, color 0.2s;
  }
  .callout-head, .callout-panel { background: none; border-radius: 0; }
  .callout-head { grid-template-columns: minmax(0, 1fr) 40px; align-items: center; column-gap: 8px; padding: 0; }
  .callout-head:not(:has(.swatch)) { grid-template-columns: minmax(0, 1fr); }
  .callout-toggle { justify-items: start; padding: 4px 8px; text-align: left; }
  .callout .swatch { height: 40px; }
  .callout-symbols { grid-column: 1 / -1; justify-content: flex-start; padding: 0 8px 2px; }
  .callout-label { font-size: 1.05rem; }
  .callout-hint { display: block; padding: 0 8px 4px; }
  /* Aufgeklapptes legt sich über die Karten darunter, statt sie zu verschieben: Linien und Karten bleiben stehen */
  .callout.is-open { z-index: 1; border-radius: 16px 16px 0 0; }
  .callouts .callout-more {
    position: absolute; left: 0; right: 0; top: calc(100% - 1px);
    grid-row: auto;
    background: var(--card); color: var(--card-fg); border-radius: 0 0 16px 16px;
  }
  .callouts .callout-more:not(.is-collapsed) { margin: 0; }
  .callouts .callout-head { grid-row: auto; }
  .callout-panel { padding: 0 16px 14px; }
  .callouts-a .has-menu .callout-state::after { transform: rotate(90deg); }
  .callouts-a .is-open .has-menu .callout-state::after { transform: rotate(-90deg); }
  .game-list { columns: 3; }
}

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