/* Behandlungsplan im Look der App (avolya-app therapy/ablauf_screen.dart).
   Farben aus konto.css (--legacy-*, LegacyColors). Die Seite setzt body.plan-active,
   gerendert wird in #bpApp (plan-app.js). Am Handy eine Spalte wie in der App,
   ab 960 px steht die Liste aller Videos neben der Videokarte. */

body.plan-active {
  background: linear-gradient(180deg, var(--legacy-bg-top) 0%, var(--legacy-bg-mid) 45%, var(--legacy-bg-bottom) 100%);
  background-color: var(--legacy-bg-top);
}
body.plan-active .dash-header {
  background: rgba(242, 244, 238, 0.96);
  border-bottom-color: rgba(20, 59, 50, 0.1);
}
@media (max-width: 768px) {
  body.plan-active .dash-bottom-nav { background: var(--legacy-nav); }
}
body.plan-active .legal-mini-footer,
body.plan-active .legal-mini-footer a { color: var(--legacy-ink-muted); }
body.plan-active .legal-mini-footer a:hover,
body.plan-active .legal-mini-footer a:focus-visible { color: var(--legacy-lime); }

.bp {
  color: var(--legacy-ink);
  font-family: inherit;
}
/* :where, damit die Klassen der Knoepfe (Schriftgewicht, Farbe) gewinnen */
:where(.bp) button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.bp button:focus-visible {
  outline: 2px solid var(--legacy-lime);
  outline-offset: 2px;
}
:where(.bp) p,
:where(.bp) h2,
:where(.bp) h3 { margin: 0; }

/* ── Kopf ───────────────────────────────────────────────── */

.bp-kopf { padding: 0 6px; margin-bottom: 18px; }
/* Am Handy 12 px Seitenrand wie in der App (kLegacyPageH) statt 16 px */
@media (max-width: 768px) {
  .bp { margin: 0 -4px; }
}
.bp-titel {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: var(--legacy-ink);
}
.bp-unter {
  margin-top: 6px;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--legacy-ink-muted);
  max-width: 620px;
}

/* ── Raster ─────────────────────────────────────────────── */

.bp-haupt { display: flex; flex-direction: column; gap: 14px; }
.bp-seite { margin-top: 26px; }

@media (min-width: 960px) {
  .bp-raster {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .bp-seite { margin-top: 0; }
  .bp-mehr { display: none !important; }
  .bp-titel { font-size: 34px; }
}
@media (max-width: 959px) {
  .bp-aus { display: none; }
}

/* ── Karten ─────────────────────────────────────────────── */

.bp-card {
  background: var(--legacy-card);
  border: 1px solid var(--legacy-border);
  border-radius: 20px;
}

/* Fortschritt */
.bp-fortschritt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 16px 16px;
}
.bp-fortschritt-text { flex: 1; min-width: 0; }
.bp-fortschritt-h { font-size: 17.5px; font-weight: 800; margin-bottom: 3px; }
.bp-fortschritt-zeile {
  display: flex;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.bp-fortschritt-zeile span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-fortschritt--knopf .bp-fortschritt-zeile { font-size: 13.5px; font-weight: 500; color: var(--legacy-ink-muted); }
.bp-fortschritt--knopf .bp-fortschritt-zeile strong { font-weight: 700; }
.bp-bar {
  height: 10px;
  background: var(--legacy-field);
  border: 1px solid var(--legacy-border-inner);
  border-radius: 999px;
  overflow: hidden;
}
.bp-bar > span {
  display: block;
  height: 100%;
  background: var(--legacy-lime);
  border-radius: 999px;
  transition: width .32s ease-out;
}

/* Lime-Knopf mit Pfeil */
.bp-lime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: var(--legacy-lime);
  color: var(--legacy-on-lime);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.2;
  flex: none;
}
.bp-lime:hover { background: var(--legacy-lime-light); }
.bp-lime svg { flex: none; margin-right: -4px; }
.bp-lime--breit { width: 100%; }
.bp-lime--kompakt {
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 14px;
  text-align: left;
  gap: 4px;
}

/* ── Videokarte ─────────────────────────────────────────── */

.bp-video {
  border-radius: 26px;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.bp-screen {
  position: relative;
  aspect-ratio: 2.6;
  background: #00140c;
}
.bp-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
}
.bp-step {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  background: rgba(0, 26, 16, 0.7);
  border: 1px solid var(--legacy-border-inner);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.bp-disc {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--legacy-lime);
  color: var(--legacy-on-lime);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.bp-disc:hover { background: var(--legacy-lime-light); }
.bp-disc--replay {
  width: 70px;
  height: 70px;
  background: rgba(0, 26, 16, 0.6);
  border: 1.2px solid rgba(255, 255, 255, 0.3);
  color: var(--legacy-ink);
  box-shadow: none;
}
.bp-disc--replay:hover { background: rgba(0, 26, 16, 0.8); }

.bp-controls {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  background: #00140c;
}
.bp-ctl {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  flex: none;
}
.bp-ctl:hover { background: rgba(255, 255, 255, 0.08); }
.bp-zeit {
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bp-ctl-bar {
  flex: 1;
  height: 4px;
  margin: 0 8px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.bp-ctl-bar > span { display: block; height: 100%; background: var(--legacy-lime); }

.bp-hinweis {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--legacy-icon-bg);
  font-size: 14px;
  line-height: 1.4;
}
.bp-hinweis svg { color: var(--legacy-lime); flex: none; }

.bp-video-text { padding: 16px 18px 18px; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.bp-tag {
  padding: 5px 11px;
  background: var(--legacy-icon-bg);
  border: 1px solid var(--legacy-border-inner);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--legacy-ink-muted);
}
.bp-dauer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--legacy-border-inner);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--legacy-ink-muted);
}
.bp-video-titel {
  margin: 10px 0 8px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.bp-video-desc {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--legacy-ink-muted);
  margin-bottom: 16px;
}
.bp-knoepfe { display: flex; gap: 10px; }
.bp-markieren {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border: 1.2px solid var(--legacy-ink-muted);
  border-radius: 999px;
  /* Bei 360–390 px passt die Zeile neben „Weiter" nur etwas kleiner */
  font-size: clamp(13px, 3.65vw, 14.5px);
  font-weight: 700;
  line-height: 1.2;
}
.bp-markieren:hover { background: rgba(255, 255, 255, 0.06); }
.bp-kreis {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1.6px solid var(--legacy-ink);
  border-radius: 50%;
}
.bp-markiert {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--legacy-lime);
}
.bp-markiert-sub {
  margin: 6px 0 16px;
  font-size: 14.5px;
  color: var(--legacy-ink-muted);
}
.bp-aufheben {
  display: block;
  margin: 6px auto 0;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--legacy-ink-muted);
  font-size: 14.5px;
  text-decoration: underline;
}
.bp-aufheben:hover { color: var(--legacy-ink); }

/* Kreise mit Haken / Play */
.bp-check {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--legacy-lime);
  color: var(--legacy-on-lime);
}
.bp-check--gross { width: 26px; height: 26px; }
.bp-kreis--zeile { width: 24px; height: 24px; border-color: var(--legacy-ink-muted); }

/* ── Vorschaubild ───────────────────────────────────────── */

.bp-thumb {
  position: relative;
  display: block;
  width: 84px;
  aspect-ratio: 5 / 3;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: #00140c;
}
.bp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 50%;
  display: block;
}
.bp-thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1.4px solid rgba(255, 255, 255, 0.8);
  color: #fff;
}
.bp-thumb-play svg { width: 60%; height: 60%; }
.bp-thumb-check { position: absolute; right: 5px; bottom: 5px; width: 20px; height: 20px; }
.bp-thumb-dauer {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  background: rgba(0, 20, 12, 0.8);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

/* ── Als Nächstes ───────────────────────────────────────── */

.bp-next {
  display: block;
  width: 100%;
  padding: 12px 10px 14px 14px;
  text-align: left;
}
.bp-next:hover { background: #03251a; }
.bp-next-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--legacy-ink-muted);
}
.bp-next-row { display: flex; align-items: center; gap: 14px; }
.bp-next-row .bp-thumb { width: 128px; }
.bp-next-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bp-next-text strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bp-next-text span { font-size: 13.5px; color: var(--legacy-ink-muted); }

/* ── Liste ──────────────────────────────────────────────── */

.bp-liste-kopf {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 0 6px;
}
.bp-liste-kopf h3 {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.bp-liste-kopf > span { font-size: 14.5px; color: var(--legacy-ink-muted); padding-bottom: 4px; }
.bp-liste-kopf p { grid-column: 1 / -1; margin-top: 2px; font-size: 14.5px; color: var(--legacy-ink-muted); }

.bp-liste { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.bp-zeile {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 8px 10px 14px;
  background: var(--legacy-card);
  border: 1px solid var(--legacy-border);
  border-radius: 20px;
  text-align: left;
}
.bp-zeile:hover { background: #03251a; }
.bp-zeile.is-aktuell { border-color: var(--legacy-lime); box-shadow: inset 0 0 0 0.6px var(--legacy-lime); }
.bp-zeile-nr { width: 22px; flex: none; font-size: 18px; font-weight: 800; }
.bp-zeile .bp-thumb { margin-left: 8px; }
.bp-zeile-text {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bp-zeile-text strong {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bp-zeile-text > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--legacy-ink-muted);
}
.bp-zeile-text > span svg { margin-right: 4px; }
.bp-zeile-text em { font-style: normal; font-weight: 700; color: var(--legacy-lime); }
.bp-zeile-zustand { margin-left: 10px; flex: none; display: grid; }
.bp-zeile-pfeil { margin-left: 4px; flex: none; }

.bp-mehr {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  font-size: 15.5px;
  font-weight: 700;
  text-align: left;
}
.bp-mehr:hover { background: #03251a; }
.bp-mehr span { flex: 1; }

.bp-info {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  padding-left: 6px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--legacy-ink-soft);
}
.bp-info svg { flex: none; margin-top: 1px; }
