/* Event-Karten auf der Startseite und Admin-Verwaltung. */

.home-events {
  width: min(72rem, 100%);
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-events-title {
  margin: 8px 0 0;
  font-size: 1.15rem;
}

.event-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.event-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.event-status {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.event-status-planned {
  color: var(--ink);
}

.event-status-active {
  background: color-mix(in srgb, var(--primary-color, #007cc1) 18%, transparent);
  border-color: var(--primary-color, #007cc1);
}

.event-status-ended {
  opacity: 0.8;
}

.event-status-archived {
  opacity: 0.55;
}

.event-code {
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  margin: 0;
  font-weight: 700;
}

.event-qr {
  width: 160px;
  height: 160px;
  align-self: center;
  background: #fff;
  border-radius: 8px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.event-link {
  word-break: break-all;
  margin: 0;
}

.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* H-005/H-006: Team-Migrationshinweis — Danger-Token (Light+Dark AA). */
.event-team-warn {
  margin: 0;
  color: var(--danger, #b91c1c);
  font-size: 0.9rem;
}

.event-migration-banner {
  border-color: var(--danger, #b91c1c);
}

/* Scroll-Isolation nur beim Anlegen — nicht auf Liste/Bearbeiten (verhindert Footer-Sprünge). */
.event-create-scroll-host.event-create-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
}

.event-create-scroll-host.event-create-page #events-root {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.event-slide-list,
.event-popular {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-slide-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.event-slide-row.is-dragging {
  opacity: 0.5;
}

.event-slide-idx {
  font-variant-numeric: tabular-nums;
  width: 1.5rem;
}

.event-slide-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.event-invite {
  white-space: pre-wrap;
  background: var(--bg-soft);
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
}

@media (max-width: 720px) {
  .session-deck-toolbar {
    width: 100%;
  }
}

/* Session-Deck (#/admin/sessions/:code): Folienzahl, Werkzeugleiste und Folienliste */
.session-slide-count {
  font-size: 0.85rem;
}

.session-deck-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.session-deck-panel {
  padding: 12px 14px;
}

/* Kopf der Session-Seite: Status und nächster Schritt in einer Zeile (Code, Link und QR-Code stehen im Reiter „Teilen“). */
.session-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}

.session-status__next {
  font-size: 0.92rem;
}

/* Reiter „Teilen“: QR-Code neben Code, Link und Knöpfen; auf schmalen Fenstern untereinander. */
.session-share__join {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
}

.session-share__join .event-qr {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.session-share__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 14rem;
}

.session-share__label {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.session-share__meta .event-join-link {
  margin: 0;
  word-break: break-all;
}

.session-slide-check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.session-slide-check input {
  width: 1rem;
  height: 1rem;
}

.deck-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev);
}

.deck-bulk-bar[hidden] {
  display: none !important;
}

.deck-bulk-label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: auto;
}

.deck-toast__action {
  border: 0;
  background: transparent;
  color: var(--accent, #2a6);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.session-slide-icon {
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
}

.session-slide-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.session-slide-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.session-slide-meta .muted {
  font-size: 0.78rem;
}

.session-slide-tools {
  gap: 4px;
}

.session-slide-empty {
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  list-style: none;
}

.slide-edit-reorder {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.slide-edit-reorder__btn {
  inline-size: 44px;
  block-size: 44px;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.picker-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.picker-cat-row > input[type="text"] {
  flex: 1 1 10rem;
  min-inline-size: 0;
  min-height: 44px;
}

.picker-cat-reorder {
  flex: 0 0 auto;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.slide-edit-status {
  margin: 0 20px 4px;
  font-size: 0.85rem;
}

.slide-edit-status {
  margin: 0 20px 8px;
  font-size: 0.85rem;
}

.slide-edit-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.slide-edit-option {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.slide-edit-option > input[type="text"],
.slide-edit-option > input[type="datetime-local"] {
  flex: 1 1 12rem;
  min-height: 44px;
}

.slide-edit-correct {
  white-space: nowrap;
}

.slide-edit-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.slide-edit-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.deck-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(22rem, calc(100vw - 32px));
}

.deck-toast--show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 640px) {

  .session-slide-tools {
    flex-wrap: wrap;
  }
}

/* Startseiten-Sichtbarkeit — Admin-Eventliste und Formular */
.event-form__visibility {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.event-form__visibility .form-hint {
  margin: 8px 0 0;
}

/*
 * Progressive Disclosure am Event-Create/Edit (Issue #9 Wave 2 + UX-Phase-2-Pilot).
 * STAB-005: Gruppen mit `admin-form-section` teilen den Session-Start-Chrome
 * (Karte, Uppercase-Titel). Felder in geschlossenen <details> bleiben im DOM.
 */
.event-form.admin-form-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-form-group {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

/*
 * Fieldset-Defaults (border:0/padding:0) würden admin-form-section sonst
 * überschreiben — hier explizit Session-Start-Kartenoptik wiederherstellen.
 */
.event-form-group.admin-form-section {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.event-form-group.admin-form-section.event-form-group--flow {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.event-form-group__legend {
  padding: 0;
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
}

.event-form-group__legend.admin-form-section__title {
  float: none;
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-form-group__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.event-form-group--flow {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line, #e5e5e5);
}

.event-form-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line, #e5e5e5);
}

.event-form-actions.admin-form-actions {
  margin-top: 0.5rem;
}

.event-form-actions--danger {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: 0;
}

.event-form-actions--danger .danger,
.event-form-actions--danger #btn-event-delete {
  color: var(--danger, #b91c1c);
}

.event-form-details {
  margin: 1rem 0 0;
  border-top: 1px solid var(--line, #e5e5e5);
  padding-top: 0.75rem;
}

/* Äußere Erweitert-Hülle: gleiche Karte wie Basis/Ablauf (STAB-005). */
.event-form-details.admin-form-section {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.event-form-details.admin-form-section > .event-form-details__summary.admin-form-section__title {
  margin-bottom: 0.5rem;
}

/* Verschachtelte Details unter „Erweiterte Optionen“: etwas weniger Gewicht. */
.event-form-details--advanced > .event-form-details__body > .event-form-details {
  margin-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--line, #e5e5e5) 80%, transparent);
  padding-top: 0.5rem;
}

.event-form-details--advanced > .event-form-details__body > .event-form-details:first-child {
  margin-top: 0.35rem;
}

.event-form-details__summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
  list-style: none;
}

.event-form-details__summary::-webkit-details-marker {
  display: none;
}

.event-form-details__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.4rem;
  transition: transform 0.15s ease;
}

.event-form-details[open] > .event-form-details__summary::before {
  transform: rotate(90deg);
}

.event-form-details__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.event-visibility-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}

.event-visibility-badge--internal {
  color: var(--muted, #5a6470);
  background: var(--bg-soft, #f0f2f5);
  border: 1px solid var(--line, #d8dde4);
}

.event-homepage-visibility-msg:not(:empty) {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 0.9rem;
}

/* Folientyp-Auswahl (Admin-Deck) */
.slide-type-picker__title {
  margin: 0 0 0.35rem;
}

.slide-type-picker__intro {
  margin: 0 0 1rem;
}

.slide-type-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.slide-type-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: var(--bg, #fff);
  cursor: pointer;
}

.slide-type-card:disabled {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
}

.slide-type-picker__status:not([hidden]) {
  margin: 0.35rem 0 0.75rem;
  font-weight: 500;
}

.slide-type-card:hover,
.slide-type-card:focus-visible {
  border-color: var(--primary-color, #007cc1);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #007cc1) 25%, transparent);
}

.slide-type-card__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.slide-type-card__title {
  display: block;
  margin-bottom: 0.15rem;
}

.slide-type-card__example {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.slide-type-card__desc {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
}

/* Editor-Abschnitte */
.slide-editor-section {
  margin-bottom: 1.25rem;
}

.slide-editor-section__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
}

.slide-editor-advanced {
  margin-top: 1rem;
  border-top: 1px solid var(--line, #e5e5e5);
  padding-top: 0.75rem;
}

.slide-editor-advanced__summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.slide-preview-sample-notice {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.88rem;
  background: color-mix(in srgb, var(--primary-color, #007cc1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-color, #007cc1) 35%, transparent);
  color: var(--ink, inherit);
}

/* Statuszeile des Folieneditors (Sofort speichern): Text und Knöpfe in einer Zeile */
.slide-edit-status.auto-status {
  display: flex;
  flex-wrap: wrap;
}

.slide-edit-status.auto-status:empty {
  display: none;
}

.slide-edit-status--dirty {
  color: var(--status-warn, #b45309);
}

.slide-edit-status--saving {
  color: var(--muted, #666);
}

.slide-edit-status--saved {
  color: var(--status-ok, #15803d);
}

.slide-edit-status--failed,
.slide-edit-status--conflict {
  color: var(--danger, #b91c1c);
  font-weight: 600;
}

.slide-preview-panel__tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.slide-preview-tab {
  border: 1px solid var(--line, #ddd);
  background: var(--bg-soft, #f5f5f5);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.slide-preview-tab.is-active {
  background: var(--primary-color, #007cc1);
  color: #fff;
  border-color: transparent;
}

.slide-preview-frame {
  border: 1px dashed var(--line, #ccc);
  border-radius: 10px;
  padding: 1rem;
  min-height: 120px;
  background: var(--bg-soft, #fafafa);
}

.slide-preview-render {
  margin-top: 0.35rem;
}

.slide-preview-render--stage .slide-preview-stage-frame {
  max-height: 280px;
  overflow: auto;
}

.slide-preview-render .stage-cloud,
.slide-preview-render .poll {
  max-width: 100%;
}

.slide-preview-hint-line {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
}

.slide-preview-frame__question {
  margin: 0.35rem 0 0.75rem;
  font-size: 1rem;
}

.slide-editor-wordcloud-limit {
  margin-top: 0.35rem;
}

/* —— Ergebnisfarben (Multiple Choice) —— */
.slide-choice-colors-header {
  margin-bottom: 0.75rem;
}

.slide-choice-palette-field select {
  min-height: 44px;
}

.slide-option-row.slide-edit-option {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slide-option-row__label {
  width: 100%;
  min-height: 44px;
}

.option-color-trigger {
  width: 44px;
  height: 44px;
  border: 2px solid var(--line, #ccc);
  border-radius: 10px;
  background: var(--bg-elev, #fff);
  cursor: pointer;
  padding: 4px;
  position: relative;
}

.option-color-trigger--override {
  box-shadow: 0 0 0 2px var(--primary-color, #007cc1);
}

.option-color-trigger__swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: var(--option-color, #2563eb);
}

.slide-option-row__color {
  position: relative;
}

.option-color-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: min(280px, 88vw);
  padding: 0.75rem;
  border: 1px solid var(--line, #ddd);
  border-radius: 12px;
  background: var(--bg-elev, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.option-color-menu__title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.option-color-menu__presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.option-color-preset {
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 4px;
  cursor: pointer;
  background: var(--bg-elev, #fff);
}

.option-color-preset span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: var(--preset-color, #888);
}

.option-color-preset.is-selected {
  border-color: var(--primary-color, #007cc1);
}

.option-color-menu__custom summary {
  cursor: pointer;
  margin-bottom: 0.35rem;
}

.slide-editor-section,
.slide-editor-section__body {
  min-width: 0;
  max-width: 100%;
}

.slide-editor-section__body {
  overflow-wrap: anywhere;
}

/* —— Ergebnis-Sichtbarkeit (linksbündig, ohne horizontalen Überlauf) —— */
.result-visibility-control,
.slide-result-visibility {
  min-inline-size: 0;
  max-inline-size: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.result-visibility-control legend,
.slide-result-visibility legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0;
}

.result-visibility-control__choice,
.result-visibility-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  inline-size: 100%;
  max-inline-size: 42rem;
  min-height: 44px;
  padding: 0.75rem;
  margin: 0;
  cursor: pointer;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-visibility-control__choice input,
.result-visibility-choice input {
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.result-visibility-control__copy {
  min-inline-size: 0;
}

.result-visibility-control__copy strong {
  display: block;
}

.result-visibility-control__copy small,
.result-visibility-choice small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted, #666);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* H-006: Token statt Light-Hardcode — Dark nutzt --bg-soft (#2c3440). */
.slide-preview-hidden-results {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-soft, #e8ecf0);
}

@media (max-width: 640px) {
  .picker-option-header {
    display: none;
  }

  .slide-edit-option--picker,
  .slide-edit-option--picker-cats {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label actions"
      "short actions"
      "cat actions";
    gap: 0.25rem;
  }

  .slide-edit-option--picker .slide-option-row__label {
    grid-area: label;
  }

  .slide-edit-option--picker .slide-edit-option__short-cell {
    grid-area: short;
  }

  .slide-edit-option--picker .slide-edit-option__cat-slot {
    grid-area: cat;
  }

  .slide-edit-option--picker .slide-edit-option__actions {
    grid-area: actions;
    align-self: start;
  }
}

@media (max-width: 560px) {
  .slide-option-row.slide-edit-option {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label color"
      "remove remove";
  }

  .slide-option-row__label {
    grid-area: label;
  }

  .slide-option-row__color {
    grid-area: color;
  }

  .slide-option-row__remove {
    grid-area: remove;
    justify-self: start;
  }
}

.stage-preview-frame {
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  min-inline-size: 0;
  overflow: clip;
  border-radius: var(--radius-pulse, 12px);
  background: #0f172a;
  position: relative;
}

.stage-preview-frame__inner {
  inline-size: 100%;
  block-size: 100%;
  overflow: auto;
  overflow-x: clip;
  padding: var(--stage-page-padding, 0.75rem);
  font-size: var(--stage-body-size, 0.875rem);
  color: #f8fafc;
}

.stage-preview-frame__inner .stage-question {
  font-size: var(--stage-title-size, 1.1rem);
  margin: 0 0 var(--stage-gap, 0.5rem);
  overflow-wrap: anywhere;
}

.stage-renderer--preview .slide-preview-stage-frame {
  min-height: 0;
}

@media (max-width: 768px) {
  .stage-preview-frame {
    max-height: 220px;
  }
}

/* Folienseite: ein Startknopf, „Weitere Ansichten“ als Aufklappmenü, „+ Folie hinzufügen“ unter der Liste */
.event-status-ready {
  color: #1c6b46;
  background: color-mix(in srgb, #2a9d6f 16%, transparent);
  border-color: #2a9d6f;
}
.deck-more-views {
  position: relative;
  display: inline-block;
}
.deck-more-views > summary {
  list-style: none;
  cursor: pointer;
}
.deck-more-views > summary::-webkit-details-marker {
  display: none;
}
.deck-more-views > summary::after {
  content: " ▾";
}
.deck-more-views__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 17rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--line, #d7dde5);
  border-radius: 0.75rem;
  background: var(--bg-elev, #fff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}
.deck-more-views__panel .btn {
  justify-content: flex-start;
  text-align: left;
}
.present-screens-options {
  display: grid;
  gap: 0.35rem;
  max-width: 28rem;
}
.present-screens-options p {
  margin: 0 0 0.6rem;
}
.deck-more-views__panel a.btn {
  text-decoration: none;
}
.deck-more-views__note {
  margin: 0 0.75rem 0.35rem;
  font-size: 0.85em;
  max-width: 16rem;
}

/* Reiter „Ergebnisse“: Ergebnisse je Folie (Leinwand im Nur-Lese-Modus, 16:9) mit Blättern und Vollbild. */
.session-review__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}
.session-review__pick select {
  min-width: min(420px, 60vw);
  max-width: 100%;
}
.session-review__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line, #d0d5dd);
  background: #f4f4f4;
}
.session-review__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Archivierte Session: nur ansehen — keine Werkzeuge an den Fragen, keine Auswahl, kein „Frage hinzufügen“. */
/* Werkzeuge und Auswahl unsichtbar, aber mit ihrem Platz — sonst verschiebt sich das Raster der Zeile und der Titel wird gekürzt. */
.session-page--archived .session-slide-tools,
.session-page--archived .session-slide-check {
  visibility: hidden;
}
.session-page--archived .session-deck-add,
.session-page--archived #deck-bulk-bar {
  display: none !important;
}

/* ---------- Seitenleiste „Frage bearbeiten / Neue Frage“ (admin/slides/slidePanel.js) ----------
   Der Host liegt neben #events-root (außerhalb des Bereichs, den die Sessionseite beim Neuzeichnen ersetzt).
   Ab 1100 px steht die Leiste rechts neben der Liste (Raster), darunter ist sie Vollbild über der Liste. */
.slide-panel-host:not(.slide-panel-host--open) {
  display: none;
}

.slide-panel {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  background: var(--bg-elev, #fff);
  border-left: 1px solid var(--line, #d0d5dd);
}

.slide-panel[hidden] {
  display: none;
}

.slide-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line, #d0d5dd);
}

.slide-panel__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

/* Die Überschrift bekommt den Fokus nur per Code (Vollbild auf dem Handy): kein Rahmen darum */
.slide-panel__title:focus,
.slide-panel__title:focus-visible {
  outline: 0 !important;
}

.slide-panel__back {
  display: none;
}

/* Menü „⋯“ mit „Löschen“ im Kopf (Aussehen wie in der Fragenliste, components-session.css .slide-row-more) */
.slide-panel__menu[hidden] {
  display: none;
}

.slide-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.slide-panel__foot {
  padding: 0.5rem 1rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line, #d0d5dd);
}

.slide-panel__error {
  margin: 0 0 0.5rem;
  color: var(--ui-red-ink, #a3162b);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.slide-panel__error[hidden] {
  display: none;
}

.slide-panel__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2rem;
}

.slide-panel__status.auto-status {
  display: flex;
  flex-wrap: wrap;
}

.slide-panel__status.auto-status:empty,
.slide-panel__status.auto-status[hidden] {
  display: none;
}

.slide-panel__create {
  margin-left: auto;
}

.slide-panel__create[hidden] {
  display: none;
}

@media (min-width: 1100px) {
  /* Mehr Gewicht als „body.admin-area .view:not([hidden]) { display: block }“ (styles-admin-nav.css) */
  body.admin-area .view.has-slide-panel:not([hidden]),
  .has-slide-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    align-items: start;
  }

  .has-slide-panel > :not(.slide-panel-host) {
    min-width: 0;
  }

  /* Klebt unter dem Seitenkopf (etwa 4 rem) und endet über der Fußzeile; die Leiste scrollt in sich. */
  .slide-panel-host--open {
    position: sticky;
    top: 4rem;
    height: calc(100vh - 8.5rem);
    height: calc(100dvh - 8.5rem);
    min-height: 20rem;
  }

  /* Platz für den Hilfe-Knopf unten rechts, damit er „Frage hinzufügen“ nicht verdeckt */
  .slide-panel__foot {
    padding-right: 4.5rem;
  }
}

@media (max-width: 1099.98px) {
  .slide-panel-host--open {
    position: fixed;
    inset: 0;
    z-index: 400;
  }

  .slide-panel {
    width: 100%;
    max-width: 100vw;
    border-left: 0;
    padding-top: env(safe-area-inset-top);
  }

  .slide-panel__back {
    display: inline-flex;
  }

  .slide-panel__close {
    display: none;
  }

  .slide-panel__title {
    flex-basis: 100%;
    order: 2;
  }

  .slide-panel__menu {
    margin-inline-start: auto;
    order: 1;
  }
}

/* Vollbild offen: die Seite dahinter scrollt nicht mit */
html.slide-panel-fs-open {
  overflow: hidden;
}

/* ==========================================================================================================
   Etappe 9 · Fragenliste (Reiter „Fragen“ der Sessionseite)
   Die Liste ist eine gruppierte Liste (ui-group): je Frage eine Zeile mit Häkchen, Nummer, Symbolfeld (ui-cell__icon),
   Titel, Unterzeile (Art), Werkzeugen und dem Menü „⋯“. Die alten Klassen (event-slide-row, session-slide-*, data-*)
   bleiben, an ihnen hängen Ziehen, Auswahl, Tastatur und Tests; hier ändert sich nur die Optik.
   Stapelkontext: Das Menü „⋯“ (z-index 30 im Wurzelkontext) darf von der nächsten Zeile nicht verdeckt werden. Die Zeilen
   sind position: relative ohne eigenen z-index (kein Stapelkontext); die Zeile mit offenem Menü bekommt z-index 2.
   Der Schleier der Kopfleiste (20) und die Seitenleiste „Frage bearbeiten“ (400) liegen darüber.
   ========================================================================================================== */

/* Die Liste braucht keine Karte um sich: die Gruppe trägt die Fläche */
.pulse-admin-shell #session-panel-questions .session-deck-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.pulse-admin-shell .session-slide-list.ui-group {
  display: block;
  gap: 0;
  margin: 0;
  padding: 0;
  /* das Menü „⋯“ ragt aus der Gruppe heraus: nichts abschneiden; die Ecken runden erste und letzte Zeile selbst */
  overflow: visible;
}
.pulse-admin-shell .session-slide-list:focus-visible {
  outline: 3px solid var(--focus, #0052cc);
  outline-offset: 3px;
  border-radius: var(--ui-radius-l);
}

/* Zeile */
.pulse-admin-shell .session-slide-row.ui-cell {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1.25rem 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 0 var(--ui-space-3);
  min-height: 64px;
  margin: 0;
  padding: var(--ui-space-3) var(--ui-space-4);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ui-label);
}
.pulse-admin-shell .session-slide-row.ui-cell:first-child {
  border-top-left-radius: var(--ui-radius-l);
  border-top-right-radius: var(--ui-radius-l);
}
.pulse-admin-shell .session-slide-row.ui-cell:last-child {
  border-bottom-left-radius: var(--ui-radius-l);
  border-bottom-right-radius: var(--ui-radius-l);
}
/* Trennlinie ab dem Rand der Zeile, nicht über die ganze Breite */
.pulse-admin-shell .session-slide-row.ui-cell + .session-slide-row.ui-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--ui-space-4);
  right: 0;
  height: 1px;
  background: var(--ui-separator);
  pointer-events: none;
}
.pulse-admin-shell .session-slide-row.ui-cell:hover {
  background: var(--ui-surface-2);
}
.pulse-admin-shell .session-slide-row.ui-cell.is-selected {
  background: var(--ui-tint-soft);
}
.pulse-admin-shell .session-slide-row.ui-cell.is-focused {
  outline: 0;
  box-shadow: inset 0 0 0 2px var(--ui-tint);
}
.pulse-admin-shell .session-slide-row.ui-cell.is-dragging {
  opacity: 0.5;
}
/* Offenes Menü: die Zeile liegt über den folgenden (Stapelkontext) */
.pulse-admin-shell .session-slide-row.ui-cell:has(.slide-row-more[open]) {
  z-index: 2;
}

/* Häkchen, Nummer, Symbolfeld: alle 40 px hoch, oben bündig */
.pulse-admin-shell .session-slide-row .session-slide-check {
  align-self: start;
  justify-content: flex-start;
  width: 28px;
  height: 40px;
}
.pulse-admin-shell .session-slide-row .session-slide-check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--ui-tint);
}
.pulse-admin-shell .session-slide-row .event-slide-idx {
  align-self: start;
  display: flex;
  align-items: center;
  width: auto;
  height: 40px;
  font: var(--ui-footnote);
  font-variant-numeric: tabular-nums;
  color: var(--ui-label-2);
}
.pulse-admin-shell .session-slide-row .session-slide-icon.ui-cell__icon {
  align-self: start;
  font-size: 1.25rem;
  line-height: 1;
}

/* Titel und Unterzeile */
.pulse-admin-shell .session-slide-row .session-slide-meta.ui-cell__label {
  flex: none;
  justify-content: center;
  min-height: 40px;
  gap: 0;
}
.pulse-admin-shell .session-slide-row .session-slide-meta strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  font: var(--ui-headline);
  color: var(--ui-label);
}
.pulse-admin-shell .session-slide-row .session-slide-meta .ui-cell__sub {
  margin-top: 1px;
  font: var(--ui-footnote);
  color: var(--ui-label-2);
}

/* Werkzeuge: Bearbeiten, nach oben, nach unten, Menü */
.pulse-admin-shell .session-slide-row .session-slide-tools {
  align-self: start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  min-height: 40px;
  margin-left: auto;
}
.pulse-admin-shell #session-panel-questions .btn.ui-btn--ghost {
  background: transparent;
  color: var(--ui-tint-ink);
  border: 0;
}
.pulse-admin-shell #session-panel-questions .btn.ui-btn--ghost:hover:not(:disabled) {
  background: var(--ui-fill);
  border: 0;
}
.pulse-admin-shell #session-panel-questions .btn.ui-btn--quiet:hover:not(:disabled) {
  border: 0;
}
.pulse-admin-shell #session-panel-questions .btn.ui-btn--danger {
  background: transparent;
  color: var(--ui-red-ink);
  border: 0;
}
.pulse-admin-shell #session-panel-questions .btn.ui-btn--danger:hover:not(:disabled) {
  background: var(--ui-red-soft);
  border: 0;
}

/* Menü „⋯“ (Duplizieren, Löschen): Popover im Look */
.pulse-admin-shell .session-slide-row .slide-row-more__panel {
  gap: 2px;
  min-width: 11rem;
  padding: 4px;
  border: 1px solid var(--ui-separator);
  border-radius: var(--ui-radius-m);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-pop);
}
.pulse-admin-shell .session-slide-row .slide-row-more__panel .btn.ui-btn {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}
.pulse-admin-shell .session-slide-row .slide-row-more__panel .slide-row-more__danger {
  margin-top: 0;
  border-top: 0;
  color: var(--ui-red-ink);
}

/* Aufklappbare Unterfragen (Ausscheidungs-Quiz) */
.pulse-admin-shell .session-slide-meta .qe-sub-toggle.ui-btn {
  align-self: flex-start;
  margin: 2px 0 0 -12px;
}
.pulse-admin-shell .session-slide-meta .qe-sublist {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 4px 0 0 -8px;
  padding: 0;
  list-style: none;
}
.pulse-admin-shell #session-panel-questions .session-slide-meta .qe-sub-item.ui-btn {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  overflow: hidden;
  min-height: var(--ui-control-s);
  height: auto;
  padding: 4px 8px;
  gap: var(--ui-space-2);
  text-align: left;
  font: var(--ui-subhead);
  color: var(--ui-label);
}
.pulse-admin-shell .session-slide-meta .qe-sub-no {
  font-variant-numeric: tabular-nums;
  color: var(--ui-label-2);
}
.pulse-admin-shell .session-slide-meta .qe-sub-q {
  flex: 1 1 8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pulse-admin-shell .session-slide-meta .qe-chip.ui-chip {
  flex: none;
  padding: 3px 9px;
  border: 0;
  font: var(--ui-caption);
  background: var(--ui-fill);
  color: var(--ui-label);
}
.pulse-admin-shell .session-slide-meta .qe-chip.ui-chip--ok {
  background: var(--ui-green-soft);
  color: var(--ui-green-ink);
}
.pulse-admin-shell .session-slide-meta .qe-chip.ui-chip--warn {
  background: var(--ui-amber-soft);
  color: var(--ui-amber-ink);
}

/* Leere Liste */
.pulse-admin-shell .session-slide-list .session-slide-empty {
  padding: var(--ui-space-6) var(--ui-space-4);
  border: 0;
  border-radius: var(--ui-radius-l);
  font: var(--ui-callout);
  color: var(--ui-label-2);
}

/* „Frage hinzufügen“ und „Quizfragen aus dem Fragenpool“ unter der Liste */
.pulse-admin-shell .session-deck-add {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin: var(--ui-space-3) 0 0;
}

/* Massenaktionen: eine Gruppe mit Zahl links, Knöpfen rechts */
.pulse-admin-shell .deck-bulk-bar.ui-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-2);
  margin: 0 0 var(--ui-space-3);
  padding: var(--ui-space-2) var(--ui-space-3) var(--ui-space-2) var(--ui-space-4);
  border: 0;
  overflow: visible;
}
.pulse-admin-shell .deck-bulk-bar .deck-bulk-label {
  font: var(--ui-subhead);
  font-weight: 600;
  color: var(--ui-label);
}

/* Handy: Werkzeuge in eine zweite Zeile unter den Titel, Tippflächen: 44 px nur auf Touch-Geräten (pointer: coarse in admin-look.css setzt --ui-control-s), am Desktop 34 px */
@media (max-width: 640px) {
  .pulse-admin-shell .session-slide-row.ui-cell {
    grid-template-columns: 28px 1.25rem 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: var(--ui-space-2);
  }
  .pulse-admin-shell .session-slide-row .session-slide-tools {
    grid-column: 4;
    grid-row: 2;
    margin-left: -12px;
    justify-content: flex-start;
  }
  .pulse-admin-shell .session-deck-add .btn.ui-btn {
    flex: 1 1 auto;
  }
}
