/* ==========================================================================
   Pixel Party 2.0 – Designsystem „Confetti Pop“
   Farben aus dem Logo: Petrol (Schrift), Türkis (Marke), Koralle (Aktion), Sonnengelb (Akzent).
   Hell = „Tag“ (Creme), Dunkel = „Partynacht“ (tiefes Petrol). Eine Datei für alle Seiten:
   body.app = Portal (Admin/Veranstalter/Startseite), body.guest = Gäste-Seiten fürs Handy.
   ========================================================================== */

:root {
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bg: #fff8f0;
  --surface: #ffffff;
  --surface-2: #f7f0e7;
  --ink: #0f2f3b;
  --muted: #566a72;
  --line: #ecdfd0;
  --brand: #0f8178;
  --on-brand: #ffffff;
  --brand-soft: #dcf3ef;
  --pop: #f2453d;
  --pop-2: #e3336f;
  --on-pop: #ffffff;
  --pop-soft: #ffe4df;
  --sun: #ffc23d;
  --sun-soft: #fff1cc;
  --danger: #c4302b;
  --danger-soft: #fde4e2;
  --ok: #1b8550;
  --ok-soft: #dcf4e6;
  --warn: #9a5b00;
  --shadow-1: 0 1px 2px rgb(15 47 59 / .05), 0 6px 20px rgb(15 47 59 / .06);
  --shadow-2: 0 2px 6px rgb(15 47 59 / .08), 0 20px 44px rgb(15 47 59 / .14);
  --glass: rgb(255 248 240 / .72);
  --blob-a: rgb(15 129 120 / .16);
  --blob-b: rgb(242 69 61 / .13);
  --blob-c: rgb(255 194 61 / .2);
  color-scheme: light;
}

/* Partynacht: automatisch nach Systemeinstellung – außer „hell“ wurde gewählt … */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08151d;
    --surface: #10222c;
    --surface-2: #0b1b24;
    --ink: #eaf4f3;
    --muted: #93abb3;
    --line: #1d3743;
    --brand: #3ccabc;
    --on-brand: #032420;
    --brand-soft: #0f3a37;
    --pop-soft: #3d1a1c;
    --sun: #ffcf5c;
    --sun-soft: #33290f;
    --danger: #ff8a80;
    --danger-soft: #3b1715;
    --ok: #6fd8a0;
    --ok-soft: #10301f;
    --warn: #ffbf5e;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .35), 0 24px 56px rgb(0 0 0 / .45);
    --glass: rgb(8 21 29 / .72);
    --blob-a: rgb(60 202 188 / .14);
    --blob-b: rgb(242 69 61 / .14);
    --blob-c: rgb(255 194 61 / .08);
    color-scheme: dark;
  }
}
/* … oder ausdrücklich „dunkel“ gewählt */
:root[data-theme="dark"] {
  --bg: #08151d;
  --surface: #10222c;
  --surface-2: #0b1b24;
  --ink: #eaf4f3;
  --muted: #93abb3;
  --line: #1d3743;
  --brand: #3ccabc;
  --on-brand: #032420;
  --brand-soft: #0f3a37;
  --pop-soft: #3d1a1c;
  --sun: #ffcf5c;
  --sun-soft: #33290f;
  --danger: #ff8a80;
  --danger-soft: #3b1715;
  --ok: #6fd8a0;
  --ok-soft: #10301f;
  --warn: #ffbf5e;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .35), 0 24px 56px rgb(0 0 0 / .45);
  --glass: rgb(8 21 29 / .72);
  --blob-a: rgb(60 202 188 / .14);
  --blob-b: rgb(242 69 61 / .14);
  --blob-c: rgb(255 194 61 / .08);
  color-scheme: dark;
}

/* Konfetti als Muster (SVG, CSP erlaubt data:-Bilder) */
:root {
  --confetti: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg opacity='.6'%3E%3Crect x='14' y='20' width='12' height='4' rx='2' fill='%23ffc23d' transform='rotate(35 20 22)'/%3E%3Ccircle cx='78' cy='32' r='3' fill='%23ffffff'/%3E%3Crect x='132' y='14' width='11' height='4' rx='2' fill='%23ff6a5c' transform='rotate(-25 137 16)'/%3E%3Ccircle cx='156' cy='88' r='2.5' fill='%23ffc23d'/%3E%3Crect x='44' y='96' width='12' height='4' rx='2' fill='%23ffffff' transform='rotate(70 50 98)'/%3E%3Ccircle cx='22' cy='154' r='3' fill='%2337c6b8'/%3E%3Crect x='104' y='140' width='12' height='4' rx='2' fill='%23ffc23d' transform='rotate(-50 110 142)'/%3E%3Ccircle cx='110' cy='70' r='2' fill='%23ffffff'/%3E%3Cpath d='M150 150l6 3-6 3z' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E");
}

/* --- Grundlagen ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; }
[hidden] { display: none !important; }  /* sonst gewinnt z. B. .icon-btn { display: … } */
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
/* weiche Farbflecken im Hintergrund */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55vmax 45vmax at -5% -10%, var(--blob-a), transparent 62%),
    radial-gradient(45vmax 40vmax at 105% 0%, var(--blob-b), transparent 60%),
    radial-gradient(50vmax 40vmax at 90% 110%, var(--blob-c), transparent 60%);
}
main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.25rem); font-weight: 800; margin: 0 0 .4rem; }
h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 .6rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .35rem; }
p { text-wrap: pretty; }
::selection { background: var(--sun); color: #0f2f3b; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* --- Hilfsklassen -------------------------------------------------------- */

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.center-row { justify-content: center; }
.mono { font-family: var(--font-mono); font-size: .85em; word-break: break-all; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; gap: 12px; }
.gap { gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 260px; }
.top-gap { margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.inline-form { margin: 0; display: inline; }
.inactive { opacity: .5; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.danger-text { color: var(--danger) !important; }
.success { color: var(--ok); font-weight: 600; }
.confirm-name { font-size: 1rem; user-select: all; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Kopfzeile ----------------------------------------------------------- */

.instance-banner {
  background: repeating-linear-gradient(-45deg, #c0392b 0 14px, #a5281d 14px 28px);
  color: #fff; text-align: center; font-weight: 800; letter-spacing: .08em; padding: 5px 12px; font-size: .78rem;
}
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)); min-height: 66px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: inline-flex; align-items: center; border-radius: 14px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 44px; width: auto; filter: drop-shadow(0 2px 6px rgb(15 47 59 / .18)); transition: transform .3s var(--spring); }
.brand:hover img { transform: rotate(-2deg) scale(1.03); }
@media (max-width: 480px) { .brand img { height: 38px; } }
@media (max-width: 380px) {
  .topbar { gap: 6px; padding-inline: 12px; }
  .brand img { height: 31px; }
  .topbar-right { gap: 4px; }
  .mainnav a { padding: .45rem .6rem; }
  .icon-btn { width: 38px; height: 38px; }
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav a, .mainnav button.link {
  font-family: var(--font-display); font-weight: 650; font-size: .95rem; color: var(--ink);
  padding: .5rem .85rem; border-radius: 999px; text-decoration: none; transition: background .15s;
}
.mainnav a:hover, .mainnav button.link:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); text-decoration: none; }
.mainnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.mainnav form { margin: 0; }
.mainnav .nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; padding: 0; box-shadow: none; transition: transform .2s var(--spring), border-color .15s;
}
.icon-btn:hover { border-color: var(--brand); text-decoration: none; transform: rotate(-8deg); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* Handy: Menü als Popover (HTML5 popover); ohne Unterstützung bleibt die Leiste einfach sichtbar */
@media (max-width: 860px) {
  @supports selector(:popover-open) {
    .menu-btn { display: inline-grid; }
    .mainnav[popover] {
      position: fixed; inset: 72px 12px auto auto; margin: 0; min-width: 230px;
      flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
      background: var(--surface); color: var(--ink); border: 1px solid var(--line);
      border-radius: var(--radius-md); box-shadow: var(--shadow-2);
    }
    /* .mainnav { display: flex } würde die Browser-Regel für geschlossene Popover überstimmen */
    .mainnav[popover]:not(:popover-open) { display: none; }
    .mainnav[popover]:popover-open { display: flex; animation: pop-in .22s var(--spring); }
    .mainnav[popover] a, .mainnav[popover] button.link { padding: .7rem .9rem; text-align: left; justify-content: flex-start; width: 100%; border-radius: 12px; }
    .mainnav[popover] .nav-sep { width: auto; height: 1px; margin: 4px 6px; }
  }
}
@media (min-width: 861px) { .mainnav[popover] { display: flex; position: static; inset: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; color: inherit; } }

/* Design-Schalter: Mond im hellen, Sonne im dunklen Design */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* --- Fußzeile ------------------------------------------------------------ */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); font-size: .82rem;
}
.site-footer a { color: var(--muted); padding: .25rem .6rem; border-radius: 999px; }
.site-footer a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); text-decoration: none; }
.site-footer .version-link { border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.site-footer .theme-toggle { width: auto; height: auto; padding: .3rem .75rem; gap: 6px; display: inline-flex; font-size: .82rem; color: var(--muted); }
.site-footer .theme-toggle svg { width: 15px; height: 15px; }

/* --- Knöpfe -------------------------------------------------------------- */

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: 700 .95rem/1.2 var(--font-display); letter-spacing: .005em; cursor: pointer;
  padding: .7rem 1.2rem; border-radius: 999px; border: 0;
  background: var(--brand); color: var(--on-brand); text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent);
  transition: transform .18s var(--spring), box-shadow .18s, background .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
}
button:hover, .button:hover { transform: translateY(-1px); text-decoration: none; }
button:active, .button:active { transform: scale(.97); }
button.secondary, .button.secondary {
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line);
}
button.secondary:hover, .button.secondary:hover { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); }
button.danger, .button.danger, .small-btn.danger {
  background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 60%, transparent);
}
button.danger:hover, .small-btn.danger:hover { background: var(--danger-soft); }
button.link {
  background: none; box-shadow: none; padding: 0; border-radius: 4px; color: var(--brand);
  font-family: var(--font-body); font-weight: 600; font-size: inherit; line-height: inherit; white-space: normal;
}
button.link:hover { transform: none; text-decoration: underline; }
.small-btn { padding: .38rem .8rem; font-size: .82rem; }
.button.big, button.big, .primary {
  padding: .95rem 1.6rem; font-size: 1.06rem;
  background: linear-gradient(135deg, var(--pop), var(--pop-2)); color: var(--on-pop);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--pop) 85%, transparent), inset 0 1px 0 rgb(255 255 255 / .25);
}
.button.big:hover, .primary:hover { box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--pop) 90%, transparent), inset 0 1px 0 rgb(255 255 255 / .25); }
.button.big.secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-1); }
button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* --- Formulare ----------------------------------------------------------- */

label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: .9rem; }
label.inline { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); min-width: 0;
  padding: .72rem .9rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237d9198' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .95rem center;
}
input[type=color] { padding: 3px; height: 44px; width: 88px; cursor: pointer; }
input[type=file] { padding: .5rem; }
input[type=file]::file-selector-button {
  font: 700 .85rem var(--font-display); border: 0; border-radius: 999px; padding: .5rem .9rem; margin-right: .8rem;
  background: var(--brand-soft); color: var(--brand); cursor: pointer;
}
/* Eigene Ankreuzfelder – feste Größe, sonst schrumpft Safari sie neben langem Text */
input[type=checkbox], input[type=radio] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; min-width: 22px; margin: 0; padding: 0;
  border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 7px;
  background: var(--surface); display: inline-grid; place-content: center; cursor: pointer;
  transition: background .15s, border-color .15s, transform .2s var(--spring);
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]::before, input[type=radio]::before {
  content: ""; width: 12px; height: 12px; transform: scale(0); transition: transform .2s var(--spring);
  background: var(--on-brand);
}
input[type=checkbox]::before { clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
input[type=radio]::before { border-radius: 50%; width: 10px; height: 10px; }
input[type=checkbox]:checked, input[type=radio]:checked { background: var(--brand); border-color: var(--brand); }
input[type=checkbox]:checked::before, input[type=radio]:checked::before { transform: scale(1); }
input[type=checkbox]:active { transform: scale(.9); }
input[type=checkbox]:focus, input[type=radio]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.hint { font-weight: 400; font-size: .8rem; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full, .form-grid h2 { grid-column: 1 / -1; }
.form-grid h2 { margin: 12px 0 -2px; padding-top: 16px; border-top: 1px dashed var(--line); }
.form-grid h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.checks { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-grid input:not([type=checkbox]):not([type=radio]):not([type=color]), .form-grid select, .form-grid textarea { width: 100%; }
.share-option { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; }
label.consent-admin { gap: 12px; align-items: flex-start; font-size: .88rem; font-weight: 500; }
.consent-admin input { margin-top: 1px; }

/* --- Karten, Hinweise, Abzeichen ----------------------------------------- */

.card {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-1);
}
.card.narrow { max-width: 440px; margin: 48px auto; }
.card.wide-narrow { max-width: 540px; }
.card.narrow h1 { font-size: 1.75rem; }
.card.highlight {
  background: linear-gradient(135deg, var(--sun-soft), var(--surface) 70%);
  border-color: color-mix(in srgb, var(--sun) 55%, transparent);
}
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.error {
  color: var(--danger); background: var(--danger-soft); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600;
}
.error ul { margin: 0; padding-left: 1.2rem; }
.notice {
  background: var(--brand-soft); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-sm);
  border-left: 4px solid var(--brand);
}
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: .18rem .65rem; border-radius: 999px;
  font: 700 .74rem/1.4 var(--font-display); letter-spacing: .02em;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.badge.ok, .badge.mail-sent { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.muted, .badge.mail-preview, .badge.status-entwurf { color: var(--muted); }
.badge.status-eingereicht { background: var(--sun-soft); color: var(--warn); border-color: transparent; }
.badge.status-abgelehnt, .badge.mail-failed { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* --- Portal: Rahmen ------------------------------------------------------ */

body.app main { max-width: 1140px; margin: 0 auto; padding: 28px 16px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }

.subnav, .tabs-inline {
  display: flex; gap: 4px; padding: 5px; margin: 14px 0 22px; width: fit-content; max-width: 100%;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  overflow-x: auto; scrollbar-width: none;
}
.subnav::-webkit-scrollbar, .tabs-inline::-webkit-scrollbar { display: none; }
.subnav a, .tabs-inline a {
  flex: none; padding: .5rem 1rem; border-radius: 999px; color: var(--muted);
  font: 650 .9rem var(--font-display); white-space: nowrap; transition: background .15s, color .15s;
}
.subnav a:hover, .tabs-inline a:hover { color: var(--ink); text-decoration: none; }
.subnav a.active, .tabs-inline a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Event-Kacheln */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; margin: 18px 0; }
.event-card {
  display: block; color: var(--ink); position: relative; overflow: hidden; padding: 0 22px 20px; margin: 0;
  transition: transform .25s var(--spring), box-shadow .25s;
}
.event-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-2); }
.event-card-bar {
  height: 74px; margin: 0 -22px 16px;
  background:
    var(--confetti),
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--event-color) 70%, #fff), transparent 60%),
    linear-gradient(135deg, var(--event-color), color-mix(in srgb, var(--event-color) 60%, #0f2f3b));
}
.event-card h2 { margin-bottom: 4px; }
.event-card p { margin: 4px 0; }
.event-card .badge { margin-top: 6px; }

/* Event-Übersicht */
.qr { background: #fff; padding: 10px; border-radius: 18px; width: 220px; height: 220px; box-shadow: var(--shadow-1); }
.password {
  display: inline-block; font: 800 1.9rem/1.2 var(--font-display); letter-spacing: .04em; margin: 2px 0 14px;
  padding: .3rem 1rem; border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--brand) 55%, transparent);
  background: var(--brand-soft); color: var(--ink);
}
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.stats div { padding: 14px; border-radius: var(--radius-md); background: var(--surface-2); }
.stats div:nth-child(1) { background: var(--brand-soft); }
.stats div:nth-child(2) { background: var(--pop-soft); }
.stats div:nth-child(3) { background: var(--sun-soft); }
.stats dt { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font: 800 1.8rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.credentials { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
.credentials dt { color: var(--muted); }
.credentials dd { margin: 0; font-weight: 650; }

/* Tabellen und Listen */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 700 .72rem var(--font-display); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.list-row, .user-row {
  display: flex; gap: 12px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.user-row { align-items: flex-start; }
.list-row:last-child, .user-row:last-child { border-bottom: 0; }
.user-info { flex: 1 1 320px; }
.user-info .badge { margin-left: 4px; }
.user-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.user-actions form { margin: 0; }
.delete-user summary {
  list-style: none; cursor: pointer; display: inline-flex; border-radius: 999px; padding: .38rem .8rem;
  font: 700 .82rem var(--font-display); color: var(--danger);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 60%, transparent);
}
.delete-user summary::-webkit-details-marker { display: none; }
.delete-user[open] form { margin-top: 10px; max-width: 340px; }

/* Challenges im Portal */
.challenge-list { display: flex; flex-direction: column; }
.challenge-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.challenge-row:last-child { border-bottom: 0; }
.challenge-edit { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.challenge-edit textarea, textarea[data-autosize] {
  width: 100%; resize: vertical; line-height: 1.45; min-height: 2.6em; overflow: hidden; field-sizing: content;
}
.challenge-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.challenge-meta select { padding: .35rem 2.2rem .35rem .7rem; }
.challenge-actions { display: flex; gap: 8px; padding-top: 4px; }
.challenge-actions form { margin: 0; }
@media (max-width: 700px) { .challenge-row { grid-template-columns: 1fr; } .challenge-actions { padding-top: 0; } }
.inline-edit { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; }
.inline-edit input[name=text] { flex: 1 1 280px; }

/* Galerie */
.filters { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.filters label { min-width: 190px; flex: 1; }
.photo-group h2 { margin: 30px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.photo-grid figure {
  margin: 0; padding: 9px 9px 0; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1);
  transition: transform .3s var(--spring), box-shadow .3s;
}
.photo-grid figure:nth-child(3n+1):hover { transform: rotate(-1.5deg) translateY(-4px); }
.photo-grid figure:nth-child(3n+2):hover { transform: rotate(1.2deg) translateY(-4px); }
.photo-grid figure:nth-child(3n):hover { transform: rotate(-.6deg) translateY(-4px); }
.photo-grid figure:hover { box-shadow: var(--shadow-2); }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 10px; background: var(--surface-2); }
.photo-grid figcaption { padding: 10px 4px 12px; font-size: .8rem; line-height: 1.45; }
.challenge-tag {
  display: inline-block; margin: 3px 0; padding: .1rem .5rem; border-radius: 8px;
  background: var(--sun-soft); color: var(--ink); font-size: .76rem;
}
.photo-actions { display: flex; gap: 12px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.photo-actions form { margin: 0; }
.download-box { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 480px; }
.download-box p { margin: 0; text-align: right; }
@media (max-width: 640px) { .download-box { justify-content: flex-start; } .download-box p { text-align: left; } }
.delete-form { max-width: 520px; }
.deletion-box {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin: 14px 0; font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
}
.deletion-box.deletion-geplant { background: var(--sun-soft); }

/* Postausgang, Freigabe, Teilen-Links */
.mail-text { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); padding: 14px; border-radius: var(--radius-sm); font-size: .88rem; }
.review { border-width: 2px; }
.review-eingereicht { border-color: color-mix(in srgb, var(--sun) 70%, transparent); }
.review-abgelehnt { border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.review-actions form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.review-actions label { width: 100%; }
@media (max-width: 700px) { .review-actions { grid-template-columns: 1fr; } }
.link-row {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.link-row:last-child { border-bottom: 0; }
.link-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block; }
.link-row form { margin: 0; }
@media (max-width: 640px) { .link-row { grid-template-columns: 56px minmax(0, 1fr); } .link-row img { width: 56px; height: 56px; } }
.share-page main { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.shared-photo { margin: 14px 0; text-align: center; }
.shared-photo img { max-width: 100%; max-height: 80vh; border-radius: 16px; box-shadow: var(--shadow-2); border: 8px solid var(--surface); }

/* Rechtstexte, Versionen */
.legal { max-width: 780px; margin: 0 auto 18px; line-height: 1.65; padding: clamp(22px, 4vw, 40px); }
.legal h2 { margin-top: 1.8rem; }
.legal ul { padding-left: 1.2rem; }
.versions section { position: relative; padding: 4px 0 4px 26px; border-left: 2px solid var(--line); margin-left: 6px; }
.versions section::before {
  content: ""; position: absolute; left: -8px; top: 1.9rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px var(--surface);
}
.versions section:first-of-type::before { background: var(--pop); }
.versions h2 { margin-top: 1.4rem; }

/* --- Bestätigungsdialog (HTML5 <dialog>) --------------------------------- */

.pp-dialog {
  border: 0; padding: 26px; width: min(420px, calc(100% - 32px)); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2);
}
.pp-dialog[open] { animation: pop-in .28s var(--spring); }
.pp-dialog::backdrop { background: rgb(4 14 20 / .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pp-dialog .dialog-icon { font-size: 2.2rem; line-height: 1; margin: 0 0 8px; }
.pp-dialog p { margin: 0 0 20px; font-size: 1.02rem; }
.pp-dialog .dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ==========================================================================
   Startseite
   ========================================================================== */

body.landing main { max-width: none; padding: 0; overflow-x: clip; }
.lp-section { max-width: 1140px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) 18px; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: .35rem .85rem; border-radius: 999px;
  font: 700 .8rem var(--font-display); letter-spacing: .04em; color: var(--brand);
  background: var(--brand-soft);
}
.lp-title { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 18px; font-weight: 800; }
.lp-title .hl {
  background: linear-gradient(100deg, var(--pop), var(--pop-2) 45%, #ff8f3d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.lp-trust li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 6px; }
.lp-h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.lp-sub { color: var(--muted); max-width: 40em; margin: 0 0 34px; font-size: 1.05rem; }

/* Hero */
.lp-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: clamp(28px, 5vw, 64px); }
@media (max-width: 900px) { .lp-hero { grid-template-columns: 1fr; text-align: center; } .lp-lead { margin-inline: auto; } .lp-cta, .lp-trust { justify-content: center; } }
.lp-stage { position: relative; min-height: 520px; display: grid; place-items: center; }
@media (max-width: 900px) { .lp-stage { min-height: 470px; } }
.lp-sticker {
  position: absolute; top: 2%; left: -6%; width: 150px; z-index: 3; rotate: -9deg;
  filter: drop-shadow(0 10px 22px rgb(15 47 59 / .25)); animation: float 6s ease-in-out infinite;
}
.lp-sticker img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) { .lp-sticker { left: max(-8px, calc(50% - 215px)); top: -14px; width: 112px; } }
.phone {
  position: relative; z-index: 2; width: 268px; aspect-ratio: 9 / 18.5; padding: 12px;
  border-radius: 44px; background: #0b1b24; box-shadow: var(--shadow-2), inset 0 0 0 2px #22414f;
  rotate: 4deg;
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; translate: -50% 0; border-radius: 99px; background: #0b1b24; z-index: 2; }
.phone-screen {
  height: 100%; border-radius: 33px; overflow: hidden; background: #fff8f0; color: #0f2f3b;
  display: flex; flex-direction: column; font-size: 12px;
}
.phone-hero {
  padding: 46px 14px 18px; text-align: center; color: #fff;
  background: var(--confetti), linear-gradient(150deg, #14958a, #0f5a63);
}
.phone-hero b { display: block; font: 800 17px/1.15 var(--font-display); }
.phone-hero small { opacity: .85; }
.phone-card {
  margin: -8px 12px 10px; padding: 14px; border-radius: 18px; background: #fff; text-align: center;
  box-shadow: 0 8px 22px rgb(15 47 59 / .14); rotate: -2deg; position: relative; overflow: hidden;
}
.phone-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, #f2453d, #ffc23d, #14958a); }
.phone-card .k { font: 800 9px var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: #f2453d; }
.phone-card p { font: 800 15px/1.25 var(--font-display); margin: 6px 0 10px; color: #0f2f3b; }
.phone-btn { display: block; margin: 0 12px 8px; padding: 11px; border-radius: 99px; text-align: center; font: 800 12px var(--font-display); color: #fff; background: linear-gradient(135deg, #f2453d, #e3336f); }
.phone-btn.alt { background: transparent; color: #0f2f3b; box-shadow: inset 0 0 0 1.5px #ecdfd0; }
.polaroid {
  position: absolute; z-index: 1; width: 128px; padding: 8px 8px 26px; background: #fff; border-radius: 6px;
  box-shadow: var(--shadow-2);
}
.polaroid span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 3px; font-size: 44px; }
.polaroid.p1 { right: 0; top: 8%; rotate: 10deg; animation: float 7s ease-in-out infinite reverse; }
.polaroid.p1 span { background: linear-gradient(135deg, #ffd6a5, #ff8f7a); }
.polaroid.p2 { left: 4%; bottom: 4%; rotate: -12deg; animation: float 8s ease-in-out -2s infinite; }
.polaroid.p2 span { background: linear-gradient(135deg, #a8e6dc, #3fb6c4); }
.polaroid.p3 { right: 6%; bottom: 0; rotate: 6deg; width: 104px; z-index: 3; animation: float 6.5s ease-in-out -1s infinite; }
.polaroid.p3 span { background: linear-gradient(135deg, #ffe58a, #ffb347); font-size: 36px; }
@media (max-width: 480px) { .polaroid.p1 { right: -8px; } .polaroid.p2 { left: -6px; } }

/* Vorher / Nachher */
.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .lp-compare { grid-template-columns: 1fr; } }
.lp-compare .card { padding: 28px; margin: 0; }
.lp-compare h3 { margin-top: 0; font-size: 1.2rem; }
.lp-compare ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lp-compare li { display: flex; gap: 10px; align-items: baseline; }
.lp-before { background: var(--surface-2); box-shadow: none; }
.lp-before li::before { content: "✕"; color: var(--danger); font-weight: 800; }
.lp-after { background: linear-gradient(140deg, var(--brand-soft), var(--surface) 75%); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.lp-after li::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* Schritte */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (max-width: 860px) { .lp-steps { grid-template-columns: 1fr; } }
.lp-steps li { position: relative; padding: 26px; margin: 0; }
.lp-steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 16px;
  font: 800 1.5rem var(--font-display); color: #fff; rotate: -6deg;
  background: linear-gradient(135deg, var(--pop), var(--pop-2)); box-shadow: 0 8px 18px -8px var(--pop);
}
.lp-steps li:nth-child(2)::before { background: linear-gradient(135deg, #14958a, #0f5a63); box-shadow: 0 8px 18px -8px #14958a; rotate: 5deg; }
.lp-steps li:nth-child(3)::before { background: linear-gradient(135deg, #ffc23d, #ff8f3d); box-shadow: 0 8px 18px -8px #ffb347; rotate: -3deg; }
.lp-steps h3 { margin: 0 0 6px; font-size: 1.15rem; }
.lp-steps p { margin: 0; color: var(--muted); }

/* Challenge-Demo */
.lp-demo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  padding: clamp(26px, 5vw, 56px); border-radius: 32px; color: #fff; overflow: hidden; position: relative;
  background: var(--confetti), radial-gradient(90% 120% at 100% 0%, #e3336f 0%, transparent 55%), linear-gradient(140deg, #0f5a63, #0b2f3d 70%);
}
@media (max-width: 860px) { .lp-demo { grid-template-columns: 1fr; text-align: center; } }
.lp-demo .lp-h2, .lp-demo h3 { color: #fff; }
.lp-demo p { color: rgb(255 255 255 / .82); }
.lp-demo .lp-eyebrow { background: rgb(255 255 255 / .14); color: #fff; }
.lp-demo ol { padding-left: 1.2rem; margin: 0 0 8px; color: rgb(255 255 255 / .88); text-align: left; display: inline-block; }
.lp-demo li { margin: 4px 0; }
.demo-area { display: grid; justify-items: center; gap: 18px; perspective: 900px; }
.demo-card {
  width: min(360px, 100%); min-height: 220px; padding: 26px 24px; border-radius: 26px; text-align: center;
  background: #fff; color: #0f2f3b; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .5); position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; rotate: -2deg;
}
.demo-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: linear-gradient(90deg, #f2453d, #ffc23d, #14958a); }
.demo-card .k { font: 800 .72rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: #f2453d; margin: 0 0 10px; }
.demo-card p.demo-text { font: 800 clamp(1.15rem, 1rem + .8vw, 1.45rem)/1.3 var(--font-display); color: #0f2f3b; margin: 0; }
.demo-card.flip { animation: card-flip .6s var(--spring); }
.demo-btn { background: #fff; color: #0f2f3b; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .5); white-space: normal; max-width: 100%; }
.demo-btn:hover { background: var(--sun); color: #0f2f3b; }
.spicy-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: .12rem .55rem; border-radius: 99px;
  background: #ffe4df; color: #c4302b; font: 800 .72rem var(--font-display); letter-spacing: .02em; margin-left: 6px;
  text-transform: none;
}

/* Funktionen */
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .lp-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-features { grid-template-columns: 1fr; } }
.lp-feature { margin: 0; padding: 24px; transition: transform .3s var(--spring), box-shadow .3s; }
.lp-feature:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.lp-feature .ic {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; font-size: 1.6rem; margin-bottom: 14px;
  background: var(--brand-soft);
}
.lp-feature:nth-child(3n+2) .ic { background: var(--pop-soft); }
.lp-feature:nth-child(3n) .ic { background: var(--sun-soft); }
.lp-feature h3 { margin: 0 0 6px; font-size: 1.08rem; }
.lp-feature p { margin: 0; color: var(--muted); font-size: .95rem; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; justify-content: center; }
.lp-chips span {
  padding: .5rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font: 700 .95rem var(--font-display); box-shadow: var(--shadow-1);
}

/* FAQ mit <details> */
.lp-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.lp-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-1); overflow: hidden; }
.lp-faq summary {
  list-style: none; cursor: pointer; padding: 18px 54px 18px 20px; position: relative;
  font: 700 1.05rem var(--font-display);
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; transition: rotate .3s var(--spring);
}
.lp-faq details[open] summary::after { rotate: 45deg; }
.lp-faq details > div { padding: 0 20px 18px; color: var(--muted); }
.lp-faq details > div p { margin: 0 0 8px; }

/* Abschluss */
.lp-final {
  text-align: center; border-radius: 32px; padding: clamp(36px, 6vw, 72px) 22px; color: #fff;
  background: var(--confetti), linear-gradient(135deg, #f2453d, #e3336f 55%, #8b3fd1);
  box-shadow: var(--shadow-2);
}
.lp-final .lp-h2 { color: #fff; }
.lp-final p { color: rgb(255 255 255 / .9); margin: 0 auto 26px; max-width: 34em; }
.lp-final .button.big { background: #fff; color: #c42a4a; box-shadow: 0 14px 30px -12px rgb(0 0 0 / .45); }

/* ==========================================================================
   Gäste-Seiten (Handy zuerst)
   ========================================================================== */

body.guest { font-size: 17px; --event: #0f8178; --on-event: #ffffff; }
body.guest main { max-width: 560px; margin: 0 auto; padding: 0 16px 8px; }
.hero {
  position: relative; overflow: hidden; color: var(--on-event); text-align: center;
  padding: calc(22px + env(safe-area-inset-top)) 20px 64px;
  background:
    var(--confetti),
    radial-gradient(110% 90% at 0% 0%, color-mix(in srgb, var(--event) 55%, #fff) 0%, transparent 55%),
    linear-gradient(160deg, var(--event), color-mix(in srgb, var(--event) 55%, #0b1b24));
  border-radius: 0 0 36px 36px;
}
.hero.with-cover { padding-top: calc(150px + env(safe-area-inset-top)); color: #fff; }
.hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.with-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(0 0 0 / .05), rgb(0 0 0 / .65)); }
.hero-text { position: relative; z-index: 1; }
.hero-brand { display: inline-block; margin: 0 0 14px; }
.hero-brand img { display: block; height: 34px; width: auto; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .2)); }
.hero h1 { color: inherit; margin: 4px 0 6px; font-size: clamp(1.85rem, 1.4rem + 2.4vw, 2.5rem); }
.eyebrow { margin: 0; font: 800 .75rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.sub { margin: 0; opacity: .92; font-weight: 600; }

/* Inhalt rutscht ein Stück über die Kopfgrafik */
body.guest main > :first-child { margin-top: -40px; position: relative; z-index: 2; }
.panel {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 26px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-1);
}
.panel h2 { margin: 0 0 8px; font-size: 1.45rem; }
.panel p { margin: 0 0 10px; }
.welcome { font-style: italic; color: var(--muted); }
body.guest input[type=text], body.guest input:not([type]), body.guest input[type=password] {
  font-size: 18px; /* verhindert Zoom auf iOS */ padding: 15px 16px; border-radius: 16px; width: 100%;
}
body.guest .primary { width: 100%; padding: 1.05rem 1.4rem; font-size: 1.1rem; }
body.guest .stack { margin-top: 14px; }
.link { color: var(--brand); }
body.guest > main .center a:not(.button) { font-weight: 650; }

/* Auswahl-Kacheln */
.choices { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.choice {
  display: grid; grid-template-columns: 58px 1fr 20px; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 24px; padding: 16px 18px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1);
  transition: transform .25s var(--spring), box-shadow .25s;
}
.choice::after { content: "›"; font: 800 1.6rem/1 var(--font-display); color: var(--muted); transition: translate .25s var(--spring); }
.choice:hover { text-decoration: none; box-shadow: var(--shadow-2); }
.choice:hover::after { translate: 4px 0; }
.choice:active { transform: scale(.98); }
.choice strong { display: block; font: 800 1.08rem/1.25 var(--font-display); }
.choice small { display: block; color: var(--muted); margin-top: 3px; font-size: .88rem; line-height: 1.4; }
.choice-icon {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; font-size: 1.8rem; line-height: 1;
  background: var(--surface-2);
}
.choice.accent {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--pop), var(--sun), var(--brand)) border-box;
}
.choice.accent .choice-icon { background: var(--pop-soft); rotate: -6deg; }
.choice.subtle { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--line); }
.choice-example { display: block; margin-top: 6px; font-size: .82rem; color: var(--ink); font-style: italic; opacity: .8; }

/* Challenge-Karte: wie eine gezogene Spielkarte */
.challenge-card {
  position: relative; overflow: hidden; text-align: center; border: 0; padding: 30px 22px 20px;
  box-shadow: var(--shadow-2); rotate: -1deg; animation: card-flip .7s var(--spring);
}
.challenge-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: linear-gradient(90deg, var(--pop), var(--sun), var(--brand)); }
.challenge-card .eyebrow { color: var(--pop); opacity: 1; }
.task { font-size: clamp(1.45rem, 1.2rem + 1.4vw, 1.8rem) !important; margin: 12px 0 16px !important; font-weight: 800; }
.spicy { white-space: nowrap; }
.card-steps {
  display: flex; justify-content: center; gap: 6px 10px; flex-wrap: wrap; list-style: none; padding: 12px 0 0; margin: 4px 0 10px;
  border-top: 2px dashed var(--line); font-size: .76rem; color: var(--muted); font-weight: 600; white-space: nowrap;
}
.card-steps li span {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-right: 5px;
  background: var(--brand-soft); color: var(--brand); font: 800 .72rem var(--font-display);
}
.card-note { font-size: .8rem; color: var(--muted); margin: 6px 0 2px !important; }

/* Foto-Auswahl */
.picker { display: block; }
.picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picker-button {
  display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  font: 800 1.12rem var(--font-display); color: var(--on-pop); border-radius: 999px; padding: 20px; cursor: pointer;
  background: linear-gradient(135deg, var(--pop), var(--pop-2));
  box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--pop) 90%, transparent), inset 0 1px 0 rgb(255 255 255 / .25);
  transition: transform .2s var(--spring);
}
.picker-button:active { transform: scale(.97); }
.picker input:focus-visible + .picker-button { outline: 3px solid var(--ink); outline-offset: 3px; }
.pickers { display: flex; flex-direction: column; gap: 12px; }
.pickers.gallery-first .picker-gallery { order: -1; }
.pickers.camera-first .picker-gallery .picker-button,
.pickers.gallery-first .picker-camera .picker-button {
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); padding: 16px; font-size: 1rem;
}
.picker input:disabled + .picker-button { opacity: .6; cursor: wait; }
/* Am Computer gibt es keine Handykamera – dort reicht die Dateiauswahl */
@media (hover: hover) and (pointer: fine) {
  .picker-camera { display: none; }
  .pickers.camera-first .picker-gallery .picker-button {
    background: linear-gradient(135deg, var(--pop), var(--pop-2)); color: var(--on-pop); box-shadow: none; padding: 20px; font-size: 1.12rem;
  }
}
.upload-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.upload-list li {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; font-size: .9rem;
  padding: 8px; border-radius: 16px; background: var(--surface-2); animation: pop-in .3s var(--spring);
}
.upload-list img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; background: var(--line); }
.upload-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list progress { width: 100%; height: 8px; accent-color: var(--brand); border-radius: 99px; }
.upload-list .status { font-size: 1.25rem; }

/* Fotos als Polaroids */
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.mini-grid img, .mini-grid a { display: block; }
.mini-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #fff;
  padding: 5px 5px 14px; box-shadow: var(--shadow-1); transition: transform .3s var(--spring);
}
.mini-grid > :nth-child(3n+1) img, .mini-grid > img:nth-child(3n+1) { rotate: -3deg; }
.mini-grid > :nth-child(3n+2) img, .mini-grid > img:nth-child(3n+2) { rotate: 2deg; }
.mini-grid > :nth-child(3n) img, .mini-grid > img:nth-child(3n) { rotate: -1deg; }
.mini-grid img:hover { transform: scale(1.06); }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .86rem; color: var(--muted); font-weight: 400; flex-direction: row; }
.consent input { margin-top: 2px; }
body.guest .error { font-weight: 650; }
.big-emoji { font-size: 4rem; margin: 0 !important; line-height: 1.15; display: inline-block; animation: bounce-in .8s var(--spring); }

/* Konfetti-Regen (Danke-/Geschafft-Seite) */
.confetti-piece {
  position: fixed; top: -12px; z-index: 60; width: 9px; height: 14px; border-radius: 2px; pointer-events: none;
  animation: confetti-fall var(--dur, 2.6s) cubic-bezier(.25, .6, .4, 1) forwards;
}

/* ==========================================================================
   Bewegung
   ========================================================================== */

@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes card-flip { from { opacity: 0; transform: perspective(900px) rotateY(80deg) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes bounce-in { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: none; } }
@keyframes confetti-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--rot, 540deg)); opacity: .9; }
}
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* Weiche Seitenwechsel (View Transitions API) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}

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

/* ==========================================================================
   v2.1: Videos, Betrachter, Upload-Warteschlange
   ========================================================================== */

.media-link { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.mini-grid .media-link { overflow: visible; }
.video-badge {
  position: absolute; left: 8px; bottom: 8px; padding: .15rem .55rem; border-radius: 999px;
  background: rgb(8 21 29 / .78); color: #fff; font: 800 .74rem var(--font-display); letter-spacing: .02em;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none;
}
.mini-grid .video-badge { left: 10px; bottom: 18px; font-size: .68rem; }
.media-link.is-video::after {
  content: "▶"; position: absolute; top: 50%; left: 50%; translate: -50% -60%; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 4px; font-size: 1.1rem; color: #0f2f3b;
  background: rgb(255 255 255 / .88); box-shadow: 0 6px 18px rgb(0 0 0 / .25); pointer-events: none;
  transition: transform .25s var(--spring);
}
.media-link.is-video:hover::after { transform: scale(1.12); }
.mini-grid .media-link.is-video::after { width: 34px; height: 34px; font-size: .85rem; }

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(4 12 17 / .96); color: #fff; overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: pop-in .2s var(--ease); }
.lightbox::backdrop { background: rgb(4 12 17 / .9); }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 16px 64px 0; }
.lb-stage img, .lb-stage video {
  max-width: 100%; max-height: calc(100dvh - 110px); border-radius: 12px; box-shadow: 0 20px 60px rgb(0 0 0 / .5);
  background: #000;
}
.lb-note { margin: 12px 0 0; color: rgb(255 255 255 / .85); text-align: center; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.lb-caption { font-size: .9rem; color: rgb(255 255 255 / .88); }
.lb-actions { display: flex; gap: 8px; }
.lightbox .icon-btn { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .2); font-size: 1.1rem; }
.lightbox .icon-btn:hover { border-color: #fff; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; font-size: 1.8rem !important; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
@media (max-width: 640px) { .lb-stage { padding: 8px 8px 0; } .lb-nav { top: auto; bottom: 84px; translate: none; } }

.picker-video .picker-button,
.pickers.gallery-first .picker-video .picker-button {
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); padding: 16px; font-size: 1rem;
}
.upload-tip { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); }
.upload-thumb {
  width: 52px; height: 52px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--line); font-size: 1.5rem;
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; background: none; }
.upload-list li > div:nth-child(2) { min-width: 0; }
.upload-note { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.upload-resume { border: 2px solid color-mix(in srgb, var(--sun) 70%, transparent); }
.upload-resume h2 { font-size: 1.15rem !important; }

/* v2.3: In die Fotos-App sichern */
.save-photos { display: flex; gap: 14px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.save-photos > div { flex: 1 1 320px; }
.save-photos h2 { margin-bottom: 4px; }
.save-photos p { margin: 0 0 4px; }

/* v2.4: Startseite – Stichwort-Zeile in der Überschrift, Anlässe, Challenge-Ideen */
.lp-title .lp-eyebrow { display: flex; width: fit-content; line-height: 1.4; letter-spacing: .02em; }
@media (max-width: 900px) { .lp-title .lp-eyebrow { margin-inline: auto; } }
.lp-more { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.lp-occasions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .lp-occasions { grid-template-columns: 1fr; } }
.lp-occasions .card { margin: 0; padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.lp-occasions h3 { margin: 0 0 4px; font-size: 1.15rem; }
.lp-occasions p { margin: 0 0 8px; color: var(--muted); flex: 1; }
.lp-occasions a { font-weight: 700; }
.ideas-hero { text-align: center; max-width: 820px; margin: 0 auto; padding-top: clamp(28px, 5vw, 56px); }
.ideas-toc { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 0; padding: 0; list-style: none; }
.ideas-toc a {
  display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font: 700 .95rem var(--font-display); color: var(--ink); box-shadow: var(--shadow-1);
}
.ideas-group { max-width: 900px; margin: 0 auto; }
.ideas-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; counter-reset: idea; }
@media (max-width: 700px) { .ideas-list { grid-template-columns: 1fr; } }
.ideas-list li {
  position: relative; margin: 0; padding: 16px 16px 16px 56px; background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: var(--shadow-1); counter-increment: idea;
}
.ideas-list li::before {
  content: counter(idea); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center; font: 800 .85rem var(--font-display); background: var(--brand-soft); color: var(--brand);
}
.ideas-list li.risky::before { background: var(--pop-soft); color: var(--pop); }
.ideas-list .spicy-chip { margin: 6px 0 0; display: inline-flex; }
