/* Wichtli — design tokens and base components (design-spec.md §2–§5).
   Components use tokens only; no raw hex outside the token blocks. */

/* ---------- Fonts (self-hosted, OFL; latin subset) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/instrument-sans.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens: light (default) ---------- */
:root {
  color-scheme: light;
  --paper: #F7F1E5;
  --paper-raised: #FFFBF3;
  --paper-sunk: #EFE6D4;
  --ink: #1F2A44;
  --ink-muted: #5B6178;
  --ink-faint: #8C8FA0;
  --line: #DCCFB8;
  --brand: #D9432F;
  --brand-ink: #FFFBF3;
  --brand-strong: #B8341F;
  --brand-pressed: #9C2B19;
  --accent: #F2A03D;
  --accent-ink: #1F2A44;
  --success: #2F5D50;
  --warning: #8F520A;
  --danger: #A3271A;
  --focus: #1F6FEB;
  --shadow-paper: 2px 2px 0 rgba(31, 42, 68, .12);
  --shadow-lift: 4px 4px 0 rgba(31, 42, 68, .14);

  /* §2.2 spacing, radius, size, z */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --r-xs: 4px; --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-full: 999px;
  --hit: 44px; --btn-md: 44px; --btn-lg: 52px;
  --z-header: 10; --z-sheet: 40; --z-toast: 60; --z-modal: 80;
  /* 6 px scallops on the top edge (Scherenschnitt border); hero, door, reveal cards only */
  --edge-scallop: radial-gradient(circle at 6px 0, transparent 6px, black 6.5px) 0 0 / 12px 100% repeat-x;

  /* §2.3 motion */
  --ease-paper: cubic-bezier(.2, .8, .2, 1);
  --ease-unfold: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 120ms;
  --t-base: 220ms;
  --t-unfold: 900ms;

  /* §3 typography: family, size/line (mobile), weight, axes */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --type-display: 600 44px/46px var(--font-display);
  --type-h1: 600 32px/36px var(--font-display);
  --type-h2: 600 26px/30px var(--font-display);
  --type-h3: 600 19px/26px var(--font-sans);
  --type-body: 400 17px/26px var(--font-sans);
  --type-small: 500 14px/20px var(--font-sans);
  --type-label: 600 13px/16px var(--font-sans);
  --type-num: 600 17px/26px var(--font-sans);
  --type-door: italic 700 28px/28px var(--font-display);

  --wrap: 1120px;
  --gutter: 16px;
}

/* ---------- Tokens: dark (system, unless forced light) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141B2D;
    --paper-raised: #1F2A44;
    --paper-sunk: #0F1524;
    --ink: #F7F1E5;
    --ink-muted: #B8BCCB;
    --ink-faint: #7D8297;
    --line: #2C3856;
    --brand: #EE6A54;
    --brand-ink: #141B2D;
    --brand-strong: #F58C79;
    --brand-pressed: #EE6A54;
    --accent: #F5B464;
    --accent-ink: #141B2D;
    --success: #6FB59E;
    --warning: #F5B464;
    --danger: #F58C79;
    --focus: #79B8FF;
    --shadow-paper: 2px 2px 0 rgba(0, 0, 0, .45);
    --shadow-lift: 4px 4px 0 rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141B2D;
  --paper-raised: #1F2A44;
  --paper-sunk: #0F1524;
  --ink: #F7F1E5;
  --ink-muted: #B8BCCB;
  --ink-faint: #7D8297;
  --line: #2C3856;
  --brand: #EE6A54;
  --brand-ink: #141B2D;
  --brand-strong: #F58C79;
  --brand-pressed: #EE6A54;
  --accent: #F5B464;
  --accent-ink: #141B2D;
  --success: #6FB59E;
  --warning: #F5B464;
  --danger: #F58C79;
  --focus: #79B8FF;
  --shadow-paper: 2px 2px 0 rgba(0, 0, 0, .45);
  --shadow-lift: 4px 4px 0 rgba(0, 0, 0, .5);
}

/* E-card tokens (W23): a card is a sheet of paper, the same in light and dark mode. */
.ecard, .ec-thumb {
  --ec-papier: #F7F1E5;
  --ec-raised: #FFFBF3;
  --ec-nacht: #1F2A44;
  --ec-rot: #D9432F;
  --ec-mandarin: #F2A03D;
  --ec-muted: #5B6178;
}
/* lg sizes for the type scale */
@media (min-width: 1024px) {
  :root {
    --type-display: 600 76px/76px var(--font-display);
    --type-h1: 600 48px/52px var(--font-display);
    --type-h2: 600 36px/40px var(--font-display);
    --type-h3: 600 22px/28px var(--font-sans);
  }
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; } /* a component's display rule must never undo the hidden attribute (shop «übersteigt» on load, W29) */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--type-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
main { flex: 1; padding-block: var(--s-6); }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0 0 var(--s-4); }
a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::placeholder { color: var(--ink-muted); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.small { font: var(--type-small); color: var(--ink-muted); }
.lead { color: var(--ink-muted); }
.num { font-variant-numeric: tabular-nums; }
.icon { flex: none; vertical-align: -0.15em; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: var(--z-modal);
  background: var(--paper-raised); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--s-2); }

/* Type tokens as classes */
.type-display { font: var(--type-display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; letter-spacing: -0.01em; }
.type-h1, h1 { font: var(--type-h1); font-variation-settings: "SOFT" 100, "opsz" 72; }
.type-h2, h2 { font: var(--type-h2); font-variation-settings: "SOFT" 50; }
.type-h3, h3 { font: var(--type-h3); }
.type-body { font: var(--type-body); }
.type-small { font: var(--type-small); }
.type-label { font: var(--type-label); letter-spacing: .06em; text-transform: uppercase; }
.type-num { font: var(--type-num); font-variant-numeric: tabular-nums; }
.type-door { font: var(--type-door); font-variation-settings: "WONK" 1; }

/* ---------- §5 Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--btn-md); min-width: var(--hit); padding: 0 var(--s-5);
  border-radius: var(--r-sm); border: 2px solid transparent;
  font: 600 16px/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-paper), box-shadow var(--t-fast) var(--ease-paper), background-color var(--t-fast) var(--ease-paper);
}
.btn-lg { min-height: var(--btn-lg); font-size: 17px; }
.btn-primary { background: var(--brand-strong); color: var(--brand-ink); box-shadow: var(--shadow-paper); }
.btn-primary:hover { box-shadow: var(--shadow-lift); transform: translate(-1px, -1px); }
.btn-primary:active { background: var(--brand-pressed); box-shadow: none; transform: translate(1px, 1px); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { box-shadow: var(--shadow-lift); transform: translate(-1px, -1px); }
.btn-secondary:active { box-shadow: none; transform: translate(1px, 1px); }
.btn-ghost { background: transparent; color: var(--brand-strong); padding-inline: var(--s-3); }
.btn-ghost:hover { text-decoration: underline; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--paper-sunk); color: var(--ink-faint); border-color: transparent;
  box-shadow: none; transform: none; cursor: not-allowed;
}

/* ---------- §5 Input ---------- */
.field { display: grid; gap: var(--s-1); margin-bottom: var(--s-4); }
.field label { font: 600 14px/20px var(--font-sans); }
.input {
  min-height: var(--hit); padding: var(--s-2) var(--s-3);
  background: var(--paper-raised); color: var(--ink);
  /* --ink-faint, not --line: a field's edge needs 3:1 against the paper (WCAG 1.4.11, a11y review W29) */
  border: 1.5px solid var(--ink-faint); border-radius: var(--r-sm); font: var(--type-body);
  max-width: 100%; min-width: 0; /* a file input's intrinsic width must not widen the page at 320 px (W29) */
}
.input:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.field-help { font: var(--type-small); color: var(--ink-muted); margin: 0; }
.field-err { display: flex; gap: var(--s-1); align-items: center; font: var(--type-small); color: var(--danger); margin: 0; }
.field-error .input { border-color: var(--danger); }

/* ---------- §5 Chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-1);
  min-height: 28px; padding: 0 var(--s-2); border-radius: var(--r-xs);
  background: var(--paper-sunk); color: var(--ink); font: var(--type-small);
}
.chip-accent { background: var(--accent); color: var(--accent-ink); }
.chip-success { color: var(--success); }
.chip-lock { color: var(--ink); }
.anon { display: inline-block; }
.anon summary { list-style: none; cursor: pointer; min-height: var(--hit); display: inline-flex; align-items: center; }
.anon summary::-webkit-details-marker { display: none; }
.anon-text { font: var(--type-small); color: var(--ink-muted); max-width: 36ch; margin: var(--s-1) 0 0; }

/* ---------- §5 Card ---------- */
.card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-paper); padding: var(--s-5);
}
.card-title { margin-bottom: var(--s-2); }
.card-scallop {
  border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0;
  -webkit-mask: var(--edge-scallop), linear-gradient(black 0 0) 0 6px / 100% calc(100% - 6px) no-repeat;
  mask: var(--edge-scallop), linear-gradient(black 0 0) 0 6px / 100% calc(100% - 6px) no-repeat;
  -webkit-mask-size: 12px 12px, 100% calc(100% - 6px);
  mask-size: 12px 12px, 100% calc(100% - 6px);
  padding-top: calc(var(--s-5) + 6px);
}

/* ---------- §5 Sheet ---------- */
.sheet {
  border: 0; padding: var(--s-5); width: 100%; max-width: 560px;
  margin: auto auto 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--paper-raised); color: var(--ink); box-shadow: var(--shadow-lift);
}
.sheet[open] { animation: sheet-in var(--t-base) var(--ease-paper); }
.sheet::backdrop { background: rgba(20, 27, 45, .45); }
.sheet-handle { width: 40px; height: 4px; border-radius: var(--r-full); background: var(--line); margin: 0 auto var(--s-4); }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 768px) { .sheet { margin: auto; border-radius: var(--r-lg); } }

/* ---------- §5 Stepper ---------- */
.stepper { display: flex; gap: var(--s-2); padding: 0; margin: 0 0 var(--s-5); list-style: none; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  background: var(--paper-sunk); border-radius: var(--r-sm) var(--r-sm) 0 0; font: var(--type-small);
}
.step-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: var(--r-full); border: 1.5px solid currentColor; font-variant-numeric: tabular-nums;
}
.step-current { background: var(--paper-raised); box-shadow: var(--shadow-lift); }
.step-done .step-num { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- §5 Toast ---------- */
.toast {
  position: fixed; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: var(--z-toast);
  background: var(--ink); color: var(--paper); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lift);
}
.toast[hidden] { display: none; }
@media (min-width: 768px) { .toast { left: auto; bottom: auto; top: var(--s-4); max-width: 360px; } }

/* ---------- §5 Empty state, price line ---------- */
.empty { display: grid; justify-items: center; gap: var(--s-3); text-align: center; padding: var(--s-5); }
.empty-art { width: 120px; color: var(--ink); }
.empty p { color: var(--ink-muted); margin: 0; }
.price-line { display: flex; align-items: baseline; gap: var(--s-2); padding-block: var(--s-1); }
.price-leader { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.price-label { overflow-wrap: normal; min-width: 0; }
.price-amount { font-weight: 600; white-space: nowrap; }
.price-total { font-weight: 600; border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-2); }

/* ---------- §5 Header, footer, language switch ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; flex-wrap: wrap; }
.header-brand { color: var(--ink); display: inline-flex; min-height: var(--hit); align-items: center; }
.wordmark-caps { fill: var(--brand); stroke: var(--brand); }
.header-links { display: none; gap: var(--s-5); }
.header-links a { color: var(--ink); text-decoration: none; min-height: var(--hit); display: inline-flex; align-items: center; }
.header-links a:hover { text-decoration: underline; }
.header-actions { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
.header-actions .btn-ghost { display: none; }
.site-header .lang-switch { display: none; }
@media (min-width: 1024px) {
  .header-links, .header-actions .btn-ghost, .site-header .lang-switch { display: inline-flex; }
}
.lang-switch { font: var(--type-small); display: inline-flex; align-items: center; }
.lang-switch a, .lang-switch [aria-current] {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--hit); min-height: var(--hit);
}
.lang-switch [aria-current] { font-weight: 700; color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-6); background: var(--paper-sunk); }
.footer-grid { display: grid; gap: var(--s-5); }
.footer-tagline { font: var(--type-h3); margin: var(--s-2) 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.footer-links a { display: inline-flex; min-height: var(--hit); align-items: center; }
.site-footer .wordmark { color: var(--ink); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 2fr 1fr; } }

/* ---------- §10.9 Advent calendar (W21) ---------- */
/* Village: paper house fronts under a scalloped roof line; windows 4 × 6, 6 × 4 from md. */
.village { background: var(--paper-sunk); border-radius: 0 0 var(--r-md) var(--r-md); padding: var(--s-5) var(--s-3) var(--s-4); }
.doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
@media (min-width: 768px) { .doors { grid-template-columns: repeat(6, 1fr); } }
/* Random but fixed visual slot per door (CSP: no inline styles); DOM order stays 1–24. */
.slot-1 { order: 1; } .slot-2 { order: 2; } .slot-3 { order: 3; } .slot-4 { order: 4; } .slot-5 { order: 5; } .slot-6 { order: 6; } .slot-7 { order: 7; } .slot-8 { order: 8; } .slot-9 { order: 9; } .slot-10 { order: 10; } .slot-11 { order: 11; } .slot-12 { order: 12; } .slot-13 { order: 13; } .slot-14 { order: 14; } .slot-15 { order: 15; } .slot-16 { order: 16; } .slot-17 { order: 17; } .slot-18 { order: 18; } .slot-19 { order: 19; } .slot-20 { order: 20; } .slot-21 { order: 21; } .slot-22 { order: 22; } .slot-23 { order: 23; } .slot-24 { order: 24; }
.door {
  display: grid; place-items: center; aspect-ratio: 3 / 4; min-height: var(--hit);
  background: var(--paper-raised); color: var(--ink); text-decoration: none;
  border: 1.5px solid var(--ink); border-radius: var(--r-full) var(--r-full) var(--r-xs) var(--r-xs);
  box-shadow: var(--shadow-paper); transition: transform var(--t-base) var(--ease-paper);
}
.door:hover { transform: translateY(-2px); }
.door-locked { background: var(--paper); border-style: dashed; }
.door-seen { background: var(--paper-sunk); }
.door-today { background: var(--accent); color: var(--accent-ink); }
.door-sheet { position: relative; overflow: hidden; }
.door-num { margin: 0; color: var(--brand); }
/* Opening: two shutter halves fold away (spec §2.3 unfold motion). */
.door-sheet::before, .door-sheet::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 50%; background: var(--accent);
  pointer-events: none; animation: shutter var(--t-unfold) var(--ease-unfold) forwards;
}
.door-sheet::before { left: 0; transform-origin: left center; }
.door-sheet::after { right: 0; transform-origin: right center; animation-name: shutter-r; }
@keyframes shutter { from { transform: perspective(900px) rotateY(0); } to { transform: perspective(900px) rotateY(-100deg); visibility: hidden; } }
@keyframes shutter-r { from { transform: perspective(900px) rotateY(0); } to { transform: perspective(900px) rotateY(100deg); visibility: hidden; } }
.like-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- §2.3 Motion: unfold ---------- */
.unfold { position: relative; perspective: 900px; }
.unfold-right { transform-origin: left center; animation: unfold var(--t-unfold) var(--ease-unfold) both; }
@keyframes unfold { from { transform: rotateY(-180deg); } to { transform: rotateY(0); } }
/* A whole card opening around its left fold (reveal cards, stage names; W22). */
.unfold-in { transform-origin: left center; animation: unfold-in var(--t-unfold) var(--ease-unfold) both; }
@keyframes unfold-in { from { transform: perspective(900px) rotateY(-110deg); opacity: 0; } 35% { opacity: 1; } to { transform: perspective(900px) rotateY(0); } }

/* Cut-paper stars: fall once (1.6 s) and stop (spec §2.3; max 24). Position, delay and size per
   star by nth-child (CSP: no inline styles). `.st-stars-slow` drifts gently on the stage title card. */
.st-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.st-star { position: absolute; top: -8%; width: 3.2%; min-width: 14px; aspect-ratio: 1; fill: var(--accent); opacity: 0;
  animation: star-fall 1.6s var(--ease-paper) both; }
.st-star:nth-child(4n+2) { fill: var(--brand); }
.st-star:nth-child(3n) { width: 2.2%; }
.st-star:nth-child(5n+1) { width: 4.2%; }
.st-stars-slow .st-star { animation: star-drift 9s linear infinite; opacity: .55; }
@keyframes star-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(105cqh) rotate(200deg); } }
@keyframes star-drift { from { transform: translateY(0) rotate(0); } to { transform: translateY(110cqh) rotate(160deg); } }
.st-stars { container-type: size; }
.st-star:nth-child(1) { left: 0%; animation-delay: 0ms; } .st-stars-slow .st-star:nth-child(1) { animation-delay: -0ms; }
.st-star:nth-child(2) { left: 37%; animation-delay: 53ms; } .st-stars-slow .st-star:nth-child(2) { animation-delay: -730ms; }
.st-star:nth-child(3) { left: 74%; animation-delay: 106ms; } .st-stars-slow .st-star:nth-child(3) { animation-delay: -1460ms; }
.st-star:nth-child(4) { left: 15%; animation-delay: 159ms; } .st-stars-slow .st-star:nth-child(4) { animation-delay: -2190ms; }
.st-star:nth-child(5) { left: 52%; animation-delay: 212ms; } .st-stars-slow .st-star:nth-child(5) { animation-delay: -2920ms; }
.st-star:nth-child(6) { left: 89%; animation-delay: 265ms; } .st-stars-slow .st-star:nth-child(6) { animation-delay: -3650ms; }
.st-star:nth-child(7) { left: 30%; animation-delay: 318ms; } .st-stars-slow .st-star:nth-child(7) { animation-delay: -4380ms; }
.st-star:nth-child(8) { left: 67%; animation-delay: 371ms; } .st-stars-slow .st-star:nth-child(8) { animation-delay: -5110ms; }
.st-star:nth-child(9) { left: 8%; animation-delay: 424ms; } .st-stars-slow .st-star:nth-child(9) { animation-delay: -5840ms; }
.st-star:nth-child(10) { left: 45%; animation-delay: 477ms; } .st-stars-slow .st-star:nth-child(10) { animation-delay: -6570ms; }
.st-star:nth-child(11) { left: 82%; animation-delay: 530ms; } .st-stars-slow .st-star:nth-child(11) { animation-delay: -7300ms; }
.st-star:nth-child(12) { left: 23%; animation-delay: 583ms; } .st-stars-slow .st-star:nth-child(12) { animation-delay: -8030ms; }
.st-star:nth-child(13) { left: 60%; animation-delay: 636ms; } .st-stars-slow .st-star:nth-child(13) { animation-delay: -8760ms; }
.st-star:nth-child(14) { left: 1%; animation-delay: 689ms; } .st-stars-slow .st-star:nth-child(14) { animation-delay: -490ms; }
.st-star:nth-child(15) { left: 38%; animation-delay: 742ms; } .st-stars-slow .st-star:nth-child(15) { animation-delay: -1220ms; }
.st-star:nth-child(16) { left: 75%; animation-delay: 795ms; } .st-stars-slow .st-star:nth-child(16) { animation-delay: -1950ms; }
.st-star:nth-child(17) { left: 16%; animation-delay: 848ms; } .st-stars-slow .st-star:nth-child(17) { animation-delay: -2680ms; }
.st-star:nth-child(18) { left: 53%; animation-delay: 1ms; } .st-stars-slow .st-star:nth-child(18) { animation-delay: -3410ms; }
.st-star:nth-child(19) { left: 90%; animation-delay: 54ms; } .st-stars-slow .st-star:nth-child(19) { animation-delay: -4140ms; }
.st-star:nth-child(20) { left: 31%; animation-delay: 107ms; } .st-stars-slow .st-star:nth-child(20) { animation-delay: -4870ms; }
.st-star:nth-child(21) { left: 68%; animation-delay: 160ms; } .st-stars-slow .st-star:nth-child(21) { animation-delay: -5600ms; }
.st-star:nth-child(22) { left: 9%; animation-delay: 213ms; } .st-stars-slow .st-star:nth-child(22) { animation-delay: -6330ms; }
.st-star:nth-child(23) { left: 46%; animation-delay: 266ms; } .st-stars-slow .st-star:nth-child(23) { animation-delay: -7060ms; }
.st-star:nth-child(24) { left: 83%; animation-delay: 319ms; } .st-stars-slow .st-star:nth-child(24) { animation-delay: -7790ms; }

/* ---------- Guess and in-app reveal (spec §10.7, §10.10; W22) ---------- */
.guess-results { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.guess-result { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.reveal-fold { position: relative; }
.reveal-fold summary { list-style: none; cursor: pointer; display: grid; gap: var(--s-3); justify-items: start; min-height: var(--hit); }
.reveal-fold summary::-webkit-details-marker { display: none; }
.reveal-fold[open] summary .btn { display: none; }
.reveal-open { position: relative; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px dashed var(--line); min-height: 120px; }
.reveal-open .type-h2 { margin: 0; }
.reveal-stamp { display: inline-block; margin: var(--s-2) 0 0; transform: rotate(-6deg); border: 3px solid var(--success); color: var(--success);
  border-radius: var(--r-sm); padding: var(--s-1) var(--s-3); font: 700 15px/1.4 var(--font-sans); text-transform: uppercase; letter-spacing: .08em; }
.remote-qr .qr { width: 220px; height: 220px; display: block; border-radius: var(--r-sm); box-shadow: var(--shadow-paper); }
.choice-help { margin: -4px 0 var(--s-2) 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
  }
  .unfold-right, .unfold-in { animation-name: fade-in; }
  .st-star { display: none; }
  .door-sheet::before, .door-sheet::after { display: none; }
  .btn:hover, .btn:active { transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- §12 Legal pages ---------- */
.legal { max-width: 720px; margin-inline: auto; padding-block: var(--s-6) var(--s-8); }
.legal section { margin-top: var(--s-6); scroll-margin-top: var(--s-5); }
.legal-meta { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.legal-operator { color: var(--ink-muted); }
.legal-toc { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); background: var(--paper-sunk); border-radius: var(--r-sm); }
.legal-toc ol { margin: var(--s-2) 0 0; padding-left: var(--s-5); }
.table-scroll { overflow-x: auto; margin-block: var(--s-4); }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.legal-table { width: 100%; border-collapse: collapse; font: var(--type-small); }
.legal-table caption { text-align: left; font-weight: 600; padding-bottom: var(--s-2); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); overflow-wrap: normal; min-width: 8rem; }
.legal-table thead th { border-bottom-width: 2px; }

@media print {
  .site-header, .site-footer, .skip-link, .toast, .legal-toc { display: none; }
  .legal { max-width: none; padding: 0; }
  .table-scroll { overflow: visible; }
  .legal-table th, .legal-table td { border-color: gray; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; }
  body { background: white; color: black; }
}

/* ---------- §9 Admin dashboard ---------- */
.admin-top {
  position: sticky; top: 0; z-index: var(--z-header);
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  min-height: 64px; padding-inline: var(--gutter);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.admin-runde { display: grid; margin: 0; min-width: 0; flex: 1; line-height: 1.25; }
.admin-runde > span:first-child { font-weight: 600; }
.admin-menu { margin-left: auto; }
.admin-menu summary { list-style: none; }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu[open] { flex-basis: 100%; order: 3; padding-bottom: var(--s-3); }
.admin-menu[open] summary { margin-bottom: var(--s-2); }
.admin-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.admin-side { display: none; }
.admin-main { padding: var(--s-5) var(--gutter) var(--s-7); max-width: 960px; width: 100%; min-width: 0; }
.admin-nav { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-1); }
.admin-nav a {
  display: flex; align-items: center; min-height: var(--hit); padding: 0 var(--s-3);
  border-radius: var(--r-sm); color: var(--ink); text-decoration: none;
}
.admin-nav a:hover { background: var(--paper-sunk); }
.admin-nav a[aria-current="page"] { background: var(--paper-raised); box-shadow: var(--shadow-paper); font-weight: 600; }
.admin-logout .btn { padding-inline: var(--s-3); }
@media (min-width: 1024px) {
  .admin-menu { display: none; }
  .admin-grid { grid-template-columns: 248px minmax(0, 1fr); }
  .admin-side { display: block; padding: var(--s-5) var(--s-4); border-right: 1px solid var(--line); background: var(--paper-sunk); }
  .admin-main { padding-inline: var(--s-6); }
}
.admin-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-5); }
.admin-head h1 { margin: 0; }
.phase { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.admin-cards { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-stack { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); } /* a wide table scrolls in its card, never the page (W29) */
.ring-row { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-3); }
.ring-row p { margin: 0; }
.ring circle { fill: none; stroke-width: 12; }
.ring-track { stroke: var(--paper-sunk); }
.ring-done { stroke: var(--success); stroke-linecap: round; }
.counts { margin: 0; display: grid; gap: var(--s-1); }
.counts div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); }
.counts dd { margin: 0; font-weight: 600; }
.todo { margin: 0; padding-left: var(--s-5); }
.todo a { display: inline-flex; min-height: var(--hit); align-items: center; }
.admin-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; }
.admin-list li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: var(--hit); border-bottom: 1px solid var(--line);
}
.notice { background: var(--paper-raised); border-left: 4px solid var(--success); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); }
.choice { border: 0; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: var(--s-1); }
.choice legend { padding: 0; margin-bottom: var(--s-2); color: var(--ink-muted); }
.choice label { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--hit); }
.choice input { width: 20px; height: 20px; accent-color: var(--brand-strong); }
@media print { .admin-top, .admin-side { display: none; } }
/* Onboarding (design-spec.md §8): full-screen stepper without the sidebar. */
.onb { padding: var(--s-5) var(--gutter) var(--s-7); max-width: 720px; width: 100%; margin-inline: auto; min-width: 0; }
.onb h1 { margin: var(--s-2) 0 var(--s-4); }
.onb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
/* Einladen (design-spec.md §9.2): paper tabs, filters, people table → cards on mobile. */
.tabs { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tabs a {
  display: inline-flex; align-items: center; min-height: var(--hit); padding: 0 var(--s-3);
  border-radius: var(--r-sm); color: var(--ink); text-decoration: none; background: var(--paper-sunk);
}
.tabs a[aria-current="page"] { background: var(--paper-raised); box-shadow: var(--shadow-lift); font-weight: 600; }
.filters { display: grid; gap: var(--s-3); align-items: end; margin-bottom: var(--s-4); }
@media (min-width: 768px) { .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.filters .field { margin: 0; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.bulk p { margin: 0; }
.row-errors { margin: var(--s-2) 0; padding-left: var(--s-5); color: var(--danger); }
.people { width: 100%; border-collapse: collapse; }
.people th, .people td { text-align: left; padding: var(--s-2); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.people thead th { font: var(--type-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
@media (max-width: 767px) {
  .people thead { display: none; }
  .people tr { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .people th, .people td { display: flex; justify-content: space-between; gap: var(--s-3); border: 0; padding: var(--s-1) 0; }
  .people td:empty { display: none; }
  .people [data-label]::before { content: attr(data-label); color: var(--ink-muted); font-weight: 400; }
}
.filters .input { width: 100%; min-width: 0; }

/* Onboarding step 5: P01 text preview (design-spec §8). */
.mail-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.875rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-2, 8px); padding: var(--s-3); margin: 0; max-height: 28rem; overflow-y: auto; }

/* Participant app (design-spec.md §10): 560 px column, bottom tab bar, Du. */
.app-top { display: flex; align-items: center; justify-content: center; min-height: 56px; padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.app-main { width: 100%; max-width: 560px; margin-inline: auto; padding: var(--s-5) var(--gutter) calc(var(--s-9) + var(--s-5)); min-width: 0; }
.app-stack { display: grid; gap: var(--s-4); }
.app-stack h1 { margin: 0; }
.app-form fieldset { border: 0; padding: 0; margin: 0 0 var(--s-4); min-width: 0; }
.app-form legend { font: 600 14px/20px var(--font-sans); padding: 0; margin-bottom: var(--s-2); }
.app-actions { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
.app-actions .btn-lg { width: 100%; }
.field.check { grid-template-columns: 24px minmax(0, 1fr); align-items: start; column-gap: var(--s-3); }
.field.check input { width: 22px; height: 22px; margin: 11px 0 0; accent-color: var(--brand-strong); }
.field.check label { font: var(--type-body); min-height: var(--hit); display: flex; align-items: center; }
.field.check .field-help, .field.check .field-err { grid-column: 2; }
.chips-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip-check {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--hit); padding: 0 var(--s-3);
  border: 1.5px solid var(--line); border-radius: var(--r-full); background: var(--paper-raised); cursor: pointer;
}
.chip-check:has(input:checked) { border-color: var(--ink); background: var(--paper-sunk); font-weight: 600; }
.chip-check input { accent-color: var(--brand-strong); width: 18px; height: 18px; margin: 0; }
textarea.input { font: inherit; resize: vertical; }
.input:disabled { background: var(--paper-sunk); color: var(--ink-muted); }
.notice-list, .notice { margin: 0 0 var(--s-3); }
ul.notice { background: none; border: 0; padding-left: var(--s-5); display: grid; gap: var(--s-2); }
.join-art { color: var(--ink); max-width: 240px; margin: 0 auto var(--s-3); }
.join-art .hero-art { display: block; width: 100%; height: 150px; }
.join-art .name-tag { display: none; }
.q-progress { margin: 0; }
.q-dots { display: inline-flex; gap: var(--s-2); }
.q-dots span { width: 12px; height: 12px; border-radius: var(--r-full); border: 2px solid var(--ink); }
.q-dots span.on { background: var(--brand); border-color: var(--brand); }
.q-badge { margin: 0; }
/* §10.8 participant shop (W18): 2 columns on phones, sticky total above the tab bar. */
.app-main .shop-grid { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .app-main .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* one column on phones: two broke «Scherenschnitt-Stil» mid-word (W29) */
.app-main .shop-card { display: grid; gap: var(--s-2); align-content: start; }
.app-main .shop-card h2, .app-main .shop-card h3, .app-main .shop-card p { margin: 0; }
.app-main .shop-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.shop-bar { position: sticky; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 1; background: var(--paper-raised); border-top: 1px solid var(--line); padding: var(--s-3) 0; display: grid; gap: var(--s-2); }
.shop-bar p { margin: 0; }
.app-nav {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-header); background: var(--paper-raised);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.app-nav ul { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app-tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; padding: var(--s-2) 2px; color: var(--ink-muted); text-decoration: none; font: 500 11px/16px var(--font-sans); text-align: center; overflow-wrap: normal; hyphens: auto;
}
a.app-tab:hover { color: var(--ink); }
.app-tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.app-tab[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 24px; height: 8px; transform: translateX(-50%);
  background: var(--brand); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.app-tab[aria-disabled="true"] { color: var(--ink-faint); }
@media print { .app-nav { display: none; } }
/* ---------- §8 Checkout ---------- */
.co { padding-block: var(--s-5) var(--s-6); }
.co-test { margin: 0 0 var(--s-4); }
.co-grid { display: grid; gap: var(--s-5); }
.co-main { min-width: 0; display: grid; gap: var(--s-3); align-content: start; }
.co-form { display: grid; gap: var(--s-4); }
.co-radios { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-1); }
.co-radios legend { font-weight: 600; margin-bottom: var(--s-1); }
.co-radio, .co-check label { display: flex; gap: var(--s-2); align-items: center; min-height: var(--hit); }
.co-radio input, .co-check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.co-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
.co-chips .chip { min-height: var(--hit); display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.co-notices { display: grid; gap: var(--s-2); }
.co-notice { display: block; border-radius: var(--r-sm); padding: var(--s-2) var(--s-3); white-space: normal; margin: 0; }
.co-notice a { color: inherit; }
.co-timeline { background: var(--paper-raised); border: 1px dashed var(--line); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); }
.co-timeline ol { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-1); }
.co-review { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.co-review-list { padding-left: var(--s-4); display: grid; gap: var(--s-2); }
.co-total { list-style: none; padding: 0; margin: var(--s-2) 0 0; font-weight: 600; border-top: 1px solid var(--line); padding-top: var(--s-2); }
.co-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.co-sum-side { display: none; }
.co-sum-bar {
  position: sticky; bottom: 0; z-index: var(--z-header); background: var(--paper-raised);
  border-top: 1px solid var(--line); margin-inline: calc(-1 * var(--s-4)); padding: var(--s-2) var(--s-4);
}
.co-sum-static { position: static; margin-top: var(--s-4); }
.co-sum-bar summary { min-height: var(--hit); display: flex; align-items: center; justify-content: space-between; font-weight: 600; cursor: pointer; }
@media (min-width: 1024px) {
  .co-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
  .co-sum-side { display: block; position: sticky; top: 88px; align-self: start; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); }
  .co-sum-bar { display: none; }
}
.co-envelope { width: 96px; height: 64px; position: relative; background: var(--paper-raised); border: 2px solid var(--brand); border-radius: var(--r-sm); perspective: 400px; }
.co-envelope-flap { position: absolute; inset: 0 0 auto; height: 50%; border-bottom: 2px solid var(--brand); transform-origin: top; animation: co-unfold 700ms ease-out both; }
@keyframes co-unfold { from { transform: rotateX(0); } to { transform: rotateX(180deg); } }
@media (prefers-reduced-motion: reduce) { .co-envelope-flap { animation: none; transform: rotateX(180deg); } }

/* Anonymous chat and hints (design-spec.md §10.5, §10.6; W16) */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.bubble { max-width: 85%; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--paper-raised); box-shadow: var(--shadow-paper); justify-self: start; min-width: 0; }
.bubble-own { justify-self: end; background: var(--paper); border: 2px solid var(--brand-strong); box-shadow: none; }
.bubble-who { display: block; font: 600 13px/18px var(--font-sans); color: var(--ink-muted); }
.bubble-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-muted { color: var(--ink-muted); font-style: italic; }
.bubble-report { display: inline-block; margin-top: var(--s-1); color: var(--ink-muted); }
.chat-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.notice-warn { border-left-color: var(--warning); }
.hints { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-3); }
.hint-card { padding: var(--s-3) var(--s-4); background: var(--paper-raised); border-radius: var(--r-sm); box-shadow: var(--shadow-paper); }
.hint-card p { margin: 0 0 var(--s-1); overflow-wrap: anywhere; }
.hint-label { color: var(--ink-muted); font-weight: 600; }
.hint-templates { list-style: none; padding: 0; margin: 0 0 var(--s-3); }
.hint-templates .chip { text-decoration: none; color: var(--ink); min-height: var(--hit); display: inline-flex; align-items: center; }
blockquote { margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); border-left: 3px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- E-cards (architecture.md §13, W23 · SCRUM-396) ----------
   Ink on paper per scheme; the card unfolds from its crease: the left half stays,
   the right half turns over (900 ms), then the note rises. Static under reduced motion. */
.ec-paper { --ec-bg: var(--ec-papier); --ec-ink: var(--ec-nacht); }
.ec-red { --ec-bg: var(--ec-rot); --ec-ink: var(--ec-papier); }
.ec-night { --ec-bg: var(--ec-nacht); --ec-ink: var(--ec-papier); }
.ec-art { display: block; width: 100%; height: auto; color: var(--ec-ink); }
.ec-art .ec-a { fill: var(--ec-mandarin); }
.ec-art .ec-paper-cut, .ec-art .ec-moon-cut { fill: var(--ec-bg); }
.ec-thumb { display: block; background: var(--ec-bg); border-radius: var(--r-xs); box-shadow: var(--shadow-paper); overflow: hidden; }

.ecard { margin: 0 auto; max-width: 440px; width: 100%; }
.ec-fold { position: relative; display: flex; aspect-ratio: 200 / 140; perspective: 1200px; filter: drop-shadow(2px 2px 0 rgba(31, 42, 68, .14)); }
.ec-half { position: relative; width: 50%; overflow: hidden; background: var(--ec-bg); }
.ec-half .ec-art { width: 200%; max-width: none; }
.ec-left { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.ec-right { border-radius: 0 var(--r-sm) var(--r-sm) 0; transform-origin: left center; backface-visibility: hidden;
  animation: ec-unfold var(--t-unfold) var(--ease-unfold) 250ms both; }
.ec-right .ec-art { margin-left: -100%; }
.ec-crease { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(31, 42, 68, .18); pointer-events: none; }
@keyframes ec-unfold { from { transform: rotateY(-179deg); } to { transform: rotateY(0); } }
.ec-note { margin: var(--s-4) var(--s-2) 0; padding: var(--s-4) var(--s-5); background: var(--ec-raised); color: var(--ec-nacht);
  border-radius: var(--r-sm); box-shadow: var(--shadow-paper); animation: ec-rise 500ms var(--ease-paper) 1100ms both; }
.ec-text { margin: 0 0 var(--s-3); font: italic 500 21px/30px var(--font-display); white-space: pre-line; overflow-wrap: anywhere; }
.ec-sign { margin: 0; font: var(--type-small); color: var(--ec-muted); }
@keyframes ec-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Gentle loops inside the art: snow falls, stars twinkle, windows and flames glow. */
.ecard .ec-flake { animation: ec-fall 7s linear infinite; }
.ecard .ec-flake[data-i="1"] { animation-delay: -1.4s; } .ecard .ec-flake[data-i="2"] { animation-delay: -2.8s; }
.ecard .ec-flake[data-i="3"] { animation-delay: -4.2s; } .ecard .ec-flake[data-i="4"] { animation-delay: -5.6s; }
@keyframes ec-fall { from { transform: translateY(-20px); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { transform: translateY(90px); opacity: 0; } }
.ecard .ec-twinkle path, .ecard .ec-lit > *, .ecard .ec-flame > * { transform-box: fill-box; transform-origin: center; animation: ec-twinkle 2.6s ease-in-out infinite; }
.ecard [data-i="1"] { animation-delay: -.7s; } .ecard [data-i="2"] { animation-delay: -1.3s; } .ecard [data-i="3"] { animation-delay: -1.9s; }
@keyframes ec-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }
@media (prefers-reduced-motion: reduce) {
  .ec-right, .ec-note, .ecard .ec-flake, .ecard .ec-twinkle path, .ecard .ec-lit > *, .ecard .ec-flame > * { animation: none !important; }
}

/* Composer: the design picker is a radio grid of thumbnails. */
.ec-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); border: 0; margin: 0; padding: 0; }
.ec-pick { position: relative; display: grid; gap: var(--s-1); cursor: pointer; font: var(--type-small); }
.ec-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ec-pick .ec-thumb { outline: 3px solid transparent; outline-offset: 2px; }
.ec-pick input:checked + .ec-thumb { outline-color: var(--brand); }
.ec-pick input:focus-visible + .ec-thumb { outline-color: var(--focus); }
.ec-pick input:disabled + .ec-thumb { opacity: .45; }
.ec-preview-text { white-space: pre-line; }
/* Chat bubble attachment and the «cards for you» list. */
.bubble-card { display: grid; grid-template-columns: 88px 1fr; gap: var(--s-3); align-items: center; margin-top: var(--s-2); }
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.card-list li { display: grid; grid-template-columns: 88px 1fr; gap: var(--s-3); align-items: center; }
.ec-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-6); margin-block: var(--s-6); }
/* ---------- §9.8 Bericht + Wichtli-Jahr (W26) ---------- */
/* chart-paper: a paper sheet with a scalloped top, hero numbers as cut-paper tiles, door strips. */
.rp-mast {
  position: relative; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-paper); padding: var(--s-5); padding-top: var(--s-6);
}
.rp-caps { display: block; width: 72px; height: 36px; margin-bottom: var(--s-3); fill: var(--ink); }
.rp-cap-accent { fill: var(--brand); }
.rp-kicker { font: var(--type-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s-3); }
.rp-fazit { font: var(--type-h3); font-family: var(--font-display); font-size: 22px; line-height: 30px; max-width: 46ch; }
.rp-heroes { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .rp-heroes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rp-hero {
  display: grid; align-content: start; gap: var(--s-1); padding: var(--s-4); border-radius: var(--r-sm);
  background: var(--paper-sunk); border-top: 4px solid var(--accent); box-shadow: var(--shadow-paper);
}
.rp-hero-participation { border-top-color: var(--brand); }
.rp-hero-label { font: var(--type-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.rp-hero-value { font: var(--type-h1); font-family: var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.rp-hero-sub { font: var(--type-num); color: var(--brand-strong); }
.rp-sections { display: grid; gap: var(--s-4); }
@media (min-width: 1100px) { .rp-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-interaction { grid-column: 1 / -1; } }
.rp-section { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.rp-section .lead { margin-bottom: var(--s-3); }
.rp-rows { margin: 0; display: grid; }
.rp-row { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px dotted var(--line); }
.rp-row dd { margin: 0; font-weight: 600; white-space: nowrap; }
.rp-groups { margin-top: var(--s-4); }
.rp-groups ul { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.rp-groups li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); }
.rp-group-value { font-weight: 600; }
.rp-track { grid-column: 1 / -1; width: 100%; height: 6px; display: block; }
.rp-track-bg { fill: var(--paper-sunk); }
.rp-bar { fill: var(--accent); }
.rp-groups .rp-bar, .rp-bar-24 { fill: var(--brand); }
.rp-bar-none { fill: none; stroke: var(--ink-faint); stroke-dasharray: 2 2; }
.rp-axis { stroke: var(--line); }
.rp-tick { font: 600 9px var(--font-sans); fill: var(--ink-muted); }
.rp-doors { margin: var(--s-4) 0 0; }
.rp-doors svg { width: 100%; height: auto; display: block; margin-top: var(--s-2); }
.rp-cards { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .rp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Wichtli-Jahr page: one centred sheet, Nachtblau band like the landing's final CTA. */
.jahr { max-width: 760px; margin-inline: auto; display: grid; gap: var(--s-5); }
.jahr-top { display: flex; justify-content: space-between; align-items: center; }
.jahr-sheet { text-align: left; }
.jahr-sheet h1 { font: var(--type-display); font-family: var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; margin-bottom: var(--s-2); }
.jahr-more { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.jahr-more li { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s-4); display: grid; gap: var(--s-1); }
.jahr-more strong { font: var(--type-h2); font-family: var(--font-display); }
.jahr-close { background: var(--ink); color: var(--paper); border-radius: var(--r-md); padding: var(--s-5); font: var(--type-h3); font-family: var(--font-display); font-size: 22px; line-height: 30px; }
.jahr-foot { text-align: center; }
.jahr-foot a { color: var(--ink-muted); }
/* Pulse 1–5: five big paper tabs. */
.pulse { border: 0; padding: 0; margin: 0 0 var(--s-3); }
.pulse-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); }
.pulse-scale label {
  min-height: var(--btn-lg); display: grid; place-items: center; border: 2px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper-raised); font: var(--type-h3); cursor: pointer;
}
.pulse-scale label:has(input:checked) { border-color: var(--ink); background: var(--accent); color: var(--accent-ink); }
.pulse-scale label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pulse-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pulse-ends { display: flex; justify-content: space-between; margin-top: var(--s-1); }
/* «Für 2027 vormerken» on the landing's final band. */
.optin-form { display: grid; gap: var(--s-3); max-width: 520px; margin-inline: auto; text-align: left; }
.optin-form .check { align-items: flex-start; }

/* Personalised GIF (W24 · SCRUM-397, free since SCRUM-407): the e-card colours, a 12-frame loop (steps(12),
   200 ms per frame) only under .gif-play; the chat bubble shows the first frame. */
.gif .gf-name { font-family: var(--font-display); font-weight: 600; }
.gif-play .ec-flake { animation: ec-fall 2.4s steps(12) infinite; }
.gif-play .ec-flake[data-i="1"] { animation-delay: -.48s; } .gif-play .ec-flake[data-i="2"] { animation-delay: -.96s; }
.gif-play .ec-flake[data-i="3"] { animation-delay: -1.44s; } .gif-play .ec-flake[data-i="4"] { animation-delay: -1.92s; }
.gif-play .gf-bob { animation: gf-bob 1.2s steps(12) infinite; }
.gif-play .gf-twinkle, .gif-play .ec-twinkle path { transform-box: fill-box; transform-origin: center; animation: ec-twinkle 2.4s steps(12) infinite; }
.gif-play .gf-sway { transform-box: fill-box; transform-origin: 50% 0; animation: gf-sway 2.4s steps(12) infinite; }
.gif-play .gf-walk { animation: gf-walk 2.4s steps(12) infinite alternate; }
.gif-play .gf-lit > * { animation: gf-lit 2.4s steps(1) infinite; }
.gif-play .gf-lit > [data-i="1"] { animation-delay: .4s; } .gif-play .gf-lit > [data-i="2"] { animation-delay: .8s; }
.gif-play .gf-lit > [data-i="3"] { animation-delay: 1.2s; } .gif-play .gf-lit > [data-i="4"] { animation-delay: 1.6s; } .gif-play .gf-lit > [data-i="5"] { animation-delay: 2s; }
.gif-play .gf-rise { animation: gf-rise 2.4s steps(12) infinite; }
.gif-play .gf-lid { animation: gf-lid 2.4s steps(12) infinite; }
@keyframes gf-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes gf-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes gf-walk { from { transform: translateX(-10px); } to { transform: translateX(10px); } }
@keyframes gf-lit { 0% { opacity: .25; } 50% { opacity: 1; } }
@keyframes gf-rise { 0% { transform: translateY(34px); opacity: 0; } 40%, 100% { transform: none; opacity: 1; } }
@keyframes gf-lid { 0% { transform: none; } 30%, 100% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .gif-play *, .gif-play .ec-twinkle path { animation: none !important; }
}
.gif-page { max-width: 480px; margin: 0 auto; width: 100%; }
