/* Layout: Party-Flyer im Risodruck – breite Display-Schrift, versetzte Farbschichten,
   harte Versatzschatten. Gebaut fürs Handy: Szenen antippen, Daumenleiste unten, Blätter von unten. */
:root {
  /* Immer dunkel: Party-Lila auf allen Geräten, egal wie das Gerät eingestellt ist */
  --paper: #140c26;
  --paper-2: #1d1337;
  --card: #231842;
  --ink: #fff1f8;
  --ink-soft: #c8bde2;
  --line: rgba(255, 241, 248, 0.16);
  --pink: #ff4b9b;
  --yellow: #ffdc2e;
  --blue: #7089ff;
  --mint: #2de0a6;
  --on-bright: #1c1035;
  --on-blue: #140c26;
  --device: #07040f;
  --shadow: #000000;
  --grain-opacity: 0.06;
  color-scheme: dark;

  --font-display: "Unbounded", "Arial Black", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem);
  --step-4: clamp(2.5rem, 1.4rem + 5vw, 5.1rem);

  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
}
:root {
  --appbar-h: 62px;
  --bar-h: 76px;
  --app-max: 1120px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: calc(var(--appbar-h) + 64px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0) / 1.5 var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Auf der Startansicht liegt unten die Daumenleiste: Platz lassen */
body[data-view="home"] {
  padding-bottom: calc(var(--bar-h) + var(--safe-bottom));
}

/* Risodruck-Körnung über der ganzen Seite */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
canvas,
video {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

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

.confetti-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 70;
}

.riso {
  display: inline-block;
  color: var(--pink);
  text-shadow: 0.055em 0.05em 0 var(--blue);
  transform: rotate(-2deg);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.8em 1.25em;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 700 var(--step-0) / 1.1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
@media (hover: hover) {
  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow);
  }
  .btn-ghost:hover {
    box-shadow: 4px 4px 0 var(--shadow);
  }
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 2px 0 var(--shadow);
}
.btn-pink {
  background: var(--pink);
  color: var(--on-bright);
}
.btn-yellow {
  background: var(--yellow);
  color: var(--on-bright);
}
.btn-blue {
  background: var(--blue);
  color: var(--on-blue);
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
}
.btn-small {
  min-height: 40px;
  padding: 0.55em 1em;
  font-size: var(--step--1);
  box-shadow: 3px 3px 0 var(--shadow);
}
.btn-block {
  width: 100%;
}
.btn-meta {
  font: 500 0.75rem / 1 var(--font-mono);
  padding: 0.3em 0.55em;
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  font: 600 var(--step--1) / 1.2 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.chip-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.chip-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.chip-extra {
  font: 500 0.7rem / 1 var(--font-mono);
  opacity: 0.75;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 var(--step--1) / 1.3 var(--font-body);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover {
  text-decoration-color: var(--pink);
}
.link-btn[data-danger="true"] {
  color: var(--pink);
}

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

.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(var(--appbar-h) + var(--safe-top));
  padding: calc(8px + var(--safe-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  border-bottom: 2px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-right: auto;
  font: 900 1.15rem / 1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--yellow);
  color: var(--on-bright);
  font: 800 0.95rem / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.credit-pill svg {
  width: 20px;
  height: 20px;
}
/* Schmale Handys: mit Zurück-Knopf reicht das Logo-Zeichen, sonst wird es eng */
@media (max-width: 400px) {
  body:not([data-view="home"]) .brand span {
    display: none;
  }
}

main {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left));
}
.view {
  padding-top: 14px;
}

.ai-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  background: var(--card);
  font-size: var(--step--1);
  line-height: 1.5;
}
.ai-banner code {
  font: 500 0.85em var(--font-mono);
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--paper-2);
}

/* ---------------------------------------------------------------- Start: Einstieg */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title title"
    "copy demo";
  align-items: center;
  gap: 12px 14px;
  padding: 6px 0 16px;
}
.intro h1 {
  grid-area: title;
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}
.intro .h1-line {
  white-space: nowrap;
}
@media (max-width: 380px) {
  .intro .h1-line {
    white-space: normal;
  }
}
.intro-copy {
  grid-area: copy;
  display: grid;
  justify-items: start;
  gap: 10px;
}
.intro-lede {
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.45;
  max-width: 30em;
}
.intro-demo {
  grid-area: demo;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.demo-photo {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 10px;
  transform: rotate(-4deg);
}
.demo-arrow {
  width: 22px;
  color: var(--pink);
}
.demo-result {
  position: relative;
  width: 80px;
  aspect-ratio: 9 / 16;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--device);
  box-shadow: 4px 4px 0 var(--pink);
  transform: rotate(3deg);
}
.demo-result video,
.demo-result img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro-demo.has-video .demo-result img {
  display: none;
}
.intro-demo:not(.has-video) .demo-result video {
  display: none;
}
/* Mit Foto kennt man die App: der Einstieg verschwindet (bleibt für Bildschirmleser da), die Szenen rücken nach oben */
.intro.is-compact {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (min-width: 760px) {
  .intro {
    grid-template-areas:
      "title demo"
      "copy demo";
    padding-top: 24px;
  }
  .demo-photo {
    width: 84px;
    height: 112px;
  }
  .demo-result {
    width: 128px;
  }
  .demo-arrow {
    width: 36px;
  }
}

/* ---------------------------------------------------------------- Start: Anlässe und Szenen */

.occ-bar {
  position: sticky;
  top: calc(var(--appbar-h) + var(--safe-top));
  z-index: 30;
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 10px 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.occ-bar::-webkit-scrollbar {
  display: none;
}
.occ-bar .chip-btn {
  flex: none;
  scroll-snap-align: start;
}
.occ-bar .chip-btn:last-child {
  border-style: dashed;
}
/* Mit Maus gibt es kein Wischen: auf großen Bildschirmen umbrechen statt seitlich scrollen */
@media (min-width: 900px) and (hover: hover) {
  .occ-bar {
    flex-wrap: wrap;
    overflow: visible;
  }
}

.grid-head {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px;
}
.grid-title {
  font: 800 var(--step-1) / 1.2 var(--font-display);
}
.grid-hint {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .scene-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (min-width: 920px) {
  .scene-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.scene-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--c0, #2a0a4a), var(--c1, #ff2d87));
  color: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}
.scene-card.is-plain::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.28), transparent 45%);
}
.scene-teaser {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 14px;
  z-index: 1;
  font: 800 1.05rem / 1.2 var(--font-display);
  text-wrap: balance;
}
.scene-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.scene-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(10, 4, 24, 0.9));
}
.scene-title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  font: 800 0.92rem / 1.15 var(--font-display);
  text-wrap: balance;
  hyphens: manual;
  overflow-wrap: anywhere;
}
.scene-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--yellow);
  color: var(--on-bright);
  font: 700 0.7rem / 1.1 var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scene-card:active {
  transform: scale(0.97);
}
@media (hover: hover) {
  .scene-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--pink);
  }
}
#gridMore {
  margin-top: 16px;
}

/* ---------------------------------------------------------------- Daumenleiste */

.thumbbar {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + var(--safe-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 2px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.thumbbar > * {
  max-width: 560px;
  margin-inline: auto;
}
.thumb-pick {
  display: flex;
  min-height: 54px;
  font-size: var(--step-1);
}
.thumb-pick svg {
  width: 24px;
  height: 24px;
}
.thumb-me {
  display: flex;
  align-items: center;
  gap: 10px;
}
.me-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 58%;
  min-height: 54px;
  padding: 4px 14px 4px 4px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.me-btn img {
  flex: none;
  width: 42px;
  height: 42px;
  border: 2px solid var(--pink);
  border-radius: 50%;
  object-fit: cover;
}
.me-text {
  display: grid;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}
.me-text strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.me-text small {
  color: var(--ink-soft);
  font-size: 0.75rem;
}
.thumb-hint {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.25;
}
.thumb-me .btn {
  margin-left: auto;
  flex: none;
}
@media (max-width: 430px) {
  .thumb-hint {
    display: none;
  }
}
.thumb-busy {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 8px 18px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font: 600 var(--step--1) / 1.25 var(--font-body);
  text-align: left;
  cursor: pointer;
}
.thumb-busy #thumbBusyText {
  flex: 1;
  font-variant-numeric: tabular-nums;
}
.thumb-busy strong {
  color: var(--yellow);
}

/* ---------------------------------------------------------------- Kurzmeldung */

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--bar-h) + 12px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100vw - 24px));
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 4px 4px 0 var(--pink);
  transform: translateX(-50%);
  animation: toast-in 0.2s ease-out;
}
body:not([data-view="home"]) .toast {
  bottom: calc(16px + var(--safe-bottom));
}
.toast[data-tone="error"] {
  box-shadow: 4px 4px 0 var(--yellow);
}
#toastText {
  flex: 1;
}
.toast .link-btn {
  flex: none;
  color: var(--yellow);
  font-size: var(--step-0);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

/* ---------------------------------------------------------------- Ergebnis */

.view-result {
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
}
/* Das Bild passt immer ganz auf den Bildschirm, darunter bleibt Platz für die Knöpfe */
.stage-wrap {
  position: relative;
  width: min(100%, 440px, calc((100dvh - var(--appbar-h) - var(--safe-top) - 230px) * 9 / 16));
  min-width: min(100%, 220px);
  margin: 0 auto;
}
.stage {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 2.5px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  background: var(--device);
  box-shadow: 5px 5px 0 var(--shadow);
}
.stage > img,
.stage > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.stage-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--c0, #2a0a4a), var(--c1, #ff2d87));
}
.stage-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: blur(14px) saturate(1.2);
  transform: scale(1.12);
}
.stage-error {
  position: absolute;
  inset: auto 12px 12px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
}
.ai-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(10, 4, 24, 0.7);
  color: #ffffff;
  font: 500 0.72rem / 1 var(--font-mono);
  letter-spacing: 0.04em;
}
.progress-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(12, 6, 28, 0.6);
  color: #ffffff;
  text-align: center;
}
.progress-overlay strong {
  font: 900 1.15rem / 1.2 var(--font-display);
}
.progress-overlay span {
  font-size: 0.85rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.progress-overlay .progress-hint {
  max-width: 22em;
  opacity: 0.85;
}
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffd400;
  border-right-color: #ff2d87;
  animation: spin 0.9s linear infinite;
}
.spinner-small {
  flex: none;
  width: 24px;
  height: 24px;
  border-width: 3px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

.result-side {
  display: grid;
  align-content: start;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.result-msg {
  text-align: center;
}
.result-msg:empty {
  display: none;
}
.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.result-actions .btn {
  min-height: 52px;
  padding-inline: 0.8em;
}
#makeVideo {
  grid-column: 1 / -1;
}
.result-actions:has(#shareBtn[hidden]) #downloadLink {
  grid-column: 1 / -1;
}
.video-hint {
  text-align: center;
}
.result-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
@media (min-width: 900px) {
  .view-result {
    grid-template-columns: auto minmax(0, 420px);
    justify-content: center;
    align-items: start;
    gap: 36px;
    padding-top: 28px;
  }
  .stage-wrap {
    width: min(440px, calc((100dvh - var(--appbar-h) - 80px) * 9 / 16));
  }
  .result-side {
    margin: 0;
    padding-top: 12px;
  }
  .result-more {
    justify-content: flex-start;
  }
  .result-msg,
  .video-hint,
  .cost-line {
    text-align: left;
  }
}

.history {
  display: grid;
  gap: 8px;
}
.history-label {
  font: 500 0.72rem / 1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.history-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.history-strip button {
  flex: 0 0 auto;
  width: 56px;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0b0228;
  cursor: pointer;
}
.history-strip button[aria-current="true"] {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--pink);
}
.history-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cost-line {
  font: 500 0.75rem / 1.3 var(--font-mono);
  color: var(--ink-soft);
  text-align: center;
}
.cost-line:empty {
  display: none;
}

/* ---------------------------------------------------------------- Seiten: Kalender, Guthaben, Fragen */

.view-page {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 12px;
}
.page-head {
  display: grid;
  gap: 8px;
  margin: 6px 0 18px;
}
.page-title {
  font: 900 var(--step-3) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
}
.page-lede {
  color: var(--ink-soft);
}
.sub-title {
  margin: 26px 0 12px;
  font: 700 var(--step-1) / 1.2 var(--font-display);
}

.hint {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.form-msg {
  font-weight: 600;
  font-size: var(--step--1);
  min-height: 1.2em;
}
.form-msg[data-tone="error"] {
  color: var(--pink);
}

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field > label,
.field > legend,
.field > span {
  padding: 0;
  font-weight: 700;
}
.field legend {
  margin-bottom: 8px;
}
.optional {
  font: 500 0.75rem / 1 var(--font-mono);
  color: var(--ink-soft);
  margin-left: 6px;
}
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0.7em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  /* 16 px verhindert, dass Safari auf dem iPhone beim Antippen hineinzoomt */
  font: 500 max(16px, var(--step-0)) / 1.3 var(--font-body);
}
textarea {
  font: 500 0.8rem / 1.4 var(--font-mono);
  resize: vertical;
}
.line-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.line-row input {
  flex: 1;
}
.line-row .btn {
  flex: none;
}
.date-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 10px;
}
.date-part {
  display: grid;
  gap: 4px;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
@media (max-width: 420px) {
  .date-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .date-month {
    grid-row: 1;
    grid-column: 1 / -1;
  }
}
.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.consent input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--pink);
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.check-inline input {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
}

.humor-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}
.humor-seg label {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 6px;
  text-align: center;
  font-weight: 700;
  font-size: var(--step--1);
  cursor: pointer;
  background: var(--paper);
}
.humor-seg label + label {
  border-left: 2px solid var(--ink);
}
.humor-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.humor-seg label:has(input:checked) {
  background: var(--yellow);
  color: var(--on-bright);
}
.humor-seg label:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: -5px;
}
.humor-meter {
  font: 500 0.75rem / 1 var(--font-mono);
  letter-spacing: 0.1em;
}
.humor-preview {
  padding: 8px 12px;
  border-left: 4px solid var(--pink);
  border-radius: 0 12px 12px 0;
  background: var(--paper);
  font-size: var(--step--1);
}

/* Vorschau des Grußes, der ins Bild kommt */
.banner-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.banner-label {
  font: 500 0.72rem / 1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.banner-text {
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--on-bright);
  font: 700 var(--step--1) / 1.2 var(--font-display);
  transform: rotate(-1.5deg);
  box-shadow: 3px 3px 0 var(--pink);
}
.banner-extra {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- Blätter (von unten) */

dialog.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 2.5px solid var(--ink);
  border-radius: 22px 22px 0 0;
  background: var(--card);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.sheet::backdrop {
  background: rgba(20, 12, 38, 0.55);
}
dialog.sheet[open] {
  animation: sheet-up 0.22s ease-out;
}
@keyframes sheet-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open],
  .toast {
    animation: none;
  }
}
.sheet-body {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px max(18px, env(safe-area-inset-right)) calc(18px + var(--safe-bottom)) max(18px, env(safe-area-inset-left));
}
.sheet-grip {
  justify-self: center;
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: var(--line);
}
.sheet-body h2 {
  font: 800 var(--step-2) / 1.15 var(--font-display);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-photo {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.sheet-photo img {
  width: 92px;
  height: 122px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  object-fit: cover;
}
.sheet-photo > div {
  display: grid;
  justify-items: start;
  gap: 6px;
}
.sheet-foot a {
  color: var(--ink);
}
@media (min-width: 720px) {
  dialog.sheet {
    inset: 0;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    border: 2.5px solid var(--ink);
    border-radius: 22px;
    box-shadow: 6px 6px 0 var(--shadow);
  }
  .sheet-grip {
    display: none;
  }
  .sheet-body {
    padding: 22px;
  }
}

.occ-groups {
  display: grid;
  gap: 18px;
}
.occ-label {
  margin-bottom: 8px;
  font: 500 0.75rem / 1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.occ-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-list {
  display: grid;
}
.menu-list a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 2px;
  border-bottom: 1.5px solid var(--line);
  font: 700 var(--step-1) / 1.2 var(--font-display);
  text-decoration: none;
}
.menu-list a::after {
  content: "→";
  margin-left: auto;
  padding-left: 12px;
  color: var(--pink);
}
.lang-field {
  margin-top: 4px;
}

/* ---------------------------------------------------------------- Kalender */

.cal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.today-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--pink);
  color: var(--on-bright);
  box-shadow: 5px 5px 0 var(--shadow);
}
.today-banner strong {
  display: block;
  font: 900 var(--step-2) / 1.15 var(--font-display);
}
.today-banner .btn {
  background: var(--card);
  color: var(--ink);
}
.example-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  font-size: var(--step--1);
  line-height: 1.5;
}
.holiday-strip {
  display: flex;
  gap: 10px;
  margin: 0 -16px;
  padding: 2px 16px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.holiday {
  flex: 0 0 auto;
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 150px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}
@media (hover: hover) {
  .holiday:hover {
    box-shadow: 4px 4px 0 var(--pink);
  }
}
.holiday-name {
  font: 700 var(--step-0) / 1.2 var(--font-display);
}
.holiday-date {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.friend-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
}
.friend-card.is-example {
  border-style: dashed;
}
.friend-card.is-today {
  box-shadow: 5px 5px 0 var(--pink);
}
.friend-thumb {
  width: 72px;
  height: 92px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  object-fit: cover;
  background: var(--paper-2);
}
.friend-initials {
  display: grid;
  place-items: center;
  font: 900 1.5rem / 1 var(--font-display);
  color: var(--ink-soft);
}
.friend-body {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}
.friend-when {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.count-chip {
  font: 500 0.75rem / 1 var(--font-mono);
  padding: 5px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--paper-2);
  font-variant-numeric: tabular-nums;
}
.count-chip[data-soon="true"] {
  background: var(--yellow);
  color: var(--on-bright);
}
.count-chip[data-today="true"] {
  background: var(--pink);
  color: var(--on-bright);
}
.count-chip[data-muted="true"] {
  border-style: dashed;
  background: transparent;
}
.friend-name {
  font: 700 var(--step-1) / 1.2 var(--font-display);
  overflow-wrap: anywhere;
}
.friend-meta,
.friend-style {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.friend-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.import-help {
  margin: 4px 0 0;
  font-size: var(--step--1);
}
.import-help summary,
.ics-fallback summary {
  min-height: 40px;
  padding-block: 8px;
  font-weight: 700;
  cursor: pointer;
}
.import-help ul {
  margin: 4px 0 0;
  padding-left: 1.2em;
  color: var(--ink-soft);
}
.ics-fallback {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 4px 14px 14px;
  border: 2px dashed var(--ink);
  border-radius: 12px;
}

/* ---------------------------------------------------------------- Guthaben */

.credit-status {
  font-weight: 600;
}
.credit-status strong {
  font: 900 1.3rem / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.price-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 700px) {
  .price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.price-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 2.5px solid var(--ink);
  border-radius: 22px;
  background: var(--card);
}
.price-card-hot {
  background: var(--yellow);
  color: var(--on-bright);
  box-shadow: 6px 6px 0 var(--shadow);
}
.price-card-hot .hint {
  color: var(--on-bright);
}
.price-card h3 {
  font-size: var(--step-1);
  font-weight: 700;
}
.price {
  font: 900 var(--step-3) / 1 var(--font-display);
  letter-spacing: -0.03em;
}
.price-sub {
  font-weight: 600;
}
.price-card ul {
  display: grid;
  gap: 6px;
  margin: 2px 0 6px;
  padding-left: 1.2em;
}
.invite {
  margin-top: 8px;
}

/* ---------------------------------------------------------------- Fragen und Fuß */

.faq-list {
  display: grid;
  border-top: 2.5px solid var(--ink);
}
.faq-list details {
  border-bottom: 2.5px solid var(--ink);
}
.faq-list summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  font: 700 var(--step-1) / 1.3 var(--font-display);
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: "+";
  font-size: 1.4em;
  line-height: 0.8;
  color: var(--pink);
}
.faq-list details[open] summary::after {
  content: "–";
}
.faq-list details p {
  max-width: 60ch;
  padding-bottom: 18px;
  color: var(--ink-soft);
}

.footer {
  display: grid;
  gap: 12px;
  margin: 40px 0 0;
  padding: 18px 0 28px;
  border-top: 2px solid var(--ink);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.footer-note {
  max-width: 65ch;
}

/* ---------------------------------------------------------------- Rechtliche Seiten */

.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}
.footer-legal a,
.footer-legal .link-btn {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: var(--step--1);
  text-decoration: none;
}
.footer-legal a:hover,
.footer-legal .link-btn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-body {
  min-height: 100vh;
}
.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 0;
}
.legal-lang {
  margin: 0;
  font: 600 0.85rem / 1 var(--font-mono);
}
.legal-lang a,
.legal-lang span {
  padding: 4px 6px;
}
.legal-lang [aria-current] {
  border-bottom: 2.5px solid var(--pink);
}
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 72px;
  line-height: 1.65;
  /* Die Überschriftenschrift ist sehr breit: lange Wörter ("Verbraucherstreitbeilegung") müssen umbrechen dürfen */
  overflow-wrap: anywhere;
  hyphens: auto;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 24px;
  padding-block: 10px;
  border-block: 1.5px solid var(--line);
  font-size: var(--step--1);
}
.legal-nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.legal-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-nav [aria-current] {
  border-bottom: 2.5px solid var(--pink);
}
.legal h1 {
  margin: 0 0 6px;
  font: 900 var(--step-3) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
}
.legal h2 {
  margin: 2em 0 0.4em;
  font: 800 var(--step-1) / 1.25 var(--font-display);
}
.legal p {
  margin: 0.6em 0;
}
.legal ul {
  margin: 0.6em 0;
  padding-left: 1.3em;
}
.legal li {
  margin: 0.35em 0;
}
.legal a {
  color: var(--blue);
  text-underline-offset: 3px;
}
.legal-date,
.legal-note,
.legal-disclaimer {
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.legal-intro {
  font-size: var(--step-1);
}
.legal-warning {
  margin: 18px 0;
  padding: 12px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--yellow);
  color: var(--on-bright);
}
mark.legal-missing {
  padding: 0 0.3em;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--on-bright);
  font: 600 0.85em var(--font-mono);
}
.legal-disclaimer {
  margin-top: 3em;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}
.legal-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.legal-foot a {
  color: var(--ink);
}

/* ---------------------------------------------------------------- Cookie- und Speicher-Hinweis */

.consent-banner {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 24px));
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--shadow);
  font-size: var(--step--1);
  line-height: 1.5;
}
.consent-banner p {
  margin: 0;
}
.consent-title {
  font: 800 var(--step-0) / 1.2 var(--font-display);
}
/* Auf der Startansicht über der Daumenleiste, damit „Foto wählen“ sichtbar bleibt */
body[data-view="home"] .consent-banner {
  bottom: calc(var(--bar-h) + 10px + var(--safe-bottom));
}
@media (max-width: 600px) {
  .consent-banner {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .consent-banner .consent-title {
    display: none;
  }
  .consent-actions .btn {
    flex: 0 0 auto;
  }
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.consent-actions .btn {
  flex: 1 1 auto;
}
.consent-actions .link-btn {
  align-self: center;
}
.consent-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 22px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
  overflow: auto;
}
.consent-dialog::backdrop {
  background: rgba(20, 12, 38, 0.55);
}
.consent-dialog h2 {
  margin: 0 0 12px;
  font: 800 var(--step-1) / 1.2 var(--font-display);
}
.consent-cat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1.5px solid var(--line);
}
.consent-cat strong {
  font-weight: 700;
}
.consent-cat p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.consent-cat input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--pink);
}
.consent-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.consent-wipe {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px solid var(--line);
}
.consent-msg {
  margin: 8px 0 0;
  min-height: 1.4em;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- Guthaben, Kauf, Einladen */

.credit-code {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--card);
}
.credit-code .hint {
  margin: 0;
}
.code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.code-row input {
  flex: 1 1 14rem;
  min-width: 0;
  font: 500 0.85rem / 1.3 var(--font-mono);
}
.code-row output {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.55em 0.8em;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  background: var(--paper);
  font: 500 0.85rem / 1.3 var(--font-mono);
  overflow-wrap: anywhere;
  user-select: all;
}
.code-restore summary {
  cursor: pointer;
  font-size: var(--step--1);
  font-weight: 600;
}
.code-restore .code-row {
  margin-top: 8px;
}
.invite-box {
  display: grid;
  gap: 12px;
  max-width: 720px;
}
.invite-box .btn {
  justify-self: start;
}
.buy-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 22px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
  overflow: auto;
}
.buy-dialog::backdrop {
  background: rgba(20, 12, 38, 0.55);
}
.buy-dialog h2 {
  margin: 0 0 10px;
  font: 800 var(--step-1) / 1.2 var(--font-display);
}
.buy-dialog form {
  display: grid;
  gap: 12px;
}
.buy-dialog .consent {
  align-items: flex-start;
}
.buy-summary {
  margin: 0;
  font: 800 var(--step-2) / 1.2 var(--font-display);
}
.buy-dialog .hint {
  margin: 0;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* ---------------------------------------------------------------- Import */

.import-dialog {
  width: min(640px, calc(100vw - 24px));
}
.import-list {
  display: grid;
  gap: 6px;
  max-height: min(46vh, 420px);
  margin: 10px 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.import-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}
.import-row input[type="checkbox"] {
  width: 1.3rem;
  height: 1.3rem;
  accent-color: var(--pink);
}
.import-row input[type="text"] {
  padding: 0.4em 0.6em;
  font-size: var(--step--1);
}
.import-date {
  font: 500 0.8rem var(--font-mono);
  color: var(--ink-soft);
  white-space: nowrap;
}


/* Video-Blatt: Szene oder eigene Idee */
.video-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.idea-input {
  font: 500 max(16px, var(--step-0)) / 1.35 var(--font-body);
}
.idea-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.idea-examples .chip-btn {
  white-space: normal;
  text-align: left;
}

/* Mehrere Personen im Foto-Blatt */
.people-field {
  display: grid;
  gap: 8px;
  margin: 4px 0 6px;
}
.people-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.people-row:empty {
  display: none;
}
.person-chip {
  position: relative;
  width: 64px;
  height: 64px;
}
.person-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--yellow);
}
.person-chip button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 700 16px / 1 var(--font-body);
  cursor: pointer;
}
#addPerson {
  justify-self: start;
}

/* Szenen-Vorschau */
.scene-preview {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 10px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--c0, #2a0a4a), var(--c1, #ff2d87));
}
.scene-preview video,
.scene-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene-preview .scene-teaser {
  font-size: 1.3rem;
}
@media (max-height: 760px) {
  .scene-preview {
    width: min(100%, 220px);
  }
}
.scene-sample {
  display: block;
  margin: 12px auto 0;
}

/* Erklärvideo auf der Startseite */
.explain-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  text-align: left;
}
.explain-btn svg {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}
.explain-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  background: #000;
}
