/* =========================================================
   Globale Styles — 1:1 portiert aus mockups/v2/cmj-squatjump-light.html
   (verbindliche Referenz laut CLAUDE.md). Farbbelegung dieser Übung:
   --x = CMJ (blau) · --y = Squat Jump (orange) · --z = Ergebnis/Prinzip (türkis)
========================================================= */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #fafbfd;
  --border: #e3e6ec;
  --border-strong: #c9cfdb;
  --ink: #10131a;
  --ink-dim: #2e3340;
  --ink-mute: #4a5160;
  --accent: #3a63d8;
  --x: #3a63d8; /* blau   – CMJ */
  --y: #d98018; /* orange – Squat Jump */
  --z: #1098a5; /* türkis – Ergebnis/Prinzip */
  --warn: #b8631a;
  --bad: #c93535;
  --good: #1aa56a;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 14px 40px -18px rgba(20, 30, 55, 0.18);
  --radius: 14px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  margin: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(58, 99, 216, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(217, 128, 24, 0.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 80px;
}
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: conic-gradient(from 140deg, var(--x), var(--z), var(--y), var(--x));
  filter: saturate(0.9);
  position: relative;
}
.logo::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 7px;
  background: var(--panel-2);
}
.brand b {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand small {
  display: block;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.crumbs {
  font-size: 13.5px;
  color: var(--ink-dim);
}
.crumbs span {
  color: var(--ink);
}
.title {
  margin: 30px 0 8px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.4px;
}
.subtitle {
  color: var(--ink-dim);
  max-width: 860px;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  background: var(--panel);
  font-size: 13.5px;
}
.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 10px var(--good);
}
.lab {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 22px;
  margin-top: 18px;
}
@media (max-width: 980px) {
  .lab {
    grid-template-columns: 1fr;
  }
}
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
}
.card .body {
  padding: 16px;
}
/* ---------- stage (animation + chart) ---------- */
.player {
  position: relative;
  background: #0e1118;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.stage {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, #0e1118, #11151d);
}
.scrub-wrap {
  padding: 10px 14px;
  background: linear-gradient(180deg, #f6f8fc, #eef1f7);
  border-top: 1px solid var(--border);
}
.scrub {
  --pct: 0%;
  position: relative;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: none;
  user-select: none;
}
.scrub .track {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 99px;
  background: #e7eaf1;
  overflow: hidden;
  pointer-events: none;
}
.scrub .fill {
  position: absolute;
  inset: 0;
  width: var(--pct);
  background: linear-gradient(90deg, var(--accent), #7aa0ff);
  border-radius: 99px;
  pointer-events: none;
}
.scrub .head {
  position: absolute;
  top: 50%;
  left: var(--pct);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(58, 99, 216, 0.18), 0 2px 8px rgba(10, 20, 55, 0.25);
  transition: width 0.12s ease, height 0.12s ease;
  pointer-events: none;
}
.scrub.dragging .head,
.scrub:active .head {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 0 5px rgba(58, 99, 216, 0.22), 0 4px 12px rgba(10, 20, 55, 0.3);
}
.phases {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-mute);
}
.phases button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  font: 600 13px var(--sans);
  transition: 0.15s ease;
}
.phases button:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f6f8fc, #eef1f7);
}
.ctrl {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: 600 14px var(--sans);
  transition: 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ctrl:hover {
  border-color: var(--border-strong);
  background: #f1f3f7;
}
.ctrl.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}
.ctrl.primary:hover {
  background: #2a52c8;
}
.ctrl.primary:disabled {
  opacity: 0.55;
  cursor: default;
}
.ctrl svg {
  width: 14px;
  height: 14px;
}
.time {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-dim);
  margin-left: auto;
  background: #eef1f7;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.speed {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.speed button {
  background: transparent;
  border: 0;
  color: var(--ink-dim);
  padding: 8px 11px;
  cursor: pointer;
  font: 700 13px var(--sans);
}
.speed button.on {
  background: #e7eaf1;
  color: var(--ink);
}
.kbd {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ffffff;
}
.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 18px 14px;
  font-size: 13.5px;
  color: var(--ink-dim);
  background: var(--panel-2);
  border-top: 1px solid var(--border);
}
.shortcuts b {
  color: var(--ink);
  font-weight: 600;
}
/* ---------- side panel ---------- */
.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.axis-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f8fc;
}
.axis-row .swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}
.axis-row b {
  font-size: 15px;
  font-weight: 700;
}
.axis-row .hint {
  color: var(--ink-dim);
  font-size: 13.5px;
  display: block;
  margin-top: 3px;
  line-height: 1.45;
}
.axis-row code {
  color: var(--ink-mute);
  font-size: 12.5px;
  font-family: var(--mono);
}
.glossary {
  margin-top: 14px;
}
.glossary details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f8fc;
  margin-bottom: 10px;
}
.glossary summary {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.glossary summary::-webkit-details-marker {
  display: none;
}
.glossary summary::after {
  content: "+";
  color: var(--ink-mute);
  font-size: 18px;
  line-height: 1;
}
.glossary details[open] summary::after {
  content: "−";
}
.glossary .term-body {
  padding: 2px 14px 14px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
}
.glossary .term-body code {
  background: #eef1f7;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 13px;
  font-family: var(--mono);
}
/* ---------- writing area ---------- */
.write {
  margin-top: 32px;
}
.write h2 {
  font-size: 22px;
  margin: 0 0 6px;
}
.write .lead {
  color: var(--ink-dim);
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 880px;
}
.editor-shell {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-dim);
  background: #f4f6fa;
}
.editor-toolbar .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-dim);
  font-weight: 500;
}
.editor-toolbar .live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 8px rgba(201, 53, 53, 0.5);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
.editor {
  position: relative;
  min-height: 220px;
  padding: 22px 24px;
  font: 17px/1.7 var(--sans);
  color: var(--ink);
  background: transparent;
  outline: none;
  white-space: pre-wrap;
}
.editor:empty::before {
  content: "Beginne hier, deine Beobachtungen zu beschreiben …";
  color: var(--ink-mute);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 18px;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: #f4f6fa;
}
.editor-actions .hint {
  color: var(--ink-dim);
  font-size: 13px;
  margin-left: auto;
}
.mark {
  position: relative;
  border-radius: 3px;
  padding: 0 2px;
  cursor: default;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.mark[data-axis="x"] {
  --mark-c: var(--x);
}
.mark[data-axis="y"] {
  --mark-c: var(--y);
}
.mark[data-axis="z"] {
  --mark-c: var(--z);
}
.mark.hovered,
.mark.opened {
  background: color-mix(in srgb, var(--mark-c) 14%, transparent);
  box-shadow: inset 0 -2px 0 var(--mark-c);
}
.note-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font: 700 12px var(--sans);
  color: var(--mark-c, var(--ink-mute));
  background: #ffffff;
  border: 1.5px solid var(--mark-c, var(--ink-mute));
  margin: 0 1px 0 5px;
  vertical-align: 1px;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.note-chip[data-axis="x"] {
  --mark-c: var(--x);
}
.note-chip[data-axis="y"] {
  --mark-c: var(--y);
}
.note-chip[data-axis="z"] {
  --mark-c: var(--z);
}
.note-chip:hover {
  transform: scale(1.12);
  background: var(--mark-c);
  color: #ffffff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark-c) 20%, transparent);
}
.note-chip.opened {
  background: var(--mark-c);
  color: #ffffff;
}
.note-chip.opened .num {
  display: none;
}
.note-chip.opened::after {
  content: "✓";
  font-size: 13px;
  font-weight: 700;
}
.hint-banner {
  display: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.55;
}
.hint-banner.show {
  display: block;
}
.hint-banner b {
  color: var(--ink);
  font-weight: 600;
}
.hint-banner .row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hint-banner .icon {
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}
.hint-banner .toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  font: 600 12.5px var(--sans);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.hint-banner .toggle:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: #ffffff;
}
.editor-shell.markers-hidden .note-chip {
  display: none;
}
.editor-shell.markers-hidden .mark.hovered,
.editor-shell.markers-hidden .mark.opened {
  background: none;
  box-shadow: none;
}
.float-tip {
  position: fixed;
  left: 0;
  top: 0;
  min-width: 320px;
  max-width: 440px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 28px 60px -14px rgba(15, 30, 60, 0.18), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
}
.float-tip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.float-tip .arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  transform: rotate(45deg);
}
.float-tip[data-placement="below"] .arrow {
  top: -7px;
  border-right: 0;
  border-bottom: 0;
}
.float-tip[data-placement="above"] .arrow {
  bottom: -7px;
  border-left: 0;
  border-top: 0;
}
.float-tip .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 12.5px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 10px;
}
.float-tip .label .sw {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}
.float-tip .body {
  color: var(--ink-dim);
  font-size: 15px;
}
.float-tip .body b {
  color: var(--ink);
  font-weight: 600;
}
.float-tip .nudge {
  margin-top: 12px;
  color: var(--ink);
  font-size: 14px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}
.float-tip .nudge b {
  color: var(--ink);
}
.assistant {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}
@media (max-width: 980px) {
  .assistant {
    grid-template-columns: 1fr;
  }
}
.scaffold ol {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.75;
}
.scaffold ol li::marker {
  color: var(--accent);
  font-weight: 700;
}
.scaffold ol li b {
  color: var(--ink);
}
.expert {
  position: relative;
}
.expert-body {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.7;
  filter: blur(7px);
  transition: 0.25s ease;
  user-select: none;
}
.expert.revealed .expert-body {
  filter: blur(0);
  user-select: auto;
}
.expert .reveal {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  padding-bottom: 8px;
}
.expert.revealed .reveal {
  display: none;
}
.qr-embed {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.qr-embed img {
  width: 128px;
  height: 128px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
footer {
  margin-top: 40px;
  color: var(--ink-mute);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
footer span b {
  color: var(--ink-dim);
  font-weight: 600;
}
::selection {
  background: rgba(58, 99, 216, 0.22);
  color: var(--ink);
}
a {
  color: inherit;
}

/* ---------- Pflege / Autoren-Werkzeug ---------- */
.admin-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.admin-row .meta {
  color: var(--ink-mute);
  font-size: 13px;
  font-family: var(--mono);
}
.admin-row .actions {
  display: flex;
  gap: 8px;
}
.admin-row a.ctrl {
  text-decoration: none;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 880px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}
.field-hint {
  font-weight: 400;
  color: var(--ink-mute);
}
.field input,
.field textarea {
  font: 15px/1.6 var(--sans);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 99, 216, 0.15);
}
.field-accent textarea {
  background: #f6f8fc;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
}
.save-ok {
  color: var(--good);
  font-weight: 600;
  font-size: 14px;
}
.save-err {
  color: var(--bad);
  font-weight: 600;
  font-size: 14px;
}
.admin-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-note {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------- Demo-/Show-Buttons: nur Übungsseite, mit Hinweis ---------- */
.demo-hint {
  position: relative;
  border-style: dashed;
}
.demo-hint::after {
  content: "Nur für Übungszwecke";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--ink);
  color: #fff;
  font: 600 11px var(--sans);
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 6px;
  box-shadow: 0 6px 18px -6px rgba(10, 20, 55, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}
.demo-hint:hover::after,
.demo-hint:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-6px);
}

/* ---------- Startseite / Galerie ---------- */
.mission {
  margin: 18px 0 26px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.mission h2 {
  margin: 0 0 8px;
  font-size: 19px;
}
.mission p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 880px;
}
.mission .steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.mission .step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f6f8fc;
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-dim);
  font-weight: 600;
}
.mission .step b {
  color: var(--accent);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 6px;
}
.ex-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ex-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 44px -20px rgba(20, 30, 55, 0.28);
}
.ex-card .thumb {
  /* Einheitliche Größe für ALLE Kacheln (Seitenverhältnis der Kugelstoß-Videoanalyse, 392×194) */
  aspect-ratio: 392 / 194;
  background: linear-gradient(135deg, #0e1118, #1a2230);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cdd6e2;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  overflow: hidden;
}
.ex-card .thumb.has-img { background: #0e1118; }
.ex-card .thumb .thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Glas-Effekt: unscharf bis zum Mouseover */
  filter: blur(9px) saturate(1.05) brightness(1.03);
  transform: scale(1.08);
  transition: filter 0.4s ease, transform 0.4s ease;
}
.ex-card:hover .thumb-img,
.ex-card:focus-visible .thumb-img {
  filter: none;
  transform: scale(1);
}
/* Glas-Schicht mit Hinweis; verschwindet beim Mouseover */
.ex-card .thumb.has-img::after {
  content: "🔍 Mouseover für Details";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.ex-card:hover .thumb.has-img::after,
.ex-card:focus-visible .thumb.has-img::after { opacity: 0; }
.ex-card .thumb .kind {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: #fff;
  letter-spacing: 0.5px;
}
.ex-card .ex-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.ex-card .ex-course {
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--mono);
}
.ex-card .ex-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.ex-card .ex-intro {
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ex-card .ex-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}
.ex-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mute);
}
.ex-status.done {
  color: var(--good);
}
.ex-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}
.ex-status.done .dot {
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}
.ex-open {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Zeitstempel / Phasen (Video-Übungen) ---------- */
.ts-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: #f4f6fa;
  font-size: 13px;
  color: var(--ink-dim);
}
.ts-bar .ts-now {
  font-family: var(--mono);
  background: #eef1f7;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--ink-dim);
}

/* ===== 3D-Modell-Betrachter ===== */
.viewer3d {
  position: relative;
  width: 100%;
  height: 480px;
  background: radial-gradient(120% 120% at 50% 30%, #161b25 0%, #0e1118 70%);
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.viewer3d:active { cursor: grabbing; }
.viewer3d canvas { display: block; width: 100%; height: 100%; }
.viewer3d-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #aeb8c6;
  font-size: 14px;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}
.viewer3d-loading b { color: #e4e9f1; font-variant-numeric: tabular-nums; }

.model-controls { margin-top: 14px; }
.layer-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: opacity .12s, border-color .12s, background .12s;
}
.layer-toggle:hover { border-color: #c3c9d4; }
.layer-toggle .lt-sw {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  flex: 0 0 auto;
}
.layer-toggle .lt-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  background: #eef1f7;
  border-radius: 5px;
  padding: 1px 6px;
}
.layer-toggle.off {
  opacity: .5;
  background: #f4f6fa;
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,.25);
}
.layer-toggle.off .lt-sw { filter: grayscale(.7); }

.model-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.model-actions .hint { font-size: 12px; color: var(--ink-mute); }

/* ===== Vorschaubild-Pflege (Pflege-Editor) ===== */
.thumb-edit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.thumb-prev {
  width: 168px; height: 100px; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #0e1118, #1a2230);
  display: flex; align-items: center; justify-content: center;
  color: #9aa6b6; font-size: 12px;
}
.thumb-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-edit-ctrls { flex: 1; min-width: 240px; }
.field-hint.save-ok { color: var(--ok, #1aa56a); }
.field-hint.save-err { color: var(--bad, #c93535); }

/* ===== Konto / Auth ===== */
.auth-tabs { display: flex; gap: 6px; margin-top: 18px; border-bottom: 1px solid var(--border); }
.auth-tab {
  padding: 9px 16px; text-decoration: none; color: var(--ink-mute); font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.auth-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.auth-form { margin-top: 18px; max-width: 460px; }
.quickstart-card { margin-top: 18px; max-width: 460px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); box-shadow: var(--shadow); }
.account-more { margin-top: 18px; max-width: 460px; }
.account-more > summary { cursor: pointer; font-size: 13.5px; color: var(--accent); font-weight: 600; }

/* ===== Kurs-/Lektions-Gruppierung (Phase 3) ===== */
.course-block { margin-top: 30px; }
.course-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.course-head h2 { margin: 0; font-size: 20px; }
.course-head h2 a { color: var(--ink); text-decoration: none; }
.course-head h2 a:hover { color: var(--accent); }
.course-module { font-size: 12px; font-weight: 600; color: var(--ink-mute); background: #eef1f7; border-radius: 999px; padding: 3px 10px; }
.lesson-label { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .5px; }
.breadcrumbs { margin: 6px 0 14px; font-size: 13px; color: var(--ink-mute); }
.breadcrumbs a { color: var(--ink-mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 4px; opacity: .6; }
.breadcrumbs b { color: var(--ink-dim); }

/* ===== Abgaben / Auswertung (Phase 4) ===== */
.sub-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.sub-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 14px 16px; }
.sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sub-title { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15px; }
a.sub-title:hover { color: var(--accent); }
.sub-meta { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.sub-card details { margin-top: 10px; }
.sub-card summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; }
.sub-body { margin-top: 10px; }
.sub-label { margin: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .4px; }
.sub-text { background: #f6f8fb; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.sub-markers { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); }
.sub-markers .sub-q { color: var(--ink); font-weight: 600; }
.sub-markers .sub-nudge { color: var(--ink-mute); font-style: italic; }
.save-state { margin-top: 10px; font-size: 13px; color: var(--ink-mute); }
.save-state a { color: var(--accent); font-weight: 600; }

/* ===== KI-Designer (Phase 5) ===== */
.designer { margin-top: 16px; border: 1px dashed var(--border-strong, #c3c9d4); border-radius: 12px; padding: 14px 16px; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.designer-head { font-size: 14px; color: var(--ink-dim); margin-bottom: 10px; }
.designer-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
