/* ---------- Schriften (selbst gehostet, Lizenz SIL OFL 1.1, siehe fonts/README.md) ---------- */
/* Baloo 2 latin-ext (variabler Schnitt, Gewichte 500–800) */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/baloo-2-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Baloo 2 latin (variabler Schnitt, Gewichte 500–800) */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/baloo-2-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Manrope latin-ext (variabler Schnitt, Gewichte 400–700) */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Manrope latin (variabler Schnitt, Gewichte 400–700) */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fcfcfa;
  --surface: #ffffff;
  --surface-alt: #f3f4fd;
  --ink: #14192b;
  --ink-soft: #636975;
  --border: #dadee6;
  --border-strong: #8b93a1; /* Rahmen von Eingabefeldern (3:1 Kontrast, WCAG 1.4.11) */

  --accent: #d0307a; /* 04.10.2026: minimal dunkler für 4,5:1 Kontrast mit weißem Text (WCAG 1.4.3) */
  --accent-dark: #ac2a65;
  --accent-ink: #fffcfd;
  --accent-soft: #fbe3ee;

  --lavender: #e6e6f8;
  --lavender-mid: #d2d0f4;
  --lavender-ink: #373659;

  --danger: #a65a50; /* 04.10.2026: dunkler für 4,5:1 Kontrast als Text */
  --radius: 16px;
  --radius-sm: 13px;
  --shadow: 0 1px 2px rgba(6, 13, 28, 0.05), 0 14px 34px rgba(6, 13, 28, 0.09);
}

* { box-sizing: border-box; }

/* ---------- Bewegungsprinzip: wiederverwendbare Motion-Utilities ---------- */
@keyframes mo-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mo-hero-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}
.mo-in {
  opacity: 0;
  animation: mo-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mo-hero {
  animation: mo-hero-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .mo-in, .mo-hero {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

html {
  background: var(--bg);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 {
  font-family: "Baloo 2", system-ui, sans-serif;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  min-height: 100vh;
  min-height: 100dvh; /* iOS: sichtbare Höhe ohne Adressleiste, damit die Seite nicht ohne Grund scrollt */
  display: flex;
  flex-direction: column;
}

header.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
  padding-top: 8px;
}

/* Intro und Sequenz-Ansicht tragen ihre eigene, ruhigere Markenpräsenz
   (Foto-Hero bzw. gar keine Kopfzeile) statt der generischen App-Kopfzeile. */
.app:has(#screen-intro.active) header.app-header,
.app:has(#screen-sequence.active) header.app-header {
  display: none;
}

.app-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}

.app-header-brand .brand-logo { font-size: 2.1rem; }

/* Logo: nur Wortmarke (Baloo 2, "Bild" SemiBold dunkelblau, "Kompass" Medium dunkelpink). Die Bildmarke (Kompass-Karten)
   wird nur als Favicon/Apple-Touch-Icon verwendet. Die Größe wird über font-size des Elternelements bestimmt. */
.brand-logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}
.brand-word {
  font-family: "Baloo 2", sans-serif;
  line-height: 1;
  letter-spacing: 0.004em;
}
.brand-bild { color: var(--ink); font-weight: 600; }
.brand-kompass { color: var(--accent-dark); font-weight: 500; }

header.app-header h1 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

header.app-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Nur für Screenreader sichtbar */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Beim Screenwechsel wird die Überschrift fokussiert (Screenreader/Tastatur); ein sichtbarer Rahmen wäre dort störend. */
.screen h2:focus, .screen:focus { outline: none; }

.screen { display: none; }
.screen.active { display: block; }

/* ---------- Intro: Foto-Hero statt Icon/Farbverlauf (Bildwelt-Richtung) ---------- */
#screen-intro {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.intro-hero {
  position: relative;
  height: 260px;
  margin: 0 -16px 0;
  overflow: hidden;
  background: var(--bg);
}

.intro-hero-img {
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  -webkit-mask-image: linear-gradient(0deg, transparent 0%, rgba(0,0,0,0.35) 18%, rgba(0,0,0,0.8) 38%, black 58%);
  mask-image: linear-gradient(0deg, transparent 0%, rgba(0,0,0,0.35) 18%, rgba(0,0,0,0.8) 38%, black 58%);
}

.intro-hero-tint {
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(0deg, transparent 0%, rgba(55,54,89,0.16) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.intro-hero-back {
  position: absolute;
  top: 20px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

/* Das hidden-Attribut muss gegen das display oben gewinnen: Klient:innen mit Link sehen den Zurück-Link nicht
   (app.js: chooseSet setzt hidden bei Link-Modus), die Coach in Vorschau und Direktnutzung schon. */
.intro-hero-back[hidden] {
  display: none;
}

.intro-heading {
  padding: 0 16px;
  margin-top: -38px;
  position: relative;
}


.intro-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.28;
  color: var(--lavender-ink);
  max-width: 22ch;
}

#screen-intro p {
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
  padding: 0 16px;
  text-align: left;
}

.intro-cta {
  padding: 26px 16px 0;
}

/* ---------- Modus-Auswahl: weiche Auswahlkarten statt Segmented Control ---------- */
.mode-select {
  padding: 22px 16px 0;
  margin: 0;
  max-width: none;
  text-align: left;
}

/* Bei Links mit Modus-Vorgabe der Coach wird die Auswahl ausgeblendet. */
.mode-select[hidden] {
  display: none;
}

.mode-options {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.mode-option {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  border-radius: 18px;
  border: 2px solid transparent;
  padding: 15px 17px;
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background: var(--surface-alt);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.12s ease;
}

.mode-option:active { transform: scale(0.97); }

.mode-option svg {
  color: var(--ink-soft);
  transition: color 0.25s ease;
  margin-bottom: 4px;
}

.mode-option-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.mode-option-sub {
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.mode-option:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.mode-option:has(input:checked) svg {
  color: var(--accent-dark);
}

.mode-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.stack-labels[hidden] {
  display: none;
}

.stack-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 26px;
}

/* Hinweis zum Browser-Tab in der rechten Spalte: nur im Desktop-Intro, sonst steht er in der Fußzeile. */
.intro-privacy {
  display: none;
}

/* ---------- Desktop: weißer Grund, Titelfoto links groß, Text rechts (Mockup A, 29.10.2026) ---------- */
@media (min-width: 900px) {
  .app:has(#screen-intro.active) {
    max-width: 1280px;
    padding: 40px;
  }

  .app:has(#screen-intro.active) .app-footer {
    display: none;
  }

  #screen-intro.active {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-rows: 1fr auto auto auto auto auto 1fr;
    column-gap: clamp(40px, 5.6vw, 72px);
    max-width: none;
  }

  #screen-intro .intro-hero {
    grid-column: 1;
    grid-row: 1 / -1;
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
    min-height: 560px;
    max-height: 860px;
    margin: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(20, 25, 43, 0.12);
  }

  #screen-intro .intro-hero-img {
    -webkit-mask-image: none;
    mask-image: none;
  }

  #screen-intro .intro-hero-tint {
    display: none;
  }

  .intro-hero-back {
    top: 28px;
    left: 28px;
  }

  #screen-intro .intro-heading,
  #screen-intro .mode-select,
  #screen-intro #selection-note,
  #screen-intro .intro-cta,
  #screen-intro .intro-privacy {
    grid-column: 2;
    max-width: 470px;
    padding-left: 0;
    padding-right: 0;
  }

  #screen-intro .intro-heading { grid-row: 2; margin-top: 0; }
  #screen-intro .mode-select { grid-row: 3; padding-top: 0; margin-top: 24px; }
  #screen-intro #selection-note { grid-row: 4; margin-top: 22px; font-size: 1.12rem; line-height: 1.65; }
  #screen-intro .intro-cta { grid-row: 5; padding-top: 32px; }
  #screen-intro .intro-cta .btn-primary { padding: 18px; font-size: 1.05rem; }

  .intro-title {
    font-size: clamp(2.1rem, 3.3vw, 2.7rem);
    line-height: 1.15;
    max-width: none;
  }

  #screen-intro .intro-privacy {
    grid-row: 6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 28px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.55;
  }

  #screen-intro .intro-privacy svg {
    flex: none;
    margin-top: 2px;
  }

  #screen-intro .intro-privacy:has(#intro-privacy-text:empty) {
    display: none;
  }
}

.stack-label-field {
  position: relative;
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.stack-label-field::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stack-label-field:nth-of-type(1)::before { background: var(--accent); }
.stack-label-field:nth-of-type(2)::before { background: var(--accent); }

.text-input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
}

.text-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Sequence view: Bildwelt statt Formular ---------- */
.compare-hint {
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.progress-wrap {
  margin-bottom: 20px;
}

.progress-bar {
  height: 4px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-label {
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 8px;
}

.image-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.image-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(20, 25, 43, 0.12);
}

.image-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
}

.image-frame img.is-fading {
  opacity: 0;
}

.image-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: white;
  font-size: 1rem;
  text-align: center;
  padding: 12px;
}

.seq-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(20, 25, 43, 0.14);
  padding: 0;
  transition: background 0.2s ease, transform 0.12s ease;
}
.seq-arrow:hover { background: rgba(255, 255, 255, 0.92); }
.seq-arrow:active { transform: translateY(-50%) scale(0.9); }
.seq-arrow.seq-arrow-back { left: 12px; }
.seq-arrow.seq-arrow-next { right: 12px; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  width: 100%;
}

.select-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

button {
  font-family: inherit;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  cursor: pointer;
  transition: transform 0.05s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease;
  font-weight: 600;
}

button:active { transform: scale(0.97); }

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-dark); }

/* Auswahl-Button(e) in der Sequenz: gedeckt im Ruhezustand, volles Pink
   sobald ausgewählt — im Vergleichsmodus für beide Stapel identisch,
   nur das Label unterscheidet sich. */
.select-toggle-btn {
  flex: 1;
  max-width: 260px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.select-toggle-btn svg {
  flex-shrink: 0;
}
.select-toggle-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.select-toggle-btn:hover {
  background: var(--accent-soft);
}
.select-toggle-btn.is-active:hover {
  background: var(--accent);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--ink); }

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  color: var(--lavender-ink);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.82rem;
}
.btn-chip:hover { background: var(--lavender); }
.btn-chip svg { flex-shrink: 0; }

/* ---------- Overview ---------- */
#screen-overview .overview-header {
  text-align: center;
  margin-bottom: 20px;
}

#screen-overview .overview-header h2 {
  margin: 0 0 4px;
  font-size: 1.6rem;
}

#screen-overview .overview-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

#overview-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#overview-sections.compare-layout {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

#overview-sections.compare-layout .overview-section {
  flex: 1 1 320px;
  min-width: 280px;
  border-radius: var(--radius);
}

#overview-sections.compare-layout .overview-section.stack-accent-1,
#overview-sections.compare-layout .overview-section.stack-accent-2 {
  background: var(--lavender);
  padding: 18px;
}

#overview-sections.compare-layout .overview-section.stack-accent-1 .overview-grid,
#overview-sections.compare-layout .overview-section.stack-accent-2 .overview-grid {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.overview-section h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  letter-spacing: normal;
}

.count-chip {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--ink-soft);
  color: white;
}

.overview-section.stack-accent-1 .count-chip { background: var(--accent); color: var(--accent-ink); }
.overview-section.stack-accent-2 .count-chip { background: var(--accent); color: var(--accent-ink); }

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

#overview-sections.compare-layout .overview-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.overview-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 8px;
  gap: 8px;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overview-item.is-removing {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.overview-item-image {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(6, 13, 28, 0.1);
  transition: transform 0.2s ease;
}

.overview-item-image:hover {
  transform: scale(1.02);
}

.overview-item-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.overview-item-image .image-placeholder {
  font-size: 0.75rem;
}

.overview-item-image .remove-mark {
  position: absolute;
  inset: 0;
  background: rgba(181, 105, 95, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.overview-item-image:hover .remove-mark {
  background: rgba(181, 105, 95, 0.55);
}

.overview-item-image .remove-mark span {
  opacity: 0;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overview-item-image:hover .remove-mark span { opacity: 1; transform: scale(1); }

/* Durchsichtiger Knopf über dem ganzen Bild: macht „Abwählen“ per Tastatur und Screenreader erreichbar. */
.overview-remove-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.overview-remove-btn:active { transform: none; }
.overview-remove-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
  box-shadow: inset 0 0 0 3px var(--accent);
}
/* Bei Tastaturfokus erscheint dieselbe Beschriftung wie beim Darüberfahren mit der Maus. */
.overview-item-image:has(.overview-remove-btn:focus-visible) .remove-mark { background: rgba(181, 105, 95, 0.55); }
.overview-item-image:has(.overview-remove-btn:focus-visible) .remove-mark span { opacity: 1; transform: scale(1); }

/* ---------- Bild-Übersicht: per Drag & Drop neu anordnen ---------- */
.overview-position-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Der Button selbst ist die (unsichtbare) Berührungsfläche – deutlich
   größer als das sichtbare Icon, da 24x24px auf einem echten Finger
   (unter Apples empfohlenem Mindestmaß von 44x44px) leicht knapp daneben
   trifft und man dann fälschlich auf dem Bild landet. */
.overview-drag-handle {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 40px;
  height: 40px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  /* Verhindert, dass iOS bei einer etwas längeren Berührung das
     Bild-Kontextmenü ("Sichern unter…") oder eine Textauswahl zeigt,
     statt den Drag zu starten. */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Sichtbares Icon – unverändert 24x24px, jetzt als eigenes Element
   innerhalb der größeren Berührungsfläche. */
.overview-drag-handle-visual {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(20, 25, 43, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.15s ease;
}

.overview-drag-handle:hover .overview-drag-handle-visual,
.overview-drag-handle:active .overview-drag-handle-visual {
  background: rgba(20, 25, 43, 0.75);
}

.overview-item.is-dragging {
  opacity: 0.35;
  transform: scale(0.96);
}

.overview-item.is-drop-target {
  transform: scale(1.04);
}

.overview-drag-tip {
  position: absolute;
  top: 40px;
  right: 4px;
  width: 170px;
  max-width: 60vw;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.72rem;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(208, 48, 122, 0.25);
  z-index: 3;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.overview-drag-tip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: var(--accent-soft);
  transform: rotate(45deg);
}

.overview-drag-tip button {
  margin-top: 6px;
  border: none;
  background: rgba(172, 42, 101, 0.14);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.overview-drag-tip.hidden {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .overview-item,
  .overview-item-image,
  .overview-item-image .remove-mark span,
  .overview-drag-handle-visual,
  .overview-drag-tip {
    transition: none !important;
  }
  .overview-item.is-removing {
    opacity: 1 !important;
    transform: none !important;
  }
}

.assoc-textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.assoc-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.empty-note {
  text-align: center;
  color: var(--ink-soft);
  padding: 32px 16px;
}

.overview-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.send-status {
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--accent-dark);
  min-height: 1.2em;
}

/* Erfolgsmeldung nach dem Senden: kurze Hauptzeile, darunter ein leiser Hinweis */
.send-status .send-status-main {
  margin: 0;
  font-weight: 700;
  color: var(--lavender-ink);
}
.send-status .send-status-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Gesendet-Zustand des Senden-Knopfs (pro Link geht genau eine Mail raus) */
#send-btn.is-sent {
  background: var(--lavender);
  color: var(--lavender-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: default;
  opacity: 1;
}

.checkin-back {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
/* hidden muss gegen display gewinnen (Abschluss-Screen nach dem Senden, app.js: setCheckinBackVisible) */
.checkin-back[hidden] {
  display: none;
}

/* ---------- Wiederaufnahme + Link-Meldungen ---------- */
.resume-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.resume-chip {
  background: var(--surface-alt);
  color: var(--lavender-ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 700;
}
.resume-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.resume-cta {
  width: 100%;
  max-width: 340px;
  min-height: 52px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#link-retry-btn {
  width: auto;
  padding: 0 40px;
  margin-top: 6px;
}
.resume-hint {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-soft);
  max-width: 300px;
}
.gate-icon svg[hidden] { display: none; }
#screen-link-error .gate-box[hidden],
#link-retry-btn[hidden] { display: none; }

.send-status.is-error {
  color: var(--danger);
}

footer.app-footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-top: 40px;
}

/* ---------- Check-in / Vorher-Nachher-Barometer ---------- */
.checkin-intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.checkin-intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.checkin-box {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  max-width: 480px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkin-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.checkin-box-header p {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.checkin-weather-row {
  display: flex;
  justify-content: space-between;
  gap: 2px;
}

.checkin-weather-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  padding: 2px;
  cursor: pointer;
}

.checkin-weather-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.checkin-weather-btn:hover .checkin-weather-icon {
  transform: scale(1.06);
}

.checkin-weather-btn:active .checkin-weather-icon {
  transform: scale(0.92);
}

.checkin-weather-btn.is-active .checkin-weather-icon {
  background: var(--accent-soft);
  border-color: var(--accent);
  animation: checkin-weather-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes checkin-weather-pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.checkin-weather-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.checkin-weather-btn.is-active .checkin-weather-label {
  color: var(--accent-dark);
}

@media (prefers-reduced-motion: reduce) {
  .checkin-weather-icon,
  .checkin-weather-label {
    transition: none !important;
    animation: none !important;
  }
}

.checkin-textarea {
  min-height: 70px;
}

@media (min-width: 700px) {
  .checkin-box {
    max-width: 600px;
    padding: 28px 32px;
    gap: 18px;
  }

  .checkin-box-header p {
    font-size: 1.02rem;
  }

  .checkin-weather-icon {
    width: 58px;
    height: 58px;
  }

  .checkin-weather-icon svg {
    width: 28px;
    height: 28px;
  }

  .checkin-weather-label {
    font-size: 0.78rem;
  }

  .checkin-textarea {
    min-height: 90px;
    font-size: 0.88rem;
  }
}

/* Desktop (ab 900 px, Mockup A vom 29.10.2026): kein lila Kasten, große Wetter-Kacheln auf weißem Grund,
   Hinweis zum Browser-Tab mit Schloss unten. Darunter bleibt das Layout von oben. */
@media (min-width: 900px) {
  .checkin-intro {
    gap: 10px;
    margin: 4px 0 36px;
  }

  .checkin-intro h2 {
    margin: 0;
    font-weight: 600;
    font-size: 2.6rem;
    line-height: 1.15;
    color: var(--lavender-ink);
  }

  .checkin-intro p {
    font-size: 1.12rem;
  }

  .checkin-box {
    background: transparent;
    padding: 0;
    max-width: 830px;
    gap: 0;
    margin-bottom: 30px;
  }

  .checkin-box-header {
    justify-content: center;
    margin-bottom: 18px;
  }

  .checkin-box-header p {
    font-size: 1.15rem;
  }

  .checkin-weather-row {
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
  }

  .checkin-weather-btn {
    flex: 0 0 150px;
    height: 150px;
    justify-content: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(6, 13, 28, 0.04);
    font-family: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  .checkin-weather-btn:hover { transform: translateY(-2px); }
  .checkin-weather-btn:hover .checkin-weather-icon { transform: none; }

  .checkin-weather-btn:focus-visible {
    outline: 3px solid var(--lavender-mid);
    outline-offset: 3px;
  }

  .checkin-weather-icon {
    width: 72px;
    height: 72px;
    border: 0 solid transparent; /* nicht "none": sonst blitzt beim Verkleinern des Fensters kurz ein schwarzer Rand auf */
    background: var(--surface-alt);
  }

  .checkin-weather-icon svg {
    width: 40px;
    height: 40px;
  }

  .checkin-weather-label {
    font-size: 0.98rem;
  }

  .checkin-weather-btn.is-active {
    border: 2px solid var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 10px 24px rgba(208, 48, 122, 0.16);
  }

  .checkin-weather-btn.is-active .checkin-weather-icon {
    background: var(--surface);
  }

  .checkin-textarea {
    min-height: 112px;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    line-height: 1.5;
  }

  /* .screen davor: die Grundregeln für .checkin-actions/.checkin-skip stehen weiter unten in der Datei */
  .screen .checkin-actions {
    flex-direction: row;
    justify-content: center;
    gap: 28px;
  }

  .screen .checkin-actions .btn-primary {
    padding: 16px 44px;
    font-size: 1.05rem;
  }

  .screen .checkin-skip { font-size: 0.95rem; }

  #screen-checkin-ende .checkin-back { margin-top: 22px; }
  #screen-checkin-ende .checkin-back .btn-ghost { font-size: 0.95rem; }

  /* Weniger Abstand unten, damit der Check-in zum Schluss bei 800 px Höhe ohne Scrollen passt */
  .app:has(#screen-checkin-start.active),
  .app:has(#screen-checkin-ende.active) {
    padding-bottom: 24px;
  }

  /* Fußzeile mit Schloss-Symbol (Text setzt app.js, daher das Symbol als Hintergrundbild) */
  .app:has(#screen-checkin-start.active) footer.app-footer,
  .app:has(#screen-checkin-ende.active) footer.app-footer {
    max-width: 760px;
    margin: auto auto 0;
    padding: 28px 0 0 26px;
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.55;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636975' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") no-repeat 0 30px;
  }
}

.checkin-skip {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.checkin-skip:hover { color: var(--ink); }

.checkin-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ---------- Direktmodus-Sperre (Login/Abo nötig) ---------- */
.gate-screen {
  max-width: 400px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.gate-icon-neutral {
  background: var(--lavender);
  color: var(--lavender-ink);
}

.gate-screen h2 {
  margin: 0;
  font-size: 1.4rem;
}

.gate-screen > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.gate-box {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.gate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  margin-top: 6px;
}

.gate-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lavender-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Coach-Login ---------- */
.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form[hidden] {
  display: none;
}

.login-form .text-input {
  width: 100%;
  box-sizing: border-box;
}

.login-status {
  margin: 0;
  font-size: 0.85rem;
}

.login-status.is-error {
  color: var(--danger);
}

.login-success {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.login-success[hidden] {
  display: none;
}

.login-success p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
}

/* ---------- Inhaltsseiten (Warum Bildkarten?, Anwendungsbeispiele) ---------- */
.content-back {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lavender-ink);
  text-decoration: none;
  margin-bottom: 20px;
}

.content-back:hover {
  text-decoration: underline;
}

.content-page-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.content-page h2 {
  margin: 0 0 20px;
  font-size: 1.6rem;
}

.content-page-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: 640px;
}

.content-page-body p {
  margin: 0;
}

@media (max-width: 480px) {
  button { padding: 12px 20px; font-size: 0.9rem; }
  #overview-sections.compare-layout {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  #overview-sections.compare-layout .overview-section {
    flex: 0 1 auto;
  }
}

/* Textlink-Knöpfe aus den Mockups (Zurück zur Übersicht, Neu beginnen) */
.resume-actions .btn-ghost,
.checkin-back .btn-ghost {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.resume-actions .btn-ghost { color: var(--ink-soft); }
.checkin-back .btn-ghost { color: var(--lavender-ink); }

/* ---------- Notizfeld in der Übersicht: eingeklappt, bis es geöffnet wird ---------- */
.assoc-toggle {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  min-height: 36px;
  padding: 6px 4px;
  background: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lavender-ink);
  text-align: left;
}
.assoc-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Rückfrage „Neu beginnen?“ ---------- */
body:has(dialog[open]) { overflow: hidden; }

.restart-dialog {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--ink);
  width: min(380px, calc(100% - 32px));
  max-width: none;
  margin: auto;
}
.restart-dialog::backdrop { background: rgba(20, 25, 43, 0.5); }
.restart-dialog-box {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 50px rgba(20, 25, 43, 0.25);
}
.restart-dialog h2 {
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
}
.restart-dialog p { margin: 0; font-size: 0.9rem; line-height: 1.55; }
.restart-dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.restart-dialog-actions button {
  border-radius: 999px;
  padding: 14px 8px;
  font-size: 0.92rem;
  font-weight: 700;
}
.restart-cancel { background: var(--lavender); color: var(--lavender-ink); }
.restart-cancel:hover { background: var(--lavender-mid); }
.restart-confirm { background: var(--surface); color: var(--danger); border: 1px solid var(--border-strong); }
.restart-confirm:hover { background: var(--surface-alt); }
.restart-dialog button:focus-visible { outline: 3px solid var(--lavender-mid); outline-offset: 2px; }

/* ---------- Abschluss-Screen (nach dem Check-in) ---------- */
.abschluss-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 22px;
}
.abschluss-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.abschluss-head h2 { margin: 0; }
.abschluss-head p { margin: 0; font-size: 0.92rem; line-height: 1.55; max-width: 34ch; }
.abschluss-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.abschluss-actions button { width: 100%; padding: 15px 16px; border-radius: 999px; font-weight: 700; }
.abschluss-actions .btn-secondary { border-color: var(--border-strong); }
.abschluss-hint {
  margin: 14px auto 0;
  max-width: 38ch;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Übersicht: Ablage „Abgewählt“ ---------- */
.overview-ablage {
  margin-top: 16px;
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 0 14px;
}
.overview-ablage-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--lavender-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 48px;
  padding: 0;
  cursor: pointer;
}
.overview-ablage-toggle-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.8rem;
}
.overview-ablage-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 14px;
}
.overview-ablage-panel[hidden] {
  display: none;
}
.overview-ablage-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.overview-ablage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.overview-ablage-thumb {
  position: relative;
  padding: 0;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--lavender);
  cursor: pointer;
}
.overview-ablage-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.overview-ablage-thumb-plus {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.overview-ablage-toggle:focus-visible,
.overview-ablage-thumb:focus-visible {
  outline: 3px solid var(--lavender-mid);
  outline-offset: 2px;
}
.overview-item.is-restored {
  animation: item-restored 1.4s ease;
}
@keyframes item-restored {
  0% { box-shadow: 0 0 0 4px var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .overview-item.is-restored { animation: none; }
}

/* ---------- Übersicht „Meine Auswahl“: Desktop (ab 900 px, Mockup A vom 29.10.2026) ----------
   Breiter Inhalt, Überschrift links mit Chip, drei Spalten auf weißen Karten (Vergleich: zwei Stapel nebeneinander),
   feste Leiste unten mit „Neu starten“ links und den beiden Knöpfen rechts. Darunter gilt das Layout von oben. */
.overview-count-chip { display: none; }

@media (min-width: 900px) {
  /* Die Leiste reicht über die volle Fensterbreite (::before); ohne clip entstünde seitliches Scrollen */
  body:has(#screen-overview.active) { overflow-x: clip; }

  .app:has(#screen-overview.active) {
    max-width: 1200px;
    padding-left: 40px;
    padding-right: 40px;
  }

  #screen-overview .overview-header {
    text-align: left;
    margin: 6px 0 24px;
  }

  #screen-overview .overview-header h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-weight: 600;
    font-size: 2.4rem;
    line-height: 1.15;
    color: var(--lavender-ink);
  }

  .overview-count-paren { display: none; }

  .overview-count-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 14px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: "Manrope", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: normal;
  }

  #screen-overview .overview-header p {
    margin-top: 8px;
    max-width: 640px;
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .overview-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(6, 13, 28, 0.04);
  }

  .overview-item-image {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    box-shadow: none;
  }

  .overview-position-badge {
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }

  .overview-drag-handle {
    top: 5px;
    right: 5px;
  }

  .overview-drag-handle-visual {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .overview-drag-tip {
    top: 46px;
    width: min(220px, calc(100% - 8px)); /* schmale Karten im Vergleich: nicht über die Karte hinausragen */
    font-size: 0.82rem;
  }

  .overview-drag-tip button { font-size: 0.78rem; }

  .overview-item .assoc-toggle {
    margin: 0 4px 4px;
    font-size: 0.92rem;
  }

  .overview-item .assoc-textarea {
    min-height: 64px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.92rem;
    line-height: 1.5;
  }

  /* Vergleich: zwei Stapel nebeneinander, je zwei Spalten */
  #overview-sections.compare-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }

  #overview-sections.compare-layout .overview-section.stack-accent-1,
  #overview-sections.compare-layout .overview-section.stack-accent-2 {
    min-width: 0;
    background: var(--surface-alt);
    border-radius: 24px;
    padding: 18px 18px 20px;
  }

  #overview-sections.compare-layout .overview-section h3 {
    margin: 2px 4px 16px;
    font-family: "Baloo 2", sans-serif;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--lavender-ink);
  }

  #overview-sections.compare-layout .count-chip {
    padding: 4px 13px;
    font-size: 0.85rem;
  }

  #overview-sections.compare-layout .overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  #overview-sections.compare-layout .overview-item {
    border-radius: 18px;
    padding: 8px;
    gap: 10px;
  }

  #overview-sections.compare-layout .overview-item-image { border-radius: 12px; }

  /* Feste Leiste unten: „Neu starten“ links, Zurück/Weiter rechts */
  .overview-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding: 18px 0;
  }

  .overview-actions::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: -1;
    background: rgba(252, 252, 250, 0.96);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(6, 13, 28, 0.06);
  }

  .overview-actions .overview-footer,
  .overview-actions .controls {
    margin-top: 0;
    width: auto;
  }

  .overview-actions .overview-footer { gap: 14px; }

  #back-to-sequence-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 14px 26px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 700;
  }

  #back-to-sequence-btn:hover { background: var(--surface-alt); }

  #to-checkin-ende-btn {
    border-radius: 999px;
    padding: 15px 40px;
    font-size: 1.02rem;
    font-weight: 700;
  }

  #restart-btn {
    padding: 10px 16px;
    font-size: 0.88rem;
  }
}

/* ---------- Abschluss: Desktop (ab 900 px, Mockup B vom 29.10.2026) ----------
   Links Lavendel-Fläche mit Wortmarke, Anzahl und Vorschau der gewählten Bilder, rechts Inhalt und Knöpfe.
   Der Hinweis aus der Fußzeile steht rechts im Kasten mit Schloss. Darunter gilt das Layout von oben. */
.abschluss-preview,
.abschluss-privacy { display: none; }

@media (min-width: 900px) {
  .app:has(#screen-abschluss.active) {
    max-width: 1280px;
    padding: 40px;
  }

  .app:has(#screen-abschluss.active) header.app-header,
  .app:has(#screen-abschluss.active) .app-footer {
    display: none;
  }

  #screen-abschluss.active {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-rows: 1fr auto auto auto auto auto auto 1fr;
    column-gap: clamp(40px, 5.6vw, 72px);
  }

  #screen-abschluss > * {
    grid-column: 2;
    max-width: 470px;
    width: 100%;
  }

  #screen-abschluss .abschluss-preview {
    grid-column: 1;
    grid-row: 1 / -1;
    max-width: none;
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
    min-height: 560px;
    max-height: 860px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 36px;
    border-radius: 28px;
    background: linear-gradient(160deg, var(--lavender) 0%, var(--surface-alt) 75%);
  }

  .abschluss-preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .abschluss-preview-top .brand-logo { font-size: 1.7rem; }

  .abschluss-preview-count {
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--surface);
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 700;
  }

  .abschluss-preview-count:empty { display: none; }

  .abschluss-preview-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    gap: 12px;
  }

  .abschluss-preview-cell {
    position: relative;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
  }

  .abschluss-preview-cell img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .abschluss-preview-more {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lavender-ink);
    font-family: "Baloo 2", sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
  }

  #screen-abschluss .abschluss-head {
    grid-row: 2;
    align-items: flex-start;
    text-align: left;
    gap: 10px;
    margin-bottom: 32px;
  }

  #screen-abschluss .abschluss-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
  }

  #screen-abschluss .abschluss-icon svg { width: 30px; height: 30px; }

  /* Nach dem Senden: Haken kräftig pink */
  .app:has(#send-btn.is-sent) #screen-abschluss .abschluss-icon {
    background: var(--accent);
    color: var(--accent-ink);
  }

  #screen-abschluss .abschluss-head h2 {
    font-weight: 600;
    font-size: clamp(2.1rem, 3.3vw, 2.5rem);
    line-height: 1.15;
    color: var(--lavender-ink);
  }

  #screen-abschluss .abschluss-head p {
    max-width: none;
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--ink-soft);
  }

  #screen-abschluss .abschluss-actions {
    grid-row: 3;
    max-width: 470px;
    margin: 0;
    gap: 12px;
  }

  #screen-abschluss .abschluss-actions button {
    padding: 17px 24px;
    font-size: 1.05rem;
  }

  #screen-abschluss .send-status { grid-row: 4; text-align: left; }

  #screen-abschluss .abschluss-hint {
    grid-row: 5;
    margin: 6px 0 0;
    max-width: 470px;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .abschluss-privacy {
    grid-row: 6;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 22px;
    padding: 16px 18px;
    box-sizing: border-box;
    border-radius: 16px;
    background: var(--surface-alt);
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.6;
  }

  .abschluss-privacy svg { flex: none; margin-top: 2px; }

  .abschluss-privacy:has(#abschluss-privacy-text:empty) { display: none; }

  /* Nach dem Senden ist die Fußzeile leer; dann steht der Hinweis „In diesem Browser-Tab …“ im Kasten mit Schloss */
  .app:has(#send-btn.is-sent) #screen-abschluss .abschluss-hint {
    margin-top: 22px;
    padding: 16px 18px 16px 44px;
    box-sizing: border-box;
    border-radius: 16px;
    background: var(--surface-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636975' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") no-repeat 18px 19px;
    font-size: 0.84rem;
  }

  #screen-abschluss .checkin-back {
    grid-row: 7;
    justify-content: flex-start;
    margin-top: 18px;
  }

  #screen-abschluss .checkin-back .btn-ghost {
    padding: 0;
    font-size: 0.95rem;
  }
}
