/* Bewegungswelt im Look der App (avolya-app, movement/movement_screen.dart und
   movement_video.dart, Screens 7–9 vom 13.10.2026). Gilt fuer alle Programme.
   Die Bausteine stehen in welten-app.css.

   Die alte Seite (Kopf, Hero, Kategorie-Reiter, Videolisten) bleibt im Dokument,
   ist aber ausgeblendet. Der Workout-Generator (automatisch und manuell) oeffnet
   samt Umschalter Zuhause/Studio als eigene Ebene im bisherigen hellen Look. */

body.rw-app .bw-header,
body.rw-app .bw-hero,
body.rw-app .bw-filter-bar,
body.rw-app .bw-main,
body.rw-app .bw-modal { display: none; }
body.rw-app { padding-bottom: 0; }
@media (max-width: 767px) {
  body.rw-app .rw-start { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Workout-Challenge (bald verfuegbar) ───────────────────── */
.bw-chal {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.bw-chal-top { display: flex; align-items: center; gap: 14px; }
.bw-chal-icon {
  flex: none;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--rw-icon-bg);
  border: 3px solid var(--rw-inner-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rw-accent);
}
.bw-chal-title { font-size: 1.12rem; font-weight: 800; margin: 0; }
.bw-chal-sub { font-size: 0.88rem; color: var(--rw-ink-muted); margin: 2px 0 10px; }
.bw-chal-bar { height: 8px; border-radius: 999px; background: var(--rw-track, rgba(255, 255, 255, 0.1)); margin-bottom: 10px; }
.bw-chal-foot { border-top: 1px solid var(--rw-card-border); margin-top: 12px; padding-top: 10px; font-size: 0.82rem; color: var(--rw-ink-muted); }
.rw-soon {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--rw-accent);
  color: var(--rw-accent);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Deine Woche ───────────────────────────────────────────── */
.bw-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bw-wd { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.88rem; }
.bw-wd--today { font-weight: 800; }
.bw-wd-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.2px solid var(--rw-inner-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.94rem;
}
.bw-wd--today .bw-wd-num { border: 2.4px solid var(--rw-accent); }
.bw-wd-mark { height: 18px; display: flex; align-items: center; justify-content: center; }
.bw-wd-done { width: 18px; height: 18px; border-radius: 50%; background: var(--rw-lime); color: var(--rw-on-lime); display: flex; align-items: center; justify-content: center; }
.bw-wd-plan { width: 9px; height: 9px; border-radius: 50%; background: var(--rw-accent); }
.bw-legend { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-size: 0.85rem; color: var(--rw-ink-muted); }

/* ── Highlights ────────────────────────────────────────────── */
.bw-hl {
  position: relative;
  width: 88%;
  max-width: 520px;
  height: 186px;
  border-radius: 20px;
  overflow: hidden;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: var(--rw-tile-dark);
  color: var(--rw-ink);
}
.bw-hl--lime { background: #dcf941; color: var(--rw-on-lime); }
.bw-hl img {
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%);
          mask-image: linear-gradient(to right, transparent, #000 30%);
}
.bw-hl-body {
  position: relative;
  width: 62%;
  height: 100%;
  padding: 14px 12px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.bw-hl-title {
  font-size: 1.31rem;
  font-weight: 900;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bw-hl-sub { font-size: 0.875rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bw-hl-meta { margin-top: auto; font-size: 0.84rem; display: flex; align-items: center; gap: 6px; }
.bw-hl-meta + .bw-hl-meta { margin-top: 3px; }
.bw-hl-go {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--rw-lime);
  color: var(--rw-on-lime);
  font-size: 0.875rem;
  font-weight: 700;
}
.bw-hl--lime .bw-hl-go { background: var(--rw-on-lime); color: #fff; }
.bw-hl-go { white-space: nowrap; }
@media (max-width: 420px) { .bw-hl-go { font-size: 0.8125rem; padding-right: 12px; } }
.bw-hl:focus-visible { outline: 2px solid var(--rw-accent); outline-offset: 2px; }
.bw-hl-dots i { transition: width 0.18s; }
.bw-hl-dots i.on { width: 30px; border-radius: 999px; }

/* ── Umschalter Home/Gym, Kategorie-Chips, Werkzeuge ───────── */
.bw-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bw-seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--rw-inner-border);
  background: transparent;
  color: var(--rw-ink);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
}
.bw-seg button.on { background: var(--rw-lime); border-color: var(--rw-lime); color: var(--rw-on-lime); }
.bw-seg button:focus-visible { outline: 2px solid var(--rw-accent); outline-offset: 2px; }
.bw-chips { gap: 8px; margin-top: 14px; }
.rw-grid .bw-vcard { width: auto; min-width: 0; max-width: none; }
.bw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--rw-inner-border);
  background: var(--rw-card);
  color: var(--rw-ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.bw-chip svg { color: var(--rw-accent); }
.bw-chip.on { background: var(--rw-lime); border-color: var(--rw-lime); color: var(--rw-on-lime); font-weight: 800; }
.bw-chip.on svg { color: var(--rw-on-lime); }
.bw-chip:focus-visible { outline: 2px solid var(--rw-accent); outline-offset: 2px; }
.bw-tools { margin-top: 14px; padding: 6px 10px 12px; }
.bw-tools-row { display: flex; align-items: center; }
.bw-tools-row button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--rw-ink);
  font: inherit;
  font-size: 0.94rem;
  cursor: pointer;
}
.bw-tools-row button.on { color: var(--rw-accent); font-weight: 700; }
.bw-tools-row button:hover { background: var(--rw-hover, rgba(255, 255, 255, 0.05)); }
.bw-tools-row i { width: 1px; height: 26px; background: var(--rw-ink-faint); }
.bw-tools .rw-search { margin-top: 6px; }
.bw-tools .rw-search input { border-radius: 16px; background: var(--rw-field); padding-top: 14px; padding-bottom: 14px; }

/* ── Videokarte ────────────────────────────────────────────── */
.bw-vcard {
  width: calc((100% - 10px) * 0.47);
  min-width: 150px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--rw-card);
  border: 1px solid var(--rw-card-border);
}
.bw-vimg { position: relative; aspect-ratio: 1.15; background: var(--rw-icon-bg); }
.bw-vimg > button.bw-vopen { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
.bw-vimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bw-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--rw-ink-faint); }
.bw-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.bw-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.bw-mark.on { color: var(--rw-lime); }
.bw-mark.on svg { fill: currentColor; }
.bw-vbody { padding: 10px 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.bw-vtitle {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  background: none;
  border: 0;
  padding: 0;
  color: var(--rw-ink);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bw-vmeta { font-size: 0.875rem; color: var(--rw-ink-muted); }
.bw-vkcal { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; }
.bw-vkcal svg { color: var(--rw-accent); }

/* Liste in „Alle Workouts" */
.bw-list { display: flex; flex-direction: column; gap: 10px; }
.bw-litem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--rw-card-border);
  background: var(--rw-card);
  color: var(--rw-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bw-litem .bw-vimg { flex: none; width: 104px; height: 72px; aspect-ratio: auto; border-radius: 12px; overflow: hidden; }
.bw-litem .bw-play { width: 32px; height: 32px; }
.bw-litem strong { display: block; font-size: 0.94rem; }
.bw-litem small { font-size: 0.8rem; color: var(--rw-ink-muted); }

/* „Meine Workouts anzeigen" */
.bw-mine {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--rw-card);
  border: 1px solid var(--rw-card-border);
  color: var(--rw-ink);
  text-decoration: none;
  font-weight: 600;
}
.bw-mine span { flex: 1; }
.bw-mine:hover { border-color: var(--rw-accent); }
.bw-mine svg:first-child { color: var(--rw-accent); }

/* ── Aktivitaet ────────────────────────────────────────────── */
.bw-title { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.4px; margin: 0; }
.bw-title--l { font-size: 1.75rem; }
.bw-sub { font-size: 0.94rem; color: var(--rw-ink-muted); margin: 2px 0 0; }
.bw-act-week { display: flex; align-items: flex-end; gap: 14px; margin-top: 14px; padding: 14px 16px 12px; }
.bw-act-week > div:first-child { flex: 1; min-width: 0; }
.bw-act-week h4 { font-size: 0.94rem; font-weight: 700; margin: 0 0 10px; }
.bw-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; height: 80px; }
.bw-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.bw-bar i { width: 16px; border-radius: 4px; background: var(--rw-track, rgba(255, 255, 255, 0.12)); }
.bw-bar i.on { background: var(--rw-accent); }
.bw-bar small { font-size: 0.69rem; color: var(--rw-ink-soft); }
.bw-total { text-align: right; }
.bw-total strong { display: block; font-size: 1.62rem; font-weight: 900; }
.bw-total small { font-size: 0.85rem; color: var(--rw-ink-muted); }
.bw-est { text-align: center; font-size: 0.78rem; color: var(--rw-ink-soft); margin: 10px 0 0; }

/* ── Generator-Einstieg ────────────────────────────────────── */
.bw-gen-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.bw-gen-btns .rw-outline { padding: 13px 10px; }

/* ── Detailansicht eines Videos ────────────────────────────── */
.bw-detail-img { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--rw-icon-bg); }
.bw-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.bw-detail-img .bw-play { width: 64px; height: 64px; opacity: 0.6; }
.bw-detail-cat { font-size: 0.84rem; color: var(--rw-accent); margin: 10px 0 2px; }
.bw-detail-desc { font-size: 0.94rem; line-height: 1.5; margin: 12px 0 0; }
.bw-detail-note { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 0.9rem; line-height: 1.4; }
.bw-detail-note svg { color: var(--rw-accent); flex: none; }

/* Generator-Ebene: Umschalter und Generator im bisherigen Look */
.rw-full-body .bw-env-toggle { margin-bottom: 16px; }
.rw-full-body > section { margin: 0; }
