/* GazeTo — VSD / Szenenbild editor + player styles */

.vsd-screen { padding-bottom: 64px; }

/* ── Header ── */
.vsd-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.vsd-head__left { display: flex; flex-direction: column; gap: 4px; }
.vsd-head__actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* "Nutzen" — the prominent hand-to-user action */
.vsd-use-btn {
  min-height: 52px;
  padding: 12px 24px;
  font-size: 1.05rem;
  font-weight: 700;
}
.vsd-use-btn i { width: 22px; height: 22px; }

.vsd-intro {
  color: var(--c-fg2, #4a4a4a);
  font-size: 1.05rem;
  margin: 0 0 24px;
  max-width: 60ch;
}
/* Compact one-line lead for the welcome view (keeps the landing on one screen) */
.vsd-intro--compact { font-size: 1rem; margin: 0 0 16px; max-width: 72ch; }

/* Collapsible "So geht's & Tipps" — folds the quick-start + tips away so the
   create buttons + scene list stay above the fold. Auto-opened for first use. */
.vsd-help { margin: 20px 0 0; max-width: 64ch; border-top: 1px solid var(--c-border, rgba(0,0,0,0.1)); padding-top: 12px; }
.vsd-help__summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--c-accent, #4b698c); padding: 6px 0; min-height: 48px;
}
.vsd-help__summary::-webkit-details-marker { display: none; }
.vsd-help__summary i { width: 18px; height: 18px; flex-shrink: 0; }
.vsd-help[open] > .vsd-help__summary { margin-bottom: 10px; }
.vsd-help .vsd-quickstart, .vsd-help .vsd-tips { margin-bottom: 14px; }

/* ── Tips box ("Was macht ein gutes Szenenbild aus?") ── */
.vsd-tips {
  padding: 20px 22px;
  margin: 0 0 28px;
  max-width: 64ch;
  background: var(--c-bg-secondary, #f3f6fa);
}

/* Motivating 3-step quick start — clear guidance for first use */
.vsd-quickstart {
  padding: 20px 22px;
  margin: 0 0 22px;
  max-width: 64ch;
  background: var(--gradient-brand, linear-gradient(135deg,#1a3a6a 0%,#4b698c 100%));
  color: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-md, 0 4px 18px rgba(0,0,0,0.12));
}
.vsd-quickstart__title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; font-family: var(--f-display, serif); font-size: 1.15rem; color: #fff;
}
.vsd-quickstart__title i { width: 22px; height: 22px; color: #fff; flex-shrink: 0; }
.vsd-quickstart__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vsd-quickstart__item { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.vsd-quickstart__num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: rgba(255,255,255,0.22); color: #fff;
}
.vsd-quickstart__icon { width: 20px; height: 20px; flex-shrink: 0; color: rgba(255,255,255,0.92); }
.vsd-quickstart__cta {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 0 0; font-weight: 600; color: #fff;
}
.vsd-quickstart__cta i { width: 18px; height: 18px; flex-shrink: 0; }
.vsd-tips__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-headline, serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--c-fg1, #1a1a1a);
}
.vsd-tips__title i { width: 24px; height: 24px; color: var(--c-accent, #4b698c); flex-shrink: 0; }
.vsd-tips__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vsd-tips__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--c-fg2, #4a4a4a);
}
.vsd-tips__item i {
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--c-accent, #4b698c);
}
.vsd-tips__rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--c-border, rgba(0,0,0,0.1));
  font-size: 0.95rem;
  font-style: italic;
  color: var(--c-fg2, #4a4a4a);
}
.vsd-tips__rule i { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; color: var(--color-primary, #4b698c); }

/* ── List view ── */
.vsd-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.vsd-new-btn {
  min-height: 56px;
}
.vsd-import-btn {
  min-height: 56px;
}
.vsd-scene-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.vsd-empty {
  color: var(--c-fg3, #71717a);
  font-size: 1rem;
  padding: 24px 0;
}
.vsd-scene-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.vsd-scene-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-secondary, #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vsd-scene-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vsd-scene-card__thumb i { width: 48px; height: 48px; color: var(--c-fg3, #9a9a9a); }
/* Real mini preview of a grid scene (cells with colour / picture). */
.vsd-mini-grid { position: relative; width: 100%; height: 100%; background: #ece4d2; }
.vsd-mini-cell {
  position: absolute; box-sizing: border-box;
  border: 0.5px solid rgba(255,255,255,0.65);
  border-radius: 2px;
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
.vsd-mini-cell.has-image { background-color: #fff; }
.vsd-scene-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.vsd-scene-card__name {
  font-family: var(--font-headline, serif);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0;
  color: var(--c-fg1, #1a1a1a);
}
.vsd-scene-card__meta { margin: 0; color: var(--c-fg3, #71717a); font-size: 0.95rem; }
.vsd-scene-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.vsd-scene-card__actions .btn-ghost-pill {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 0.95rem;
}

/* ── Editor view ── */
.vsd-name-row { max-width: 480px; margin-bottom: 24px; }

/* ── Compact editor — keep the core flow on one screen (no page scroll) ──
   Tighter header / name row, a height-capped stage, and a scrollable side
   panel so the photo→hotspot→record flow fits ~900px tall laptops. */
.vsd-editor--compact { padding-bottom: 16px; }
.vsd-editor--compact .vsd-head { margin-bottom: 12px; }
.vsd-editor--compact .vsd-name-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  max-width: none;
}
.vsd-editor--compact .vsd-name-row .vsd-label { flex-shrink: 0; margin: 0; }
.vsd-editor--compact .vsd-name-row .vsd-input { flex: 1; min-height: 48px; max-width: 520px; }
.vsd-editor--compact .vsd-layout { gap: 22px; }
/* Cap the stage height so it never grows past the viewport. */
.vsd-editor--compact .vsd-stage {
  max-height: 60vh;
}
.vsd-editor--compact .vsd-stage__img { max-height: 60vh; object-fit: contain; }
/* The side panel flows with the page (no nested scroll cap) so the per-hotspot
   editor AND "Mehr Einstellungen" always stay reachable — the earlier internal
   max-height clipped the settings off the bottom. */
.vsd-editor--compact .vsd-panel-col {
  padding-right: 4px;
}
.vsd-editor--compact .vsd-stage-col { gap: 10px; }

.vsd-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.vsd-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-fg1, #1a1a1a);
}
.vsd-input {
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--c-border-strong, #bdbdbd);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--c-bg-primary, #fff);
  color: var(--c-fg1, #1a1a1a);
}
.vsd-input:focus {
  outline: none;
  border-color: var(--c-accent, #4b698c);
  box-shadow: 0 0 0 3px rgba(75,105,140,0.18);
}

.vsd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 880px) {
  .vsd-layout { grid-template-columns: 1fr; }
}

.vsd-stage-col { display: flex; flex-direction: column; gap: 14px; }

/* Background controls */
.vsd-bg-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.vsd-upload-btn { cursor: pointer; }
.vsd-file-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.vsd-bg-bar .btn-ghost-pill, .vsd-bg-bar .btn-primary-blue { min-height: 48px; }

.vsd-stage-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 44px 24px;
  color: var(--c-fg3, #71717a);
  border: 2px dashed var(--c-border-strong, #bdbdbd);
}
.vsd-stage-empty > i { width: 56px; height: 56px; color: var(--c-accent, #4b698c); }
.vsd-stage-empty__title {
  font-family: var(--font-headline, serif);
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0;
  color: var(--c-fg1, #1a1a1a);
}
.vsd-stage-empty p { margin: 0; max-width: 44ch; }

/* Hero photo buttons (empty state) — the two foregrounded "just in time" CTAs */
.vsd-bg-bar--hero {
  margin-top: 6px;
  justify-content: center;
}
.vsd-bg-bar--hero .vsd-upload-btn,
.vsd-bg-bar--hero .vsd-hero-cam {
  min-height: 60px;
  padding: 14px 26px;
  font-size: 1.05rem;
  font-weight: 700;
}
.vsd-bg-bar--hero .vsd-upload-btn i,
.vsd-bg-bar--hero .vsd-hero-cam i { width: 22px; height: 22px; }

/* Compact tools-wrap: rect/lasso toggle on the left, change-photo on the right */
.vsd-tools-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.vsd-bg-bar--compact { gap: 8px; }
.vsd-bg-bar--compact .btn-ghost-pill { min-height: 48px; padding: 10px 14px; font-size: 0.9rem; }
.vsd-bg-bar--compact .btn-ghost-pill i { width: 16px; height: 16px; }

.vsd-stage-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-fg2, #4a4a4a);
}
.vsd-stage-hint i { width: 20px; height: 20px; flex-shrink: 0; }

/* Stage canvas */
.vsd-stage {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg, 0 10px 15px rgba(0,0,0,0.12));
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}
.vsd-stage__img { width: 100%; display: block; }
.vsd-stage__overlay {
  position: absolute;
  inset: 0;
}

/* Draw preview */
.vsd-draw-preview {
  position: absolute;
  border: 2px dashed #fff;
  background: rgba(75,105,140,0.22);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  pointer-events: none;
}

/* Lasso (freehand) live preview — marching-ants polyline */
.vsd-lasso-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.vsd-lasso-preview polyline {
  fill: rgba(75,105,140,0.20);
  stroke: #fff;
  stroke-width: 0.6;
  stroke-dasharray: 2 1.5;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  animation: vsd-march 0.6s linear infinite;
}
@keyframes vsd-march { to { stroke-dashoffset: -7; } }

/* ── Drawing-tool toggle (Rechteck / Freihand) ── */
.vsd-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vsd-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--c-border-strong, #bdbdbd);
  background: var(--c-bg-primary, #fff);
  color: var(--c-fg1, #1a1a1a);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.vsd-tool-btn i { width: 18px; height: 18px; }
.vsd-tool-btn:hover { border-color: var(--c-accent, #4b698c); }
.vsd-tool-btn.is-active {
  border-color: var(--c-accent, #4b698c);
  background: var(--c-accent, #4b698c);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(75,105,140,0.25);
}

/* Lasso hotspot — no rectangular border (the clip-path defines the shape) */
.vsd-hotspot--lasso {
  border-radius: 0;
  border: none;
  background: rgba(75,105,140,0.30);
  box-shadow: none;
}
.vsd-hotspot--lasso.is-selected {
  background: rgba(255,214,10,0.30);
  box-shadow: none;
}
/* Keep the label readable above the (possibly clipped) shape */
.vsd-hotspot--lasso .vsd-hotspot__label { z-index: 2; }

/* Hotspot box on the stage */
.vsd-hotspot {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 10px;
  background: rgba(75,105,140,0.18);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.3);
  cursor: move;
  touch-action: none;
  box-sizing: border-box;
}
.vsd-hotspot.is-selected {
  border-color: #ffd60a;
  background: rgba(255,214,10,0.18);
  box-shadow: 0 0 0 2px #ffd60a, 0 2px 12px rgba(0,0,0,0.4);
}
.vsd-hotspot__label {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.vsd-hotspot__audio {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #16a34a;
  border-radius: 50%;
  pointer-events: none;
}
.vsd-hotspot__audio i { width: 14px; height: 14px; color: #fff; }
/* Resize handle (bottom-right corner) */
.vsd-hotspot__handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #ffd60a;
  border: 2px solid rgba(0,0,0,0.55);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: nwse-resize;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.vsd-hotspot:hover .vsd-hotspot__handle,
.vsd-hotspot.is-selected .vsd-hotspot__handle { opacity: 1; }

/* Link indicator on a hotspot (jumps to another scene at runtime) */
.vsd-hotspot__link {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent, #4b698c);
  border-radius: 50%;
  pointer-events: none;
}
.vsd-hotspot__link i { width: 14px; height: 14px; color: #fff; }

/* ── Live preview: hotspot visibility (Klar / Dezent / Unsichtbar) ──
   The overlay carries .vsd-vis-* so the author sees exactly how hotspots will
   look in use, updated immediately when the setting changes. The selected
   hotspot always keeps its bright editing outline regardless of visibility. */
/* Klar — full visible card/rim */
.vsd-vis-clear .vsd-hotspot {
  border: 3px solid rgba(255,255,255,0.95);
  background: rgba(75,105,140,0.22);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.35);
}
/* Dezent — faint */
.vsd-vis-subtle .vsd-hotspot {
  border: 2px dotted rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
  box-shadow: none;
}
/* Unsichtbar — invisible in play; here only a thin author-only outline */
.vsd-vis-invisible .vsd-hotspot {
  border: 1px dashed rgba(255,255,255,0.45);
  background: transparent;
  box-shadow: none;
}
.vsd-vis-invisible .vsd-hotspot__label { opacity: 0.65; }
/* The currently selected hotspot stays clearly editable in every mode. */
.vsd-stage__overlay .vsd-hotspot.is-selected {
  border: 3px solid #ffd60a;
  background: rgba(255,214,10,0.18);
  box-shadow: 0 0 0 2px #ffd60a, 0 2px 12px rgba(0,0,0,0.4);
}
/* Labels toggle — hide all hotspot labels when "Beschriftungen" is off. */
.vsd-no-labels .vsd-hotspot__label,
.vsd-no-labels .vsd-answer-cell__label { display: none; }

/* ── Right panel ── */
.vsd-panel-col { display: flex; flex-direction: column; gap: 20px; }
.vsd-panel-section { display: flex; flex-direction: column; gap: 10px; }
.vsd-panel-title {
  font-family: var(--font-headline, serif);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 4px;
  color: var(--c-fg1, #1a1a1a);
}
.vsd-panel-empty { color: var(--c-fg3, #71717a); margin: 0; font-size: 0.95rem; }

.vsd-hotspot-list { display: flex; flex-direction: column; gap: 8px; }
.vsd-hotspot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border, rgba(0,0,0,0.08));
  border-radius: 12px;
  background: var(--c-bg-primary, #fff);
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  color: var(--c-fg1, #1a1a1a);
  width: 100%;
}
.vsd-hotspot-row:hover { border-color: var(--c-accent, #4b698c); }
.vsd-hotspot-row.is-selected {
  border-color: var(--c-accent, #4b698c);
  background: var(--c-bg-secondary, #f3f6fa);
  box-shadow: 0 0 0 2px rgba(75,105,140,0.25);
}
.vsd-hotspot-row__num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--c-accent-2, #3a5a7c);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.vsd-hotspot-row__label { flex: 1; font-weight: 600; }
.vsd-hotspot-row__chip {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: #16a34a; border-radius: 50%;
}
.vsd-hotspot-row__chip i { width: 14px; height: 14px; color: #fff; }

/* Hotspot editor card */
.vsd-hotspot-editor { padding: 18px; gap: 4px; }
.vsd-record-row { display: flex; gap: 8px; flex-wrap: wrap; }
.vsd-record-row .btn-ghost-pill { min-height: 48px; padding: 10px 16px; font-size: 0.95rem; }
.vsd-record-row .btn-ghost-pill:disabled { opacity: 0.5; cursor: default; }
.vsd-record-note { color: var(--c-fg3, #71717a); font-size: 0.9rem; }

.btn-ghost-pill.is-recording {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
  animation: vsd-pulse 1.1s ease-in-out infinite;
}
@keyframes vsd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.vsd-block-btn { width: 100%; margin-top: 12px; }

/* Danger styling for ghost pills */
.btn-ghost-pill.vsd-danger {
  color: var(--color-primary-dark, #3a5a7c);
  border-color: var(--color-primary, #4b698c);
}
.btn-ghost-pill.vsd-danger:hover {
  background: var(--color-primary-bg, #fdf2f4);
}

/* ── Camera capture overlay ── */
.vsd-cam-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(8, 14, 24, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.vsd-cam-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 92vw;
}
.vsd-cam-video {
  width: 100%;
  max-width: 720px;
  max-height: 70vh;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.vsd-cam-controls { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.vsd-cam-controls .btn-primary-blue,
.vsd-cam-controls .btn-ghost-pill { min-height: 56px; }

/* ── Grid / Raster editor ── */
.vsd-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 880px) { .vsd-grid-layout { grid-template-columns: 1fr; } }

.vsd-grid-stage-col { display: flex; flex-direction: column; gap: 14px; }
.vsd-grid-stage {
  position: relative;
  width: 100%;
  padding-top: 56.25%;            /* 16:9 board */
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f3ef, #e8e4dc);
  box-shadow: var(--shadow-lg, 0 10px 15px rgba(0,0,0,0.12));
  overflow: hidden;
}
.vsd-grid-cell {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-sizing: border-box;
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  color: #fff;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.vsd-grid-cell:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.vsd-grid-cell.is-selected {
  border-color: #ffd60a;
  box-shadow: 0 0 0 3px #ffd60a, 0 4px 14px rgba(0,0,0,0.4);
}
.vsd-grid-cell__label {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  word-break: break-word;
}
/* AAC symbol cell: picture on top, separate label band (black on sepia) below. */
.vsd-grid-cell.has-image { padding: 0; flex-direction: column; }
.vsd-grid-cell__media {
  position: absolute;
  top: 5px; left: 5px; right: 5px;
  height: 66%;
  border-radius: 9px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fff;
}
.vsd-grid-cell__band {
  position: absolute;
  left: 5px; right: 5px; bottom: 5px;
  height: 28%;
  display: flex; align-items: center; justify-content: center;
  padding: 2px 6px;
  border-radius: 9px;
  background: #f4ecd8;
  color: #161210;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.12;
  text-align: center;
  text-shadow: none;
  overflow: hidden;
  box-sizing: border-box;
}
.vsd-grid-cell__mic {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: #16a34a; border-radius: 50%;
}
.vsd-grid-cell__mic i { width: 12px; height: 12px; color: #fff; }

/* Colour swatches */
.vsd-color-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vsd-color-swatch {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0.12);
  cursor: pointer;
  padding: 0;
}
.vsd-color-swatch.is-selected { border-color: #ffd60a; box-shadow: 0 0 0 2px #ffd60a; }

/* Size chooser modal */
.vsd-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.vsd-modal {
  max-width: 420px;
  width: 100%;
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px;
  align-items: stretch;
}
.vsd-modal__title { margin: 0; font-family: var(--font-headline, serif); font-size: 1.3rem; }
.vsd-size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.vsd-size-btn {
  min-height: 64px;
  border-radius: 12px;
  border: 2px solid var(--c-border, rgba(0,0,0,0.12));
  background: var(--c-bg-secondary, #f3f6fa);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
}
.vsd-size-btn:hover { border-color: var(--c-accent, #4b698c); background: #fff; }

/* ── Collapsible "Mehr Einstellungen" (secondary play-settings) ── */
.vsd-more {
  border: 1.5px solid var(--c-border, rgba(0,0,0,0.1));
  border-radius: 14px;
  background: var(--c-bg-secondary, #f3f6fa);
  overflow: hidden;
}
.vsd-more__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-fg1, #1a1a1a);
  list-style: none;
  user-select: none;
}
.vsd-more__summary::-webkit-details-marker { display: none; }
.vsd-more__summary i { width: 20px; height: 20px; color: var(--c-accent, #4b698c); flex-shrink: 0; }
.vsd-more__summary i[data-lucide="chevron-down"] { margin-left: auto; transition: transform 0.15s ease; }
.vsd-more[open] .vsd-more__summary i[data-lucide="chevron-down"] { transform: rotate(180deg); }
.vsd-more[open] .vsd-more__summary { border-bottom: 1px solid var(--c-border, rgba(0,0,0,0.08)); }
.vsd-more .vsd-play-options { background: transparent; border: none; box-shadow: none; }

/* ── Collapsible "Verlinkung" (advanced per-hotspot link picker) ── */
.vsd-link {
  margin-top: 12px;
  border: 1.5px solid var(--c-border, rgba(0,0,0,0.1));
  border-radius: 12px;
  overflow: hidden;
}
.vsd-link__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-fg1, #1a1a1a);
  list-style: none;
  user-select: none;
}
.vsd-link__summary::-webkit-details-marker { display: none; }
.vsd-link__summary i { width: 18px; height: 18px; color: var(--c-accent, #4b698c); flex-shrink: 0; }
.vsd-link[open] .vsd-link__summary { border-bottom: 1px solid var(--c-border, rgba(0,0,0,0.08)); }
.vsd-link .vsd-field { padding: 12px 14px 4px; margin-bottom: 8px; }
.vsd-link__select { min-height: 48px; }

/* Link chip in the hotspot list */
.vsd-hotspot-row__chip--link { background: var(--c-accent, #4b698c); }

/* ── Per-scene play options (Einstellungen / Wiedergabe-Optionen) ── */
.vsd-play-options { padding: 18px; gap: 6px; }
.vsd-play-options__title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vsd-play-options__title i { width: 22px; height: 22px; color: var(--c-accent, #4b698c); flex-shrink: 0; }
.vsd-option-hint {
  margin: 4px 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--c-fg3, #71717a);
}
.vsd-seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vsd-seg-btn {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--c-border-strong, #bdbdbd);
  background: var(--c-bg-primary, #fff);
  color: var(--c-fg1, #1a1a1a);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.vsd-seg-btn:hover { border-color: var(--c-accent, #4b698c); }
.vsd-seg-btn.is-active {
  border-color: var(--c-accent, #4b698c);
  background: var(--c-accent, #4b698c);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(75,105,140,0.25);
}

/* ── Toggle (Beschriftungen anzeigen) — clean accessible switch (track+knob) ── */
.vsd-toggle-field {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  min-height: 48px; /* WCAG AAA touch target: row is the actual tap area */
}
.vsd-toggle {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 30px;
  min-height: 30px; /* visual size only — touch area via .vsd-toggle-field */
  border-radius: 999px;
  border: none;
  background: var(--c-border-strong, #bdbdbd);
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease;
}
.vsd-toggle.is-on { background: var(--c-accent, #4b698c); }
.vsd-toggle:focus-visible { outline: 3px solid rgba(75,105,140,0.45); outline-offset: 2px; }
.vsd-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transition: transform 0.15s ease;
  pointer-events: none;
}
.vsd-toggle.is-on .vsd-toggle__knob { transform: translateX(22px); }
.vsd-toggle-field__label { margin: 0; cursor: pointer; user-select: none; }
.vsd-toggle-field .vsd-label { margin: 0; cursor: pointer; }

/* ── Hybrid answer-strip cells on the stage ── */
.vsd-answer-cell {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-sizing: border-box;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  color: #fff;
  cursor: pointer;
  padding: 6px;
  text-align: center;
}
.vsd-answer-cell.is-selected {
  border-color: #ffd60a;
  box-shadow: 0 0 0 3px #ffd60a, 0 4px 14px rgba(0,0,0,0.45);
}
.vsd-answer-cell__label {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  word-break: break-word;
  pointer-events: none;
}
.vsd-answer-cell__mic {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: #16a34a; border-radius: 50%;
  pointer-events: none;
}
.vsd-answer-cell__mic i { width: 12px; height: 12px; color: #fff; }
