/* =====================================================================
   FLIQ Training-Hub · Theme 2 „Ruhig“
   Datei:   assets/fliq-theme-2.css
   Einbau:  als LETZTES Stylesheet in index.html laden.
   Umfang:  nur Darstellung. Kein HTML, kein JS, keine Funktion geändert.

   Prinzip
   - eine neutrale Palette, ein Akzent (FLIQ-Grün) für alle Bereiche
   - Haarlinien statt Schatten, einheitliche Radien (8 / 12 / 14 px)
   - kleines Produktlabel statt großem Logo im Seitenkopf
   - helles und dunkles Farbschema
   ===================================================================== */

/* ---------------------------------------------------------------------
   1) Paletten
   --------------------------------------------------------------------- */
:root:root {
  --mk-on-ink: #FFFFFF;
  --mk-slate: #4F5B6E;
  --mk-dialog: 0 24px 64px rgba(22, 24, 26, .18);
}


:root:root[data-fliq-theme="dark"] {
  --mk-on-ink: #0F1211;
  --mk-slate: #9AA8BC;
  --mk-dialog: 0 24px 64px rgba(0, 0, 0, .55);
}

/* ---------------------------------------------------------------------
   2) Bestehende Tokens auf die neue Palette legen
   (gilt in beiden Farbschemata, weil nur auf --mk-* verwiesen wird)
   --------------------------------------------------------------------- */
:root:root,
:root:root[data-fliq-theme="dark"] {
  /* Flächen */
  --fliq-canvas: var(--mk-canvas);
  --fliq-surface: var(--mk-surface);
  --fliq-surface-raised: var(--mk-surface);
  --fliq-surface-muted: var(--mk-sunk);
  --fliq-status-surface: var(--mk-sunk);
  --app-canvas: var(--mk-canvas);
  --canvas: var(--mk-canvas);
  --gradient-canvas: var(--mk-canvas);
  --surface: var(--mk-surface);
  --surface-muted: var(--mk-sunk);
  --success-soft: var(--mk-sunk);
  --warning-soft: var(--mk-sunk);
  --danger-soft: var(--mk-sunk);

  /* Text */
  --fliq-text-primary: var(--mk-ink);
  --fliq-text-secondary: var(--mk-ink-2);
  --fliq-text-tertiary: var(--mk-ink-3);
  --ink: var(--mk-ink);
  --steel: var(--mk-ink-2);

  /* Linien */
  --fliq-border-subtle: var(--mk-line);
  --fliq-border-control: var(--mk-control);
  --line: var(--mk-line);

  /* Aktionen & Fokus */
  --fliq-primary-action-bg: var(--mk-ink);
  --fliq-primary-action-fg: var(--mk-on-ink);
  --blue-action: var(--mk-ink);
  --fliq-focus: var(--mk-ink);
  --focus: var(--mk-ink);
  --fliq-focus-ring: 0 0 0 3px color-mix(in srgb, var(--mk-accent) 22%, transparent);

  /* Ein Akzent statt Grün / Lila / Rot */
  --fliq-brand-accent: var(--mk-accent);
  --fliq-product-accent: var(--mk-accent);
  --fliq-product-text-on-light: var(--mk-accent);
  --fliq-product-vivid: var(--mk-accent);
  --fliq-product-tint: var(--mk-accent-soft);
  --fliq-product-tint-light: var(--mk-accent-soft);
  --fliq-product-tint-dark: var(--mk-accent-soft);
  --blue: var(--mk-accent);
  --blue-soft: var(--mk-accent-soft);
  --success: var(--mk-accent);
  --fliq-status-success-fg: var(--mk-accent);

  /* Keine Verläufe */
  --fliq-gradient-brand: var(--mk-accent);
  
  --fliq-product-gradient: var(--mk-accent);
  --fliq-gradient-ink: var(--mk-ink);
  --gradient-navy: var(--mk-ink);
  --fliq-gradient-pearl: var(--mk-surface);

  /* Tiefe: Haarlinien statt Schatten */
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: var(--mk-dialog);
  
  --fliq-shadow-sm: none;
  --fliq-shadow-md: var(--mk-pop);
  --fliq-shadow-lg: var(--mk-dialog);
  --fliq-ui-depth: none;
  --fliq-ui-float: none;

  /* Radien */
  --fliq-radius-control: 8px;
  --fliq-radius-card: 12px;
  --fliq-radius-panel: 14px;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 14px;
  --fliq-control-radius: 8px;

  /* CI 8 / 8.1 */
  
  --fliq-action-bg: var(--mk-ink);
  --fliq-action-fg: var(--mk-on-ink);
  --fliq-ui-canvas: var(--mk-canvas);
  --fliq-ui-signal: var(--mk-ink);
  --fliq-ui-on-signal: var(--mk-on-ink);
  --fliq-ui-signal-soft: var(--mk-sunk);
  --fliq-ui-pressed: var(--mk-ink);
  --fliq-ui-on-pressed: var(--mk-on-ink);
  --fliq-ui-edge: var(--mk-control);
  --fliq-ui-action: var(--mk-ink);
  --fliq-ui-on-action: var(--mk-on-ink);
  --fliq-ui-logo-stage: transparent;
  --fliq8-canvas: var(--mk-canvas);
  --fliq8-surface: var(--mk-surface);
  --fliq8-raised: var(--mk-surface);
  --fliq8-muted: var(--mk-sunk);
  --fliq8-text: var(--mk-ink);
  --fliq8-secondary: var(--mk-ink-2);
  --fliq8-control: var(--mk-control);
  --fliq8-divider: var(--mk-line);
  --fliq8-brand: var(--mk-accent);
  
  
  --fliq8-action: var(--mk-ink);
  
  --fliq8-hover: var(--mk-sunk);
  
  --fliq8-pressed: var(--mk-line);
  
  --fliq8-focus: var(--mk-ink);
  --fliq8-selected: var(--mk-sunk);
  --fliq8-readonly: var(--mk-sunk);
  --fliq8-gradient-ink: var(--mk-ink);
  --fliq8-gradient-pearl: var(--mk-surface);
  
  
  --fliq8-shadow-card: none;
  
  --fliq8-shadow-floating: var(--mk-pop);
  
  
  
  --fliq81-hub-accent: var(--mk-accent);
  --fliq81-hub-tint: var(--mk-accent-soft);
  --fliq81-plan-accent: var(--mk-accent);
  --fliq81-plan-tint: var(--mk-accent-soft);
  --fliq81-on-plan: var(--mk-on-ink);
  --fliq81-soft-border: var(--mk-line);
  --library-author-color: var(--mk-ink-2);
  --session-timer-accent: var(--mk-accent);

  /* Schlanke Bedienelemente, auf Touch-Geräten weiter 44 px */
  --fliq-control-height: 40px;
}

@media (pointer: coarse) {
  :root:root { --fliq-control-height: 44px; }
}

/* Bereichs-Akzente (PlanIQ, RaceIQ, Analysen) vereinheitlichen.
   Die #_-Angabe hebt nur die Spezifität an, sie trifft kein Element. */
html:root:not(#_) :is(.view, dialog, [data-fliq-product], #_) {
  --blue: var(--mk-accent);
  --blue-soft: var(--mk-accent-soft);
  --planiq: var(--mk-accent);
  --analysis-accent: var(--mk-accent);
  --analysis-accent-soft: var(--mk-accent-soft);
  --analysis-accent-line: var(--mk-line-strong);
  --fliq81-plan-accent: var(--mk-accent);
  --fliq-product-accent: var(--mk-accent);
  --fliq-product-tint: var(--mk-accent-soft);
  --fliq-product-text-on-light: var(--mk-accent);
  --fliq-product-vivid: var(--mk-accent);
  --fliq-product-gradient: var(--mk-accent);
}

/* Session Builder: Hauptteil in ruhigem Schiefer, damit sich die
   Phasen weiter unterscheiden (Warm-up Grün, Hauptteil Schiefer, Cool-down Grau) */
html:root:not(#_) :is(#onlinePlanDialog, #sessionDialog) {
  --fliq81-plan-accent: var(--mk-slate);
  --fliq81-plan-tint: color-mix(in srgb, var(--mk-slate) 10%, var(--mk-surface));
}

/* Kalender-Seitenleiste: Aktionen in Tinte statt Akzent */
html:root:not(#_) #calendarSidebar {
  --fliq81-plan-accent: var(--mk-ink);
}

/* ---------------------------------------------------------------------
   3) Grundlage
   --------------------------------------------------------------------- */
html:root:not(#_),
html:root:not(#_) body {
  background-color: var(--mk-canvas);
  color: var(--mk-ink);
}

html:root body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html:root:not(#_) :is(h1, h2, h3, h4) {
  letter-spacing: -0.01em;
  text-wrap: balance;
}

html:root:not(#_) :is(input[type="checkbox"], input[type="radio"], progress) {
  accent-color: var(--mk-ink);
}

html:root ::selection {
  background: color-mix(in srgb, var(--mk-accent) 22%, transparent);
}

/* ---------------------------------------------------------------------
   4) Kopfleiste
   --------------------------------------------------------------------- */


html:root:not(#_) .topbar-actions {
  gap: 6px;
}



html:root:not(#_) .topbar-actions .button.quiet:hover,
html:root:not(#_) .topbar-actions .theme-toggle:hover {
  background: var(--mk-sunk);
  color: var(--mk-ink);
}

/* ---------------------------------------------------------------------
   5) Hauptnavigation
   --------------------------------------------------------------------- */



html:root:not(#_) .primary-nav > a:hover {
  background: var(--mk-sunk);
  color: var(--mk-ink);
}


/* ---------------------------------------------------------------------
   6) Seitenkopf: kleines Produktlabel, klare Überschrift
   --------------------------------------------------------------------- */
html:root:not(#_) #mainContent .page-heading {
  border-bottom: 0;
}


html:root:not(#_) #mainContent .page-heading > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

html:root:not(#_) #mainContent .page-heading .page-actions {
  width: auto;
}

/* Produktname als ruhiges Textlabel statt zweitem Logo */
html:root:not(#_) #mainContent :is(.planiq-page-brand, .hub-page-brand, .raceiq-page-brand) {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

html:root:not(#_) #mainContent :is(.planiq-page-brand, .hub-page-brand, .raceiq-page-brand) img {
  display: none;
}

html:root:not(#_) #mainContent :is(.planiq-page-brand, .hub-page-brand, .raceiq-page-brand)::before {
  content: attr(aria-label);
  display: block;
  color: var(--mk-ink-3);
  font-size: 12.5px;
  line-height: 16px;
  font-weight: 600;
}

html:root:not(#_) #mainContent .page-heading h1,
html:root:not(#_) #mainContent .prep-athlete-page>.prep-title h1 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  padding-left: 0;
  border-left: 0;
}


html:root:not(#_) #mainContent .page-heading > div > p:not(.eyebrow) {
  max-width: 62ch;
  margin-top: 6px;
}

/* Abschnittsüberschriften */
html:root:not(#_) :is(.card-heading h2, .coach-section-heading h2, .analysis-section-heading h2, .event-overview-section > h2, section > h2) {
  font-size: 17px;
  font-weight: 650;
}

/* ---------------------------------------------------------------------
   7) Flächen und Karten
   --------------------------------------------------------------------- */
html:root:not(#_) :is(
  .card, .metric-card, .dashboard-card, .plan-card, .calendar-controls, .hero-card,
  .athlete-home-hero, .role-dashboard-metric, .role-dashboard-card,
  .coach-athlete-card, .dashboard-athlete-context,
  .analysis-toolbar, .analysis-context-panel, .analysis-surface,
  .coach-analysis-context, .coach-analysis-surface, .coach-analysis-method,
  .workspace-chart-panel, .workspace-balance, .analysis-overview-card, .analysis-overview-group,
  .analysis-trend-card, .analysis-stat-card, .analysis-type-stat, .analysis-type-stats > article,
  .analysis-chart-card, .analysis-zone-panel, .analysis-metric-detail, .analysis-metric-chart,
  .analysis-history, .analysis-empty-state, .analysis-endurance-card, .analysis-endurance-dashboard,
  .coach-quality-grid article, .coach-area-card, .coach-run-card, .coach-phase-card,
  .coach-comparison-list > article, .file-card, .athlete-card,
  .calendar-kpis article, .event-overview-toolbar, .event-overview-kpis article, .event-overview-card,
  .bmx-track-card, .session-template-card, .daily-check-in-card, .endurance-builder, .endurance-panel,
  .analysis-card, .raceiq-event-card, .training-group-card, .document-card, .profile-identity-card,
  .session-library-filters, .session-videos, .privacy-profile, .privacy-review, .privacy-invitation,
  #_
) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  box-shadow: none;
}

/* Coachcenter: Kopf und Filter offen, Kennzahlen als eine Leiste */
html:root:not(#_) :is(.coach-center-hero, .coach-center-filter, #_) {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

html:root:not(#_) :is(.coach-center-account, #_),
html:root:not(#_) :is(.coach-center-account, #_) * {
  color: var(--mk-ink-2);
  font-size: 13px;
  font-weight: 500;
}

html:root:not(#_) :is(.coach-center-hero-stats, #_) {
  gap: 0;
  background: var(--mk-surface);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  overflow: hidden;
}

html:root:not(#_) :is(.coach-center-hero-stats, #_) > * {
  background: transparent;
  border: 0;
  border-radius: 0;
}

html:root:not(#_) :is(.coach-center-hero-stats, #_) > * + * {
  border-left: 1px solid var(--mk-line);
}

/* Innere Kacheln: kleinerer Radius, ruhige Fläche */
html:root:not(#_) :is(
  .coach-week-day, .daily-training-state-value, .coach-athlete-status > div,
  .coach-athlete-compact-task, .analysis-source-option, .coach-analysis-sources label,
  .analysis-method-note, .coach-analysis-note, .workspace-metric, .workspace-kpi,
  .coach-session-facts > div, .coach-session-metrics > div, .coach-session-context,
  .coach-run-value, .coach-cohort-result, .coach-area-metric, .coach-phase-area, .coach-phase-change,
  .profile-push-state, .profile-push-meta, .profile-push-consent,
  .dialog-section, .documentation-section, .documentation-block, .documentation-item,
  .year-month, .training-card, .analysis-trend-inline, .calendar-training-legend,
  .sensitive-document-notice, .profile-photo-optimization-hint, .document-retention,
  #_
) {
  border-radius: 8px;
  box-shadow: none;
}

html:root:not(#_) :is(.coach-week-day, .daily-training-state-value, .coach-athlete-status > div, #_) {
  background: var(--mk-sunk);
  border-color: transparent;
}

html:root:not(#_) :is(.coach-athlete-body, #_) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-line);
  border-radius: 10px;
}

html:root:not(#_) :is(.coach-week-day.today, #_) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-ink);
  outline: 0;
  box-shadow: none;
}

/* Hinweisboxen neutral statt farbig */
html:root:not(#_) :is(.analysis-method-note, .coach-analysis-note, .profile-photo-optimization-hint, .sensitive-document-notice, #_) {
  background: var(--mk-sunk);
  border: 0;
  color: var(--mk-ink-2);
}

html:root:not(#_) :is(.analysis-status-region:not(:empty), #_) {
  background: var(--mk-sunk);
  border: 0;
  border-radius: 8px;
  color: var(--mk-ink-2);
}

/* Trennlinien */
html:root:not(#_) hr {
  border: 0;
  border-top: 1px solid var(--mk-line);
}

/* ---------------------------------------------------------------------
   8) Kennzahlen
   --------------------------------------------------------------------- */
html:root:not(#_) :is(.role-dashboard-metric, .coach-center-hero-stats > *, .calendar-kpis article, .event-overview-kpis article, .workspace-kpi, #_) :is(strong, b, output, .value) {
  color: var(--mk-ink);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  border: 0;
}

html:root:not(#_) :is(.role-dashboard-metric, .coach-center-hero-stats > *, .calendar-kpis article, .event-overview-kpis article, #_) :is(span, small, p) {
  color: var(--mk-ink-2);
  font-size: 12.5px;
  font-weight: 500;
}

html:root:not(#_) :is(td, th, output, .session-time, .session-duration, time) {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
   9) Labels, Eyebrows, Status
   --------------------------------------------------------------------- */
html:root:not(#_) :is(.eyebrow, #_) {
  color: var(--mk-ink-3);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html:root:not(#_) :is(.supporting, .meta, .small, small) {
  color: var(--mk-ink-2);
}

html:root:not(#_) :is(label > span, .field > span, legend) {
  color: var(--mk-ink-2);
  font-weight: 500;
}

html:root:not(#_) :is(.status-pill, .event-state, .coach-area-state, .session-card-indicators > span, #_) {
  background: var(--mk-sunk);
  color: var(--mk-ink-2);
  border: 1px solid var(--mk-line);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

/* Status mit Bedeutung behält nur einen Punkt in der Statusfarbe */
html:root:not(#_) :is(.status-pill.available, .status-pill.connected, .status-pill.success, #_)::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--mk-accent);
  vertical-align: 1px;
}

html:root:not(#_) :is(.coach-athlete-avatar, .athlete-document-glyph, #_) {
  background: var(--mk-sunk);
  color: var(--mk-ink-2);
  border: 1px solid var(--mk-line);
}

/* Links in Karten */
html:root:not(#_) :is(.raceiq-event-open, .athlete-document-link, #_) {
  color: var(--mk-ink);
  text-decoration: underline;
  text-decoration-color: var(--mk-line-strong);
  text-underline-offset: 3px;
}

html:root:not(#_) :is(.raceiq-event-open, .athlete-document-link, #_):hover {
  text-decoration-color: currentColor;
}

/* ---------------------------------------------------------------------
   10) Buttons
   --------------------------------------------------------------------- */
html:root:not(#_) :is(.button, button.secondary, button.primary, button.ghost, .primary-button, #_) {
  border-radius: 8px;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0;
  transition: background-color .12s, border-color .12s, color .12s;
}

html:root:not(#_) :is(.button.secondary, button.secondary, #_) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-control);
}

html:root:not(#_) :is(.button.secondary, button.secondary, #_):hover {
  background: var(--mk-sunk);
  border-color: var(--mk-ink-3);
}

html:root:not(#_) :is(.button.primary, button.primary, .primary-button, .calendar-create-button, #newOnlineCalendarItemButton, #_) {
  background: var(--mk-ink);
  border: 1px solid var(--mk-ink);
}

html:root:not(#_) :is(.button.primary, button.primary, .primary-button, .calendar-create-button, #newOnlineCalendarItemButton, #_):hover {
  background: color-mix(in srgb, var(--mk-ink) 86%, var(--mk-surface));
  border-color: transparent;
}

html:root:not(#_) :is(.button, button):disabled {
  opacity: .45;
  cursor: not-allowed;
}

html:root:not(#_) :is(.button.quiet, button.quiet, button.ghost, #_) {
  border-color: transparent;
}

html:root:not(#_) :is(.button.quiet, button.quiet, button.ghost, #_):hover {
  background: var(--mk-sunk);
  color: var(--mk-ink);
}

html:root:not(#_) :is(.button.danger, button.danger, #_) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-line-strong);
}

html:root:not(#_) :is(.button.danger, button.danger, #_):hover {
  background: color-mix(in srgb, var(--mk-danger) 8%, var(--mk-surface));
  border-color: color-mix(in srgb, var(--mk-danger) 40%, transparent);
}

html:root:not(#_) :is(.icon-button, .calendar-add, .calendar-range-menu, .session-menu-button, .coach-athlete-icon-button, #_) {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--mk-ink-2);
  box-shadow: none;
}

html:root:not(#_) :is(.icon-button, .calendar-add, .calendar-range-menu, .session-menu-button, .coach-athlete-icon-button, #_):hover {
  background: var(--mk-sunk);
  color: var(--mk-ink);
}

html:root:not(#_) :is(.calendar-arrow, .dialog-heading > .icon-button, #_) {
  border-color: var(--mk-control);
}

/* Segment-Umschalter (Woche / Monat / Jahr u. ä.) */
html:root:not(#_) :is(.segmented-control, .analysis-mode-control, .session-workspace-tabs, #_) {
  gap: 2px;
  box-shadow: none;
}



/* ---------------------------------------------------------------------
   11) Eingabefelder
   --------------------------------------------------------------------- */

html:root:not(#_) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea):hover {
  border-color: var(--mk-ink-3);
}

html:root:not(#_) :is(input, select, textarea):focus-visible {
  outline: none;
  border-color: var(--mk-accent);
  box-shadow: var(--fliq-focus-ring);
}

html:root :is(input, textarea)::placeholder {
  color: var(--mk-ink-3);
}

html:root:not(#_) :is(input, select, textarea):disabled,
html:root:not(#_) :is(input, textarea)[readonly] {
  border-style: solid;
}

/* ---------------------------------------------------------------------
   12) Kalender
   --------------------------------------------------------------------- */
html:root:not(#_) :is(.calendar-sidebar, #calendarSidebar, #_) {
  background: var(--mk-canvas);
  border-right: 1px solid var(--mk-line);
  box-shadow: none;
}

html:root:not(#_) :is(.sidebar-active-calendar, #_) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
}

html:root:not(#_) :is(.calendar-toolbar, .toolbar, #_) {
  border-radius: 12px;
  box-shadow: none;
}

html:root:not(#_) :is(.calendar-week, .plan-calendar, #_) {
  border-color: var(--mk-line);
  border-radius: 12px;
  box-shadow: none;
}

html:root:not(#_) :is(.calendar-day, #_) {
  border-color: var(--mk-line);
}

html:root:not(#_) :is(.calendar-day-heading, #_) {
  color: var(--mk-ink-2);
  font-weight: 600;
}

html:root:not(#_) :is(.calendar-day.today, #_) {
  background: color-mix(in srgb, var(--mk-accent-soft) 40%, var(--mk-surface));
  outline: 0;
  box-shadow: inset 0 2px 0 var(--mk-accent);
}

html:root:not(#_) :is(.calendar-day.today .calendar-day-heading, #_) {
  color: var(--mk-accent);
}

html:root:not(#_) :is(.calendar-day-empty, #_) {
  color: var(--mk-ink-3);
}

html:root:not(#_) :is(.session-card, #_) {
  border-radius: 8px;
  box-shadow: none;
}

html:root:not(#_) :is(.library-tree-folder, .library-tree-open, #_) {
  border-radius: 8px;
  color: var(--mk-ink);
}

html:root:not(#_) :is(.library-tree-folder, .library-tree-open, #_):hover {
  background: var(--mk-sunk);
}

html:root:not(#_) :is(.library-tree-add > summary, .library-tree-add > button, #_) {
  background: var(--mk-ink);
  border: 1px solid var(--mk-ink);
  border-radius: 8px;
  color: var(--mk-on-ink);
}

html:root:not(#_) :is(.library-tree-count, #_) {
  color: var(--mk-ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
   13) Dialoge, Menüs, Popover
   --------------------------------------------------------------------- */
html:root:not(#_) :is(
  dialog, .modal-panel, .calendar-operation-dialog, .plan-copy-dialog, .privacy-dialog,
  .session-documentation-dialog, .session-timer-dialog, .coach-area-dialog, .exercise-guide-dialog,
  .execution-dialog, .unit-detail-dialog,
  .athlete-profile-dialog, .video-analysis-dialog
) {
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  box-shadow: var(--mk-dialog);
}

html:root dialog::backdrop {
  
  backdrop-filter: none;
}

html:root:not(#_) :is(.calendar-context-menu, .online-block-type-menu, .pl-library-menu, .freshness-popover, .planning-target-picker__choices, #_) {
  background: var(--mk-surface);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  box-shadow: var(--mk-pop);
}

html:root:not(#_) :is(.calendar-operation-dialog fieldset, .plan-copy-grid fieldset, #_) {
  border: 1px solid var(--mk-line);
  border-radius: 12px;
}

/* ---------------------------------------------------------------------
   14) Profil
   --------------------------------------------------------------------- */
html:root:not(#_) :is(.profile-section-links a, .profile-section-links button, #_) {
  border: 0;
  border-radius: 8px;
  color: var(--mk-ink-2);
  font-weight: 500;
}

html:root:not(#_) :is(.profile-section-links a:hover, .profile-section-links button:hover, #_) {
  background: var(--mk-sunk);
  color: var(--mk-ink);
}

html:root:not(#_) :is(.profile-section-links [aria-current="true"], .profile-section-links [aria-current="location"], .profile-section-links .active, .profile-section-links .is-active, #_) {
  background: var(--mk-surface);
  color: var(--mk-ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--mk-line);
}

html:root:not(#_) :is(.profile-detail-section, #_) + :is(.profile-detail-section, #_) {
  border-top: 1px solid var(--mk-line);
}

html:root:not(#_) :is(.profile-photo, .athlete-card-photo, #_) {
  border-radius: 10px;
  background: var(--mk-sunk);
  border: 1px solid var(--mk-line);
}

html:root:not(#_) :is(.profile-save-bar, #_) {
  background: color-mix(in srgb, var(--mk-surface) 92%, transparent);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  box-shadow: var(--mk-pop);
}

/* ---------------------------------------------------------------------
   15) Anmeldung
   --------------------------------------------------------------------- */
html:root:not(#_) :is(.auth-screen, #_) {
  background: var(--mk-canvas);
}

html:root:not(#_) :is(.auth-card, #_) {
  background: var(--mk-surface);
  border-left: 1px solid var(--mk-line);
}

html:root:not(#_) :is(.auth-card form, #_) {
  border: 1px solid var(--mk-line);
  border-radius: 14px;
  box-shadow: none;
}

html:root:not(#_) :is(.auth-card form a.button, #_) {
  background: transparent;
  border-color: transparent;
  color: var(--mk-ink-2);
  font-weight: 500;
}

html:root:not(#_) :is(.auth-brand p, #_) {
  color: var(--mk-ink-3);
}

/* ---------------------------------------------------------------------
   16) Fußzeile
   --------------------------------------------------------------------- */
html:root:not(#_) .hub-legal-footer {
  border-top: 1px solid var(--mk-line);
  background: transparent;
  color: var(--mk-ink-3);
  font-size: 12px;
}

html:root:not(#_) .hub-legal-footer :is(a, button) {
  color: var(--mk-ink-3);
  text-decoration: none;
}

html:root:not(#_) .hub-legal-footer :is(a, button):hover {
  color: var(--mk-ink);
  text-decoration: underline;
}

/* ---------------------------------------------------------------------
   17) Bewegung reduzieren
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html:root:not(#_) * { transition: none !important; }
}

/* ---------- Kopfleiste in App-Farbe (22.10.2026) ----------
   Braucht das Attribut html[data-fliq-active-product] = planiq | raceiq | training-hub.
   Codex setzt es beim Ansichtswechsel (siehe ANLEITUNG-CODEX.md, Phase 2b).
   Ohne Attribut bleibt die Kopfleiste wie bisher. */
html:root{--mk-app-planiq:#6C4CBC;--mk-app-raceiq:#B4342C;--mk-app-hub:#187860}
html:root[data-theme="dark"],html:root[data-fliq-theme="dark"]:not(#_){--mk-app-planiq:#4E3794;--mk-app-raceiq:#8C2A24;--mk-app-hub:#135E4B}
html:root[data-fliq-active-product="planiq"]{--mk-app:var(--mk-app-planiq)}
html:root[data-fliq-active-product="raceiq"]:not(#_){--mk-app:var(--mk-app-raceiq)}
html:root[data-fliq-active-product="training-hub"]:not(#_){--mk-app:var(--mk-app-hub)}
html:root[data-fliq-active-product]:not(#_) header.topbar .topbar-actions :is(select,button,.theme-toggle):hover{background:rgba(255,255,255,.2)}
html:root[data-fliq-active-product]:not(#_) header.topbar :focus-visible{outline-color:#fff}
html:root[data-fliq-active-product]:not(#_) header.topbar select option{color:var(--mk-ink);background:var(--mk-surface)}

/* =====================================================================
   FLIQ Training-Hub · Layout 2 (Redesign Stufe 1)
   Wird nach fliq-theme-2.css geladen. Nur Darstellung; Farben ausschließlich
   über die --mk-*-Tokens aus fliq-theme-2.css. Das Präfix html:root:not(#_)
   hebt die Spezifität über die CI-8.1-Regeln und trifft kein Element.
   ===================================================================== */

@media screen {
  /* ---------- 1.2 Kopfleiste: App-Umschalter | Navigation | Nutzermenü ---------- */
  html:root:not(#_) #appShell:not([hidden]) { display: block; }
  html:root:not(#_) #appShell > .topbar {
    position: sticky; top: 0; z-index: 40;
      gap: 12px;
    padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
     
    
  }
  html:root:not(#_) body:has(> #appShell:not([hidden])) > .hub-legal-footer { display: none; }

  html:root:not(#_) .topbar :is(.app-switcher, .user-menu) { position: relative; display: flex; align-items: center; flex: none; }
  
  html:root:not(#_) .topbar .user-menu { margin-left: auto; }

  html:root:not(#_) .topbar :is(.app-switcher-button, .user-menu-button) {
    display: flex; align-items: center; height: 40px; min-height: 40px;
    border: 0; border-radius: 9px;
    font: inherit; cursor: pointer;
  }
  html:root:not(#_) .topbar :is(.app-switcher-button, .user-menu-button):is(:hover, [aria-expanded="true"]) { background: var(--mk-sunk); }
  
  html:root:not(#_) .topbar .app-switcher-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
  html:root:not(#_) .topbar .app-switcher-name small { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--mk-ink-3); }
  html:root:not(#_) .topbar .app-switcher-name strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
  

  html:root:not(#_) .topbar .user-menu-button { padding: 0 6px 0 10px; gap: 8px; font-weight: 500; }
  html:root:not(#_) .topbar .user-menu-avatar {
    display: grid; place-items: center;   border-radius: 50%;
    background: var(--mk-sunk);  color: var(--mk-ink-2);
    font-size: 11.5px; font-weight: 700; flex: none;
  }

  /* Popover-Menüs der Kopfleiste */
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu {
    position: absolute; top: 48px; z-index: 60;
    display: grid; gap: 2px; 
  }
  html:root:not(#_) .topbar .user-menu-panel { left: auto; right: 0; min-width: 240px; }
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu h2 { margin: 6px 10px 4px; font-size: 11.5px; font-weight: 600; line-height: 1.4; color: var(--mk-ink-3); }
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu hr { width: auto; margin: 6px 4px; border: 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu :is(a, button, .user-menu-row) {
    display: flex; align-items: center; justify-content: flex-start; gap: 12px;
    width: 100%; margin: 0;
    box-shadow: none;
    font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
  }
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu :is(a, button):is(:hover, :focus-visible) { background: var(--mk-sunk); }
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu .user-menu-row { justify-content: space-between; cursor: default; }
  html:root:not(#_) .topbar .user-menu-legal { display: grid; gap: 2px; }
  html:root:not(#_) .topbar .user-menu-legal :is(a, button)[hidden] { display: none; }

  /* App-Liste im Umschalter */
  
  
  
  
  
  

  /* Navigation in der Kopfleiste */
  html:root:not(#_) #appShell #primaryNav {
    position: static; inset: auto; z-index: auto;
    gap: 2px;
    flex: 1 1 auto; min-height: 0;
    margin: 0; padding: 0; 
    background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none;
  }
  html:root:not(#_) #appShell #primaryNav a {
    position: relative; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px;
    width: auto; min-width: 0; margin: 0; padding: 0 12px;
    border: 0; border-radius: 0; 
    font-size: 13.5px; font-weight: 500; line-height: 1; text-decoration: none;
  }
  html:root:not(#_) #appShell #primaryNav a::before { width: 16px; height: 16px; flex: 0 0 16px; opacity: .8; }
  html:root:not(#_) #appShell #primaryNav a:hover { color: var(--mk-ink); background: transparent; }
  html:root:not(#_) #appShell #primaryNav a:is(.active, [aria-current="page"]) { font-weight: 600; }
  html:root:not(#_) #appShell #primaryNav a:is(.active, [aria-current="page"])::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; border-radius: 2px 2px 0 0; 
  }
  html:root:not(#_) #appShell #primaryNav a:focus-visible { outline-offset: -4px; }
  html:root:not(#_) #appShell #primaryNav a[data-other-app],
  html:root:not(#_) #appShell #primaryNav a[hidden] { display: none !important; }

  /* Inhalt über die volle Breite, Kalenderspalte beginnt am linken Rand */
  html:root:not(#_) #appShell > #mainContent { grid-column: auto; grid-row: auto; }
  /* #mainContent wird beim Ansichtswechsel nur als Sprungziel fokussiert; kein Rahmen um die ganze Seite. */
  html:root #mainContent:focus {   }
  /* Statusmeldungen kleben direkt unter der neuen, 56 px hohen Kopfleiste (vorher 140 px für Kopf + Navigation). */

  /* Übersicht aller Apps (#apps) */
  
  
  
  
  
  

  /* ---------- 1.3 Kopfleiste in der Farbe der aktiven App ----------
     Fläche und App-Farben kommen aus fliq-theme-2.css (html[data-fliq-active-product]).
     Text und Icons in der Kopfleiste weiß; Popover-Menüs bleiben hell bzw. dunkel. */
  
  /* 88 % statt der vorgeschlagenen 72/78 %: erst damit erreicht Text auf allen drei App-Farben WCAG AA (≥ 4,5:1). */
  html:root[data-fliq-active-product]:not(#_) .topbar .app-switcher-name small { color: rgba(255, 255, 255, .88); }
  
  html:root[data-fliq-active-product]:not(#_) header.topbar :is(#appSwitcherButton, #userMenuButton) { border: 0; }
  html:root[data-fliq-active-product]:not(#_) header.topbar :is(#appSwitcherButton, #userMenuButton):is(:hover, [aria-expanded="true"]) { background: rgba(255, 255, 255, .14); }
  html:root[data-fliq-active-product]:not(#_) .topbar .user-menu-avatar { background: rgba(255, 255, 255, .16); color: #fff; }
  /* FLIQ-Zeichen: das geschützte App-Icon auf weißer Fläche */
  

  html:root[data-fliq-active-product] #appShell #primaryNav a:hover {  }
  html:root[data-fliq-active-product]:not(#_) #appShell #primaryNav a:hover::after { content: ""; display: block; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: rgba(255, 255, 255, .45); }
  html:root[data-fliq-active-product]:not(#_) #appShell #primaryNav a:is(.active, [aria-current="page"])::after { background: #fff; height: 3px; }
  html:root[data-fliq-active-product]:not(#_) header.topbar :focus-visible { outline-color: #fff; }

  /* Menüs aus der Kopfleiste erben kein Weiß */
  html:root[data-fliq-active-product]:not(#_) header.topbar .topbar-menu :focus-visible { outline-color: var(--mk-ink); }
  html:root[data-fliq-active-product]:not(#_) header.topbar :is(#userMenu, #appSwitcherMenu) :is(a, button, .theme-toggle, .user-menu-row) { background: transparent; border: 0; }
  html:root[data-fliq-active-product]:not(#_) header.topbar :is(#userMenu, #appSwitcherMenu) :is(a, button, .theme-toggle):is(:hover, :focus-visible) { background: var(--mk-sunk); }
  html:root[data-fliq-active-product]:not(#_) header.topbar #userMenu select:hover { background-color: var(--mk-surface); }

  /* ---------- 1.4 Seitenkopf: Titel links, Aktionen rechts, ein Hauptknopf an fester Stelle ---------- */
  html:root:not(#_) #appShell > #mainContent { padding-top: 20px; padding-right: 24px; }
  /* Der Kalender setzt eigene Innenabstände mit sehr hoher Spezifität; der Hauptknopf muss dennoch bei y = 76 px stehen. */
  html:root:not(#_) #appShell:has(#calendarView:not([hidden])) > #mainContent { padding-top: 20px !important; }
  html:root:not(#_) #mainContent .view > .page-heading {
    display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 16px;
    margin: 0 0 20px; padding: 0; min-height: 36px;
  }
  html:root:not(#_) #mainContent .view > .page-heading > div:first-child { min-width: 0; flex: 1 1 auto; }
  html:root:not(#_) #mainContent .view > .page-heading h1,
  html:root:not(#_) #mainContent .prep-athlete-page>.prep-title h1 { margin: 0; line-height: 36px; letter-spacing: -.01em; }
  html:root:not(#_) #mainContent .view > .page-heading .page-actions {
    display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 8px;
    flex: none; margin: 0 0 0 auto; padding: 0;
  }
  html:root:not(#_) #mainContent :is(.page-heading,:where(.prep-library-view) .prep-filter-bar) .page-primary {
    order: 99; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 176px; margin: 0;
    white-space: nowrap;
  }
  html:root:not(#_) :is(.page-primary, [data-exercise-param-add], [data-exercise-gym-add], [data-feedback-add]) .button-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* ---------- 1.5 Calendar flacher ---------- */
  /* Kopfzeile: Titel, aktive Kalenderauswahl, ⋯-Menü, Session planen */
  html:root:not(#_) #mainContent #calendarView .page-heading > .calendar-heading-title { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px 16px; min-width: 0; }
  html:root:not(#_) #calendarView .calendar-heading-title > h1 { flex: none; width: auto; }
  html:root:not(#_) #calendarView .calendar-heading-title > :is(.planiq-page-brand, .eyebrow) { display: none; }
  html:root:not(#_) #calendarHeadingCalendar:empty { display: none; }
  html:root:not(#_) #calendarHeadingCalendar .sidebar-active-calendar { position: relative; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  html:root:not(#_) #calendarHeadingCalendar :is(#sidebarCalendarLabel, #sidebarCalendarKind) {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  html:root:not(#_) #calendarHeadingCalendar #sidebarCalendarSelect {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: auto; min-width: 186px; max-width: 320px; margin: 0;
    background: var(--mk-surface); 
    text-align: left; 
  }
  html:root:not(#_) #calendarHeadingCalendar #sidebarCalendarName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html:root:not(#_) .calendar-more { position: relative; }
  html:root:not(#_) #calendarMoreButton { display: inline-grid; place-items: center; }
  html:root:not(#_) #calendarMoreButton svg { width: 18px; height: 18px; fill: currentColor; }
  html:root:not(#_) .calendar-more .calendar-more-menu { top: 42px; left: auto; right: 0; min-width: 220px; }
  html:root:not(#_) #calendarMoreMenu > button {    gap: 10px;     }
  html:root:not(#_) #calendarMoreMenu > button svg { width: 16px; height: 16px; flex: none; }

  /* Zweite Reihe: ‹ › Heute · Zeitraum mit KW · Woche/Monat/Jahr · Summe */
  html:root:not(#_) #calendarView .calendar-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    margin: 0 0 12px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  }
  html:root:not(#_) #calendarView .calendar-navigation { order: 1; display: flex; align-items: center; gap: 4px; margin: 0; }
  html:root:not(#_) #calendarView #calendarToday { order: 3; margin-left: 4px; }
  html:root:not(#_) #calendarView .calendar-arrow:hover { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #calendarView .calendar-period-row { order: 2; display: flex;   margin: 0; padding: 0; border: 0; background: none; }
  html:root:not(#_) #calendarView #calendarPeriod { font-size: 15px; font-weight: 650; line-height: 1.3; }
  html:root:not(#_) #calendarView .calendar-week-number { font-size: 12.5px; font-weight: 500; color: var(--mk-ink-3); }
  html:root:not(#_) #calendarView .segmented-control { order: 3; }
  /* Nachtrag: Wochenmenü in der ersten Zeile, Summe darunter rechtsbündig (wie im Prototyp) */
  html:root:not(#_) #calendarView .calendar-summary { order: 5; flex: 1 0 100%; margin: 0; font-size: 13px; color: var(--mk-ink-2); text-align: right; }
  html:root:not(#_) #calendarView .calendar-toolbar > .calendar-range-menu { order: 4; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--mk-ink-2); box-shadow: none; }
  html:root:not(#_) #calendarView .calendar-toolbar > .calendar-range-menu:hover { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #calendarView .calendar-toolbar > .calendar-range-menu span { font-size: 18px; line-height: 1; }

  /* Woche: keine Rahmen um Tage, nur feine Spaltenlinien */
  html:root:not(#_) #trainingTimeline.week-view .calendar-week { border: 0; border-top: 1px solid var(--mk-line); border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-weekdays { display: none; }
  html:root:not(#_) #mainContent #trainingTimeline.week-view .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 0; background: none; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day {
    padding: 10px 6px 12px;
    border: 0; border-left: 1px solid var(--mk-line); border-radius: 0; outline: 0;
  }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day[data-calendar-day-index="0"] { border-left: 0; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-heading { flex-wrap: nowrap;  justify-content: space-between; height: auto;    border: 0;  }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-units { padding: 0; margin: 0; gap: 8px; }
  html:root:not(#_) #trainingTimeline.week-view :is(.calendar-day-create, .calendar-day-label) { display: inline-flex; align-items: center; padding: 0; margin: 0; border: 0; background: none; color: inherit; box-shadow: none; text-align: left; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-number { display: inline-grid; place-items: center; padding: 0 4px; border-radius: 999px; }
  html:root #trainingTimeline.week-view .calendar-day.today .calendar-day-number {   }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-heading :is(h3, .calendar-day-create) { color: inherit; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-actions { display: flex; flex-wrap: nowrap; flex-direction: row; align-items: center; margin: 0; opacity: 0; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day:is(:hover, :focus-within) .calendar-day-actions { opacity: 1; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-actions > strong { display: none; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-actions :is(.calendar-add, .calendar-range-menu) { border: 0; border-radius: 6px; background: transparent; color: var(--mk-ink-2); box-shadow: none; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-actions :is(.calendar-add, .calendar-range-menu):hover { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-empty { display: none; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-add-unit {
    display: block; width: 100%; margin: 0; padding: 6px; border: 0; border-radius: 8px;
    background: transparent; font-weight: 500; text-align: center; box-shadow: none; opacity: 0;
  }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day:is(:hover, :focus-within) .calendar-day-add-unit { opacity: 1; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day-add-unit:hover { background: var(--mk-sunk); color: var(--mk-ink); }

  /* Session-Karte: Tönung der Trainingsart, 3-px-Streifen links */
  html:root:not(#_) #trainingTimeline.week-view .session-card {
    position: relative; margin: 0 0 8px; padding: 0; overflow: hidden;
    border: 0; border-left: 3px solid var(--fliq-training-type-accent, var(--mk-slate)); border-radius: 6px;
    background: var(--fliq-training-type-tint, var(--mk-sunk)); box-shadow: none;
  }
  html:root:not(#_) #trainingTimeline.week-view .session-card-trigger { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 3px; width: 100%; min-height: 0; padding: 8px 26px 8px 10px; border: 0; background: none; color: var(--mk-ink); text-align: left; box-shadow: none; }
  html:root:not(#_) #trainingTimeline.week-view .session-title { grid-column: 1; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; hyphens: manual; }
  html:root:not(#_) #trainingTimeline.week-view .session-card-trigger > * { grid-column: 1; grid-area: auto; }
  html:root:not(#_) #trainingTimeline.week-view .session-card-meta { display: flex; flex-wrap: wrap; gap: 0; font-size: 12px; color: var(--mk-ink-2); }
  html:root:not(#_) #trainingTimeline.week-view .session-card-meta .session-duration::before { content: " · "; white-space: pre; }
  html:root:not(#_) #trainingTimeline.week-view .session-card-meta > span { white-space: nowrap; }
  html:root:not(#_) #trainingTimeline.week-view :is(.calendar-day-create, .calendar-day-label) > span { white-space: nowrap; }
  html:root:not(#_) #trainingTimeline.week-view .unit-card-completion[data-completion="planned"],
  html:root:not(#_) #trainingTimeline.week-view .session-card:has(.unit-card-completion[data-completion="planned"]) .unit-card-values,
  html:root:not(#_) #trainingTimeline.week-view .session-open-icon { display: none; }
  html:root:not(#_) #trainingTimeline.week-view .session-card-indicators { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: 11.5px; color: var(--mk-ink-3); }
  
  html:root:not(#_) #trainingTimeline.week-view .session-card-indicators :is(.session-training-type, .session-iqss) { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; font-weight: 500; box-shadow: none; }
  html:root:not(#_) #trainingTimeline.week-view .session-card-indicators .training-type-marker { display: none; }
  html:root:not(#_) #trainingTimeline.week-view .session-menu-button { position: absolute; z-index: 1; opacity: 0; }
  html:root:not(#_) #trainingTimeline.week-view .session-card:is(:hover, :focus-within) .session-menu-button { opacity: 1; }

  /* Seitenleiste: flache Liste ohne innere Boxen (wird in 1.5b zum Panel) */
  html:root:not(#_) #calendarSidebar :is(.sidebar-library, .sidebar-session, section) { border-radius: 0; box-shadow: none; }
  html:root:not(#_) #calendarSidebar .sidebar-library { border: 0; background: none; padding-inline: 0; }
}

/* Touch: Tagesaktionen und "+ Einheit" sind immer sichtbar */
@media screen and (hover: none) {
  html:root:not(#_) #trainingTimeline.week-view :is(.calendar-day-actions, .calendar-day-add-unit, .session-menu-button) { opacity: 1; }
}

/* Unter 760 px: Tage untereinander */
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #mainContent #trainingTimeline.week-view .calendar-days { display: block; }
  html:root:not(#_) #trainingTimeline.week-view .calendar-day { min-height: 0; border-left: 0; }
  html:root:not(#_) #trainingTimeline.week-view :is(.calendar-day-actions, .calendar-day-add-unit) { opacity: 1; }
  html:root:not(#_) #calendarView .calendar-summary { flex-basis: 100%; margin: 0; }
}

/* Unter 760 px: Hauptknopf fest unten rechts, Nebenknöpfe bleiben im Seitenkopf */
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #appShell > #mainContent { padding-right: 16px; }
  html:root:not(#_) #mainContent .view > .page-heading { flex-wrap: wrap; }
  html:root:not(#_) #mainContent .page-heading .page-primary:not(:where(.prep-library-view *)) {
    position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: auto; max-width: calc(100vw - 32px); flex: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .16);
  }
  html:root:not(#_) #mainContent .view:not(:where(.prep-library-view)):has(.page-primary:not([hidden])) { padding-bottom: 72px; }
}

/* Unter 1100 px: Navigation ohne Icons, Nutzername nur als Avatar */
@media screen and (max-width: 1100px) {
  html:root:not(#_) .topbar .user-menu-name { display: none; }
}

/* Unter 760 px: Navigation als zweite, horizontal scrollbare Zeile unter dem Kopf */
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #appShell > .topbar { column-gap: 8px; }
  
  html:root:not(#_) .topbar .app-switcher, html:root:not(#_) .topbar .user-menu { height: 40px; }
  html:root:not(#_) #appShell #primaryNav {
    order: 3; flex: 1 0 100%; 
  }
  html:root:not(#_) :is(.topbar, .calendar-more) .topbar-menu { top: 46px; max-width: calc(100vw - 32px); }
}

/* ---------- 1.5 Kalenderauswahl im Seitenkopf ----------
   Die Regeln des Kalender-Popovers waren an #calendarSidebar gebunden. Sie werden hier unverändert
   für den neuen Ort #calendarHeadingCalendar übernommen (Quelle jeweils angegeben). */
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarSelect {    } }
/* calendar-refinements.css */
@media screen { html:root[data-fliq-ci="8.1"] #calendarHeadingCalendar #sidebarCalendarSelect { 
    white-space:normal; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarName { min-width:0; overflow-wrap:anywhere; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-chevron { display:block; width:16px; height:16px; flex:0 0 16px; background:currentColor;
    mask:url("ci-8.1/icons/chevron-down.svg?v=01adac9b82a8") center/16px 16px no-repeat; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarSelect[aria-expanded="true"] .calendar-picker-chevron { transform:rotate(180deg); } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarPicker { min-width:0; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarPicker [hidden], html #calendarHeadingCalendar #sidebarCalendarPicker[hidden] { display:none!important; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-search { display:grid; gap:4px; min-width:0;  } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarSearch { width:100%; min-width:0; max-width:100%; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarResults { display:grid;  min-width:0; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarResults section { min-width:0; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarResults h4 { margin:0; padding:8px; font-size:12px; font-weight:600; } }
/* calendar-refinements.css */
@media screen { html:root[data-fliq-ci="8.1"] #calendarHeadingCalendar #sidebarCalendarResults button { align-items:center; gap:8px; width:100%; min-width:44px; 
    text-align:left; white-space:normal; overflow-wrap:anywhere; } }
/* calendar-refinements.css */
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-section>span:not([aria-hidden]) { flex:1; min-width:0; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-section>small { flex:none; font-variant-numeric:tabular-nums; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-section[aria-expanded="false"] .calendar-picker-chevron { transform:rotate(-90deg); } }
/* calendar-refinements.css */
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarResults [aria-pressed="true"]::after { content:""; width:16px; height:16px; flex:0 0 16px; margin-left:auto; background:currentColor;
    mask:url("ci-8.1/icons/check.svg?v=30849130680c") center/16px 16px no-repeat; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarEmpty { margin:8px 0; font-size:13px; overflow-wrap:anywhere; } }
/* calendar-refinements.css */
@media(pointer:coarse) { html:root[data-fliq-ci="8.1"] #calendarHeadingCalendar #sidebarCalendarSearch { font-size:16px; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarPicker { position:fixed; inset:auto; margin:0; box-sizing:border-box; 
    color:var(--fliq-text-primary);
    overflow:hidden; z-index:100; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarPicker:not([hidden]) { display:flex; flex-direction:column; gap:4px; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-search { flex:none; margin:0; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar .calendar-picker-search>span { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; } }
/* calendar-refinements.css */
@media screen { html:root[data-fliq-ci="8.1"] #calendarHeadingCalendar #sidebarCalendarSearch { height:44px; min-height:44px; box-sizing:border-box; padding:8px 12px; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarResults { overflow:auto; overscroll-behavior:contain; gap:4px; } }
/* calendar-refinements.css */
@media screen { html #calendarHeadingCalendar #sidebarCalendarEmpty { padding:8px; } }

/* ---------- 1.5b Werkzeugleiste links mit Panel "Sessions" ----------
   #calendarSidebar ist das Panel; Inhalt, Bibliothek und Drag & Drop bleiben unverändert.
   Abstände zum Inhalt mit !important, weil die bisherigen Kalenderregeln über :has() sehr spezifisch sind. */
@media screen {
  html:root:not(#_) #calendarToolStrip { display: none; }
  html:root:not(#_) #appShell:not([hidden]):has(#calendarView:not([hidden])) > #calendarToolStrip:not([hidden]) {
    position: fixed; left: 0; top: var(--calendar-sidebar-top, 56px); bottom: 0; z-index: 22;
    display: flex; flex-direction: column; align-items: center; gap: 6px; width: 48px; padding: 14px 0;
    background: var(--mk-surface); border-right: 1px solid var(--mk-line);
  }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button {
    display: grid; place-items: center; width: 34px; min-width: 34px; padding: 0; margin: 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--mk-ink-2); box-shadow: none; cursor: pointer;
  }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button:hover { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button[aria-pressed="true"] { background: var(--mk-ink); color: var(--mk-on-ink); }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* Das Handy-"Kalender"-Knöpfchen der alten Seitenleiste ersetzt das Symbol in der Werkzeugleiste. */
  html:root:not(#_) #mobileCalendarScope { display: none !important; }

  /* Panel neben der Leiste */
  html:root:not(#_) #appShell > #calendarSidebar {
    left: 48px; top: var(--calendar-sidebar-top, 56px); bottom: 0; z-index: 21;
    width: 256px; max-width: calc(100vw - 48px); padding: 12px 12px 16px;
    border: 0; border-right: 1px solid var(--mk-line); border-radius: 0; 
  }
  html:root:not(#_) #appShell > #calendarSidebar.is-collapsed { display: none !important; }
  html:root:not(#_) #calendarSidebarToggle {
    display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; min-height: 32px; margin: 0 0 8px; padding: 0 2px 0 4px; border: 0; background: transparent; color: var(--mk-ink); box-shadow: none;
  }
  html:root:not(#_) #calendarSidebarToggle .calendar-sidebar-title { font-size: 14px; font-weight: 650; }
  html:root:not(#_) #calendarSidebarToggle > span[aria-hidden] { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--mk-ink-2); font-size: 20px; line-height: 1; }
  html:root:not(#_) #calendarSidebarToggle:hover > span[aria-hidden] { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #calendarSidebar .sidebar-session { background: var(--mk-canvas); border: 1px solid var(--mk-line); border-radius: 8px; padding: 8px 10px; margin: 0 0 6px; }

  /* Inhalt: Leiste 48 px, offenes Panel schiebt ab 1100 px den Kalender um 256 px */
  html:root:not(#_) #appShell:has(#calendarView:not([hidden])):has(> #calendarToolStrip:not([hidden])) > #mainContent { margin-left: 48px !important; width: calc(100% - 48px) !important; max-width: none !important; }
}
@media screen and (min-width: 1100px) {
  html:root:not(#_) #appShell:has(#calendarView:not([hidden])):has(> #calendarToolStrip:not([hidden])):has(> #calendarSidebar:not(.is-collapsed):not([hidden])) > #mainContent { margin-left: 304px !important; width: calc(100% - 304px) !important; }
}
/* Unter 1100 px: Panel als Overlay über dem Kalender */
@media screen and (min-width: 761px) and (max-width: 1099px) and (min-height:501px){
  html:root:not(#_) #appShell > #calendarSidebar:not(.is-collapsed) { box-shadow: var(--mk-pop); }
}
/* Unter 760 px: Leiste als Zeile unter dem Kopf, Panel als Bottom Sheet */
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #appShell:not([hidden]):has(#calendarView:not([hidden])) > #calendarToolStrip:not([hidden]) {
    position: static; flex-direction: row; justify-content: flex-start; width: auto; height: auto; padding: 8px 16px;
    border-right: 0; border-bottom: 1px solid var(--mk-line);
  }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button { width: auto; gap: 8px; display: inline-flex; align-items: center; border: 1px solid var(--mk-control); background: var(--mk-surface); color: var(--mk-ink); font-weight: 500; }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button[aria-pressed="true"] { border-color: var(--mk-ink); }
  html:root:not(#_) #calendarToolStrip .calendar-tool-button > span { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  html:root:not(#_) #appShell:has(#calendarView:not([hidden])):has(> #calendarToolStrip:not([hidden])) > #mainContent { margin-left: 0 !important; width: 100% !important; }
  html:root:not(#_) #appShell > #calendarSidebar {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 60;
    width: auto; max-width: none; max-height: 78dvh; padding: 22px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border: 0; border-radius: 16px 16px 0 0; overflow: auto;
  }
  html:root:not(#_) #appShell > #calendarSidebar::before {
    content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--mk-line-strong);
  }
}

/* ---------- 1.6 Session Builder (nur Darstellung) ----------
   Aufbau und Felder bleiben; Kopf, zweispaltiger Körper und Fuß nach der Vorlage. */
@media screen {
  html:root:not(#_) body #onlinePlanDialog.planiq-builder {
    padding: 0; border: 1px solid var(--mk-line); border-radius: 14px; overflow: hidden;
  }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm { grid-template-rows: auto auto minmax(0, 1fr) auto auto; min-height: 0; margin: 0; padding: 0; gap: 0; }

  /* Kopf */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading { display: flex; justify-content: space-between; gap: 16px; margin: 0; border: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
  /* Kleine Kopfzeile statt großem Dialogtitel; überschreibt die 26-px-Regel vom 20.10. bewusst. */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading h2 { line-height: 1.4 !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading .builder-heading-type { color: var(--fliq-training-type-accent, var(--mk-ink-2)); font-weight: 600; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading .builder-title-field { display: block; margin: 0; padding: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading .builder-title-field > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading .builder-title-field input:not(#_) {
    margin: 0; 
    box-shadow: none !important;
  }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading .builder-title-field input:not(#_):placeholder-shown { border-bottom-color: var(--mk-warn) !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading .builder-title-field input:not(#_):focus-visible { outline: 0; border-bottom-color: var(--mk-ink) !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .dialog-heading > .icon-button:hover { background: var(--mk-sunk); color: var(--mk-ink); }

  /* Meta-Reihe: Kalender für, Datum, Startzeit, Ort, Track – fünf gleich breite Spalten */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-meta { margin: 0; border: 0; }
  /* Feld- und Schriftgrößen der Formulare bleiben wie in planiq-ui-refinement.css (20.10.). */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-meta > label:not(#_) { display: grid; gap: 4px; min-width: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-meta :is(input):not(#_) { width: 100%; }
  /* UX-Prüfung: Hinweis direkt am Feld, dass der Track nur die Vorauswahl für alle Efforts ist. */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-meta #onlineSessionTrackHint:not(#_) { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; margin: 0; font-size: 12px; line-height: 1.35; color: var(--mk-ink-3); }

  /* Körper: links Trainingsablauf (300 px), rechts Block-Editor */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-workspace { min-height: 0; margin: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-outline { min-height: 0; margin: 0; border-radius: 0; background: transparent; box-shadow: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-outline > .builder-sequence-hint { margin: 0 0 14px; font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase { grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; }
  html:root body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase { --builder-phase-color: var(--mk-slate); }
  html:root body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase[data-builder-phase="warmUp"] { --builder-phase-color: var(--mk-accent); }
  html:root body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase[data-builder-phase="coolDown"] { --builder-phase-color: var(--mk-ink-3); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-add:first-of-type { grid-column: 1; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-add:last-of-type:not(:first-of-type) { grid-column: 2; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > h4 { grid-column: 1 / 3; align-items: center; gap: 8px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > h4::before { width: 7px; height: 7px; border-radius: 50%; background: var(--builder-phase-color); flex: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-phase-summary { grid-column: 3; justify-self: end; font-size: 12.5px !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-phase-rows { grid-column: 1 / -1; display: grid; margin: 0 0 0 3px; padding: 0 0 0 8px; border-left: 2px solid var(--builder-phase-color); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-phase-rows:empty { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice {
    grid-template-columns: minmax(0, 1fr) auto; margin: 0; 
    border-radius: 8px;  color: var(--mk-ink); text-align: left; box-shadow: none;
  }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice:hover { background: var(--mk-sunk); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice > strong { grid-column: 1; font-weight: 600; line-height: 1.3; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice > .builder-choice-duration { grid-column: 2; grid-row: 1; color: var(--mk-ink-2); white-space: nowrap; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice > .builder-choice-meta { grid-column: 1 / -1; color: var(--mk-ink-3); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice > .builder-choice-status { grid-column: 1 / -1; color: var(--mk-ink-3); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice > .builder-choice-status:empty { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice.builder-choice-pending > .builder-choice-status { color: var(--mk-warn); font-weight: 500; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-add:not(#_) {
    width: auto; min-width: 0; height: 28px !important; min-height: 28px !important; min-height: 28px; margin: 0; 
    border: 0; 
  }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase > .builder-add:not(#_):hover { background: var(--mk-sunk); color: var(--mk-ink); }

  /* Block-Editor */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor { min-height: 0; overflow: auto; margin: 0; padding: 20px 24px 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor > .builder-context { margin: 0; color: var(--mk-ink-3); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor > .builder-editor-title { margin: 0 0 12px; padding-right: 160px; font-weight: 650; line-height: 1.3; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor :is(.online-session-part) { border-radius: 0; margin: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .online-part-heading { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu { z-index: 2; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor { position: relative; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu > summary { gap: 6px; font-weight: 600; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu > summary::-webkit-details-marker { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu[open] > .online-block-actions { position: absolute; right: 0; top: 38px; display: grid; gap: 2px; min-width: 200px; padding: 6px; background: var(--mk-surface); border: 1px solid var(--mk-line); border-radius: 12px; box-shadow: var(--mk-pop); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu .online-block-actions > button { box-shadow: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu .online-block-actions > button:hover { background: var(--mk-sunk); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 4px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor :is(.builder-field-grid, .online-track-choice-row, .builder-track-execution) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor :is(.builder-track-goal, .online-track-choice-row, .builder-track-execution) { padding: 16px 0 0; margin: 16px 0 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-field-heading { grid-column: 1 / -1; margin: 0 0 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mk-ink-3); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor label:not(#_) { display: grid; gap: 4px; min-width: 0; margin: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor :is(input:not([type="checkbox"]):not([type="radio"])):not(#_) { width: 100%; }
  /* Dauer 150 px mit "min"-Suffix, daneben "Wo und wie" */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-track-execution { grid-template-columns: 150px minmax(0, 1fr); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor label:not(#_):has(> input[data-field="durationMinutes"]) { display: grid; grid-template-columns: minmax(0, 1fr); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor label:has(> input[data-field="durationMinutes"])::after { content: "min"; grid-row: 2; grid-column: 1; justify-self: end; align-self: center; margin-right: 12px; font-size: 13px; color: var(--mk-ink-3); pointer-events: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor label:has(> input[data-field="durationMinutes"]) > :is(span, input) { grid-column: 1; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor input[data-field="durationMinutes"] { padding-right: 38px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-field-duration-hint { color: var(--mk-warn); font-size: 12px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-coach-disclosure { margin: 16px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--mk-line); background: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-coach-disclosure > summary { font-size: 14px; font-weight: 600; cursor: pointer; }
  /* UX-Prüfung: „Die Dauer wird nach den Regeln jedes Blocks berechnet.“ sagt nichts Neues und entfällt. */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .online-calculation-note { display: none; }

  /* Fuß: Plan-Dauer links, Abbrechen · Als Vorlage speichern · Session speichern rechts */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer { border: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > .builder-duration { flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 auto 0 0; min-width: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer .builder-duration-range:empty { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer .builder-duration-hint.builder-duration-pending { color: var(--mk-warn); font-weight: 500; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer .builder-pending-jump:not(#_) { height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--mk-warn); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > :is(.button, button) { white-space: nowrap; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > span:empty { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > [data-close-dialog] { order: 1; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > #saveOnlineTemplateButton { order: 2; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > #saveOnlinePlanButton { order: 3; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm #onlinePlanFormError { margin: 0; padding: 0 22px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm #onlinePlanFormError:not([hidden]) { padding: 8px 22px; }

  /* Auswahl-Dialog "Kalendereintrag erstellen" */
  html:root:not(#_) #calendarCreateDialog [data-calendar-create-group] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-column: 1 / -1; width: 100%; }
  html:root:not(#_) #calendarCreateDialog [data-calendar-create-group] > :is(h3, p) { grid-column: 1 / -1; }
  html:root:not(#_) #calendarCreateDialog [data-calendar-create-group] button:hover { background: var(--mk-sunk); border-color: var(--mk-line-strong); }
}
/* Builder unter 1000 px: einspaltig, das Formular scrollt als Ganzes, der Editor erscheint beim gewählten Block */
@media screen and (max-width: 999px) {
  html:root:not(#_) body #onlinePlanDialog.planiq-builder { width: calc(100vw - 32px); max-width: calc(100vw - 32px); height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm { height: 100%; overflow: auto; overscroll-behavior: contain; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-outline .builder-editor { position: relative; padding: 12px 0 16px; overflow: visible; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-outline .builder-editor .builder-block-menu { right: 0; top: 10px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > .builder-duration { flex: 1 0 100%; margin: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-footer > :is(.button, button):not([hidden]) { min-width: 0; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor :is(.builder-block-settings, .builder-field-grid, .online-track-choice-row, .builder-track-execution) { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 1.7 Übrige Bereiche ----------
   Gemeinsam: Filterreihe ohne Rahmen, Kennzahlen als eine Leiste mit Trennlinien,
   Abschnitte durch Überschrift und feine Linie statt verschachtelter Karten, Listen als Zeilen. */
@media screen {
  /* Filterreihen */
  html:root:not(#_) #mainContent .view > :is(.toolbar, .event-overview-toolbar),
  html:root:not(#_) #mainContent .coach-center-filter {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0 0 20px; padding: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none;
  }
  html:root:not(#_) #mainContent :is(.view > .toolbar, .event-overview-toolbar) > label { min-width: 200px; max-width: 320px; flex: 0 1 240px; }

  /* Kennzahlen als eine Leiste */
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin: 0 0 24px; padding: 0;
    border: 1px solid var(--mk-line); border-radius: 12px; background: var(--mk-surface); overflow: hidden; box-shadow: none;
  }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article {
    display: grid; align-content: start; gap: 2px; margin: 0; padding: 14px 16px;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article + article { border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article > span { font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article > strong { font-size: 22px; font-weight: 650; line-height: 1.3; color: var(--mk-ink); }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article > small { font-size: 12px; color: var(--mk-ink-3); }

  /* Abschnitte statt Karten auf oberster Ebene */
  html:root:not(#_) #mainContent .view > :is(section.card, .card, .coach-analysis-surface) {
    margin: 0 0 24px; border: 0; border-top: 1px solid var(--mk-line); 
  }
  html:root:not(#_) #mainContent .view > :is(section.card, .card, .coach-analysis-surface) > :is(.card-heading, h2:first-child) { margin-top: 0; }

  /* Events: Datum | Typ, Titel, Zuordnung, Ort, Notizen | Status | ⋯ */
  html:root:not(#_) #mainContent .event-overview-section > h2 { margin: 0 0 4px; }
  html:root:not(#_) #mainContent .event-overview-card {
    display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; align-items: center; column-gap: 16px; row-gap: 2px;
    margin: 0; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--mk-line); border-radius: 0; background: none; box-shadow: none;
  }
  html:root:not(#_) #mainContent .event-overview-section > .event-overview-card:first-of-type { border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .event-overview-card :is(.event-overview-card-main, .event-overview-card-heading) { display: contents; }
  html:root:not(#_) #mainContent .event-overview-card .event-row-date { grid-column: 1; grid-row: 1 / span 3; margin: 0; font-size: 14px; font-weight: 600; color: var(--mk-ink); }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-card-heading > div { grid-column: 2; grid-row: 1; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-card-heading .eyebrow { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-card-heading h2 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
  html:root:not(#_) #mainContent .event-overview-card .event-state { grid-column: 3; grid-row: 1 / span 3; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-facts { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; padding: 0; border: 0; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-facts > div { display: block; margin: 0; padding: 0; border: 0; background: none; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-facts > div:first-child { display: none; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-facts dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-facts dd { margin: 0; font-size: 13px; font-weight: 400; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-notes { grid-column: 2; grid-row: 3; margin: 0; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-notes > strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html:root:not(#_) #mainContent .event-row-menu { grid-column: 4; grid-row: 1 / span 3; position: relative; }
  html:root:not(#_) #mainContent .event-row-menu > summary { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--mk-ink-2); cursor: pointer; list-style: none; }
  html:root:not(#_) #mainContent .event-row-menu > summary::-webkit-details-marker { display: none; }
  html:root:not(#_) #mainContent .event-row-menu > summary:hover, html:root:not(#_) #mainContent .event-row-menu[open] > summary { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #mainContent .event-row-menu > summary svg { width: 18px; height: 18px; fill: currentColor; }
  html:root:not(#_) #mainContent .event-row-menu > .event-overview-card-actions {
    position: absolute; right: 0; top: 36px; z-index: 30; display: grid; gap: 2px; min-width: 200px; padding: 6px;
    background: var(--mk-surface); border: 1px solid var(--mk-line); border-radius: 12px; box-shadow: var(--mk-pop);
  }
  html:root:not(#_) #mainContent .event-row-menu > .event-overview-card-actions > .button { justify-content: flex-start; width: 100%; height: auto; min-height: 36px; padding: 8px 10px; border: 0; background: transparent; color: var(--mk-ink); box-shadow: none; font-size: 14px; font-weight: 500; text-align: left; }
  html:root:not(#_) #mainContent .event-row-menu > .event-overview-card-actions > .button:hover { background: var(--mk-sunk); }
  html:root:not(#_) #mainContent .event-row-menu > .event-overview-card-actions > .button.danger { color: var(--mk-danger); }

  /* Coachcenter: Suche, Gruppenfilter und Zähler in einer Reihe; Sportlerkarten mit feiner Linie */
  html:root:not(#_) #mainContent .coach-center-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  html:root:not(#_) #mainContent .coach-center-shell > * { grid-column: 1 / -1; }
  html:root:not(#_) #mainContent .coach-center-shell > .coach-center-filter { grid-column: 1; }
  html:root:not(#_) #mainContent .coach-center-shell > .coach-search-count { grid-column: 2; align-self: end;  font-size: 13px; color: var(--mk-ink-3); white-space: nowrap; }
  
  
  html:root:not(#_) #mainContent .coach-athlete-card { border: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-athlete-card .daily-training-state-value { min-height: 0; padding: 0 10px 0 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  html:root:not(#_) #mainContent .coach-athlete-card .daily-training-state-value dt { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .coach-athlete-card .daily-training-state-value dd { margin: 0; font-size: 14px; font-weight: 600; }
  html:root:not(#_) #mainContent .coach-athlete-card :is(.coach-explain-link, [data-coach-explain]) { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

  /* Athletes: Gruppen und Sportler als Zeilen */
  html:root:not(#_) #mainContent :is(.athlete-grid, .training-group-list) { display: block; margin: 0; padding: 0; }
  
  html:root:not(#_) #mainContent .athlete-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--mk-line); border-radius: 0; background: none; box-shadow: none; }
  
  
  
  
  
  
  
  
  html:root:not(#_) #mainContent .athlete-card :is(.athlete-row-group, .athlete-row-facts) { font-size: 13.5px; color: var(--mk-ink-2); min-width: 0; }
  
  
  html:root:not(#_) #mainContent .athlete-card .athlete-card-documents { display: flex; gap: 4px; padding-right: 4px; }
  
  

  /* Results: eine Tabelle, Saisonauswertung als Leiste */
  html:root:not(#_) #mainContent #raceIqEventList .raceiq-events-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
  html:root:not(#_) #mainContent #raceIqEventList .raceiq-events-heading h2 { margin: 0; font-size: 15px; font-weight: 650; }
  html:root:not(#_) #mainContent #raceIqEventList .raceiq-events-grid { display: block; }
  html:root:not(#_) #mainContent .raceiq-table-scroll { overflow-x: auto; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .raceiq-events-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  html:root:not(#_) #mainContent .raceiq-events-table :is(th, td) { padding: 14px 12px; border: 0; border-bottom: 1px solid var(--mk-line); text-align: left; white-space: nowrap; vertical-align: middle; }
  html:root:not(#_) #mainContent .raceiq-events-table thead th { padding-block: 10px; font-size: 12px; font-weight: 500; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .raceiq-events-table tbody th { font-weight: 600; white-space: normal; min-width: 220px; }
  html:root:not(#_) #mainContent .raceiq-events-table .raceiq-num { text-align: right; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #mainContent .raceiq-events-table :is(.raceiq-col-class, .raceiq-muted) { color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .raceiq-events-table .raceiq-col-open { text-align: right; }
  html:root:not(#_) #mainContent .raceiq-events-table .raceiq-open { height: 32px; min-height: 32px; padding: 0 10px; border: 0; background: transparent; color: var(--mk-ink); font-weight: 600; box-shadow: none; }
  html:root:not(#_) #mainContent .raceiq-events-table .raceiq-open:hover { background: var(--mk-sunk); }
  html:root:not(#_) #mainContent .raceiq-events-table tbody tr:hover { background: color-mix(in srgb, var(--mk-sunk) 60%, transparent); }

  /* Profil: schmale Spalte links (sticky), Formular rechts max. 960 px, Abschnitte mit Linien */
  html:root:not(#_) #mainContent .profile-detail-layout { grid-template-columns: 228px minmax(0, 960px); gap: 32px; align-items: start; }
  html:root:not(#_) #mainContent .profile-detail-sidebar { position: sticky; top: 76px; gap: 12px; }
  html:root:not(#_) #mainContent .profile-detail-sidebar .profile-identity-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; }
  html:root:not(#_) #mainContent .profile-detail-sidebar .profile-photo { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--mk-sunk); border: 1px solid var(--mk-line); font-size: 13px; font-weight: 700; }
  html:root:not(#_) #mainContent .profile-detail-sidebar .profile-identity :is(h2, p) { margin: 0; }
  html:root:not(#_) #mainContent .profile-detail-sidebar .profile-identity h2 { font-size: 15px; font-weight: 650; }
  html:root:not(#_) #mainContent .profile-detail-sidebar .profile-identity :is(p, .eyebrow) { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .profile-section-links { display: grid; gap: 2px; }
  html:root:not(#_) #mainContent .profile-section-links > a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--mk-ink-2); text-decoration: none; font-size: 14px; }
  html:root:not(#_) #mainContent .profile-section-links > a strong { font-weight: 500; }
  html:root:not(#_) #mainContent .profile-section-links > a[aria-current] { color: var(--mk-ink); }
  html:root:not(#_) #mainContent .profile-section-links > a[aria-current] strong { font-weight: 600; }
  html:root:not(#_) #mainContent .profile-detail-layout > .profile-detail-main:not(#_) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  html:root:not(#_) #mainContent .profile-detail-main :is(.profile-detail-section, section.card) { margin: 0 0 24px; padding: 20px 0 0; border: 0; border-top: 1px solid var(--mk-line); border-radius: 0; background: none; box-shadow: none; }
  html:root:not(#_) #mainContent .profile-detail-main :is(.profile-detail-section, section.card):first-child { border-top: 0; padding-top: 0; }
  html:root:not(#_) #mainContent .profile-save-bar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: fit-content; margin: 0 0 24px auto; padding: 8px 8px 8px 16px; border: 1px solid var(--mk-line); border-radius: 12px; background: var(--mk-surface); box-shadow: var(--mk-pop); }
}
@media screen and (max-width: 1000px) {
  
  html:root:not(#_) #mainContent .athlete-card :is(.athlete-row-group, .athlete-row-facts) { grid-column: 2; }
  
  html:root:not(#_) #mainContent .profile-detail-layout { grid-template-columns: minmax(0, 1fr); }
  html:root:not(#_) #mainContent .profile-detail-sidebar { position: static; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article + article { border-left: 0; }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article:nth-child(even) { border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent :is(.event-overview-kpis, .coach-center-hero-stats, .raceiq-season-kpis) > article:nth-child(n+3) { border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .event-overview-card { grid-template-columns: minmax(0, 1fr) auto; }
  html:root:not(#_) #mainContent .event-overview-card .event-row-date { grid-column: 1; grid-row: 1; font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-card-heading > div { grid-column: 1; grid-row: 2; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-facts { grid-column: 1; grid-row: 3; }
  html:root:not(#_) #mainContent .event-overview-card .event-overview-notes { grid-column: 1; grid-row: 4; }
  html:root:not(#_) #mainContent .event-overview-card .event-state { grid-column: 2; grid-row: 1; justify-self: end; }
  html:root:not(#_) #mainContent .event-row-menu { grid-column: 2; grid-row: 2 / span 3; justify-self: end; }
  html:root:not(#_) #mainContent .coach-center-shell > .coach-search-count { grid-column: 1 / -1; }
  html:root:not(#_) #mainContent :is(.view > .toolbar, .event-overview-toolbar) > label { flex: 1 1 100%; max-width: none; }
  html:root:not(#_) #mainContent :is(.view > .toolbar, .event-overview-toolbar, .coach-center-filter) { flex-direction: row; align-items: stretch; }
}

/* 1.7 Analysis (#coachAnalysisView) und Analytics (#resultsView): flache Abschnitte, Reihenfolge der Vorlage */
@media screen {
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView):not([hidden]) { display: flex; flex-direction: column; }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) > * { order: 10; }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) > .page-heading { order: 0; }
  html:root:not(#_) #mainContent #coachAnalysisView > .coach-evidence-surface { order: 2; }
  html:root:not(#_) #mainContent #coachAnalysisView > .coach-analysis-surface:has(#coachAnalysisAreas) { order: 3; }
  html:root:not(#_) #mainContent #coachAnalysisView > #coachLoadProfile { order: 4; }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) > :is(section, .coach-analysis-grid) { margin: 0 0 24px; }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) :is(.coach-analysis-surface, .analysis-surface, .coach-analysis-method) {
    margin: 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--mk-line); border-radius: 0; background: none; box-shadow: none;
  }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) .analysis-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; margin: 0 0 12px; border: 0; background: none; }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) .analysis-fold > summary h2 { margin: 0; }
  html:root:not(#_) #mainContent :is(#coachAnalysisView, #resultsView) .analysis-fold-body { padding: 0; border: 0; background: none; }
  /* Datengrundlage als eine Kennzahlenleiste */
  html:root:not(#_) #mainContent .coach-quality-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--mk-line); border-radius: 12px; background: var(--mk-surface); overflow: hidden; }
  html:root:not(#_) #mainContent .coach-quality-grid > * { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  html:root:not(#_) #mainContent .coach-quality-grid > * + * { border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-analysis-note { margin: 10px 0 0; padding: 0; border: 0; background: none; font-size: 12.5px; color: var(--mk-ink-3); }
  /* Wo verbessert sich der Sportler? – Bereiche als Zeilen */
  html:root:not(#_) #mainContent .coach-area-grid { display: block; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--mk-line); border-radius: 0; background: none; box-shadow: none; min-height: 0; }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > header { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; flex: 0 0 320px; min-width: 0; margin: 0; padding: 0; }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > header h3 { margin: 0; white-space: nowrap; }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > header .coach-area-open { padding: 0; border: 0; background: none; color: var(--mk-ink); font: inherit; box-shadow: none; text-align: left; }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > header .coach-area-state { margin-left: auto; }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > p { flex: 1 1 200px; margin: 0; font-size: 14px; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > footer { flex: 0 0 auto; margin: 0 0 0 auto; padding: 0; border: 0; font-size: 12.5px; color: var(--mk-ink-3); }
  /* Analytics: Trend-Karten flach */
  html:root:not(#_) #mainContent #resultsView :is(.analysis-trend-grid > *, .analysis-overview-group) { border-radius: 10px; box-shadow: none; }
  /* Phasen-Kacheln mit feiner Linie statt Fläche */
  html:root:not(#_) #mainContent .coach-phase-list > .coach-phase-card { border: 1px solid var(--mk-line); }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #mainContent .coach-quality-grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:root:not(#_) #mainContent .coach-quality-grid > * + * { border-left: 0; }
  html:root:not(#_) #mainContent .coach-quality-grid > :nth-child(even) { border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-quality-grid > :nth-child(n+3) { border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-area-grid > .coach-area-card > header { flex-basis: 100%; }
}

/* ---------- 1.8 Volle Breite ----------
   Inhalt nutzt die volle Breite; begrenzt bleiben nur Fließtext (70ch), das Profilformular (960 px) und Dialoge. */
@media screen {
  html:root:not(#_) #appShell > #mainContent { max-width: none; }
  html:root:not(#_) #mainContent > .view:not(#_) { max-width: none; width: auto; margin-inline: 0; }
  html:root:not(#_) #mainContent .view :is(.page-heading p, p.supporting, .card-heading p, .coach-section-heading p, .analysis-section-heading p, .builder-sequence-hint) { max-width: 70ch; }
  html:root:not(#_) #mainContent :is(.raceiq-table-scroll, .raceiq-detail-table, .analysis-table-wrap) { max-width: 100%; overflow-x: auto; }
}

/* 1.8 Handy-Kalender wie in der Vorlage: alle Tage der Woche untereinander statt Tagesleiste + gewählter Tag
   (ersetzt die bisherige Handy-Wochenansicht aus mobile-training.css; deren Logik bleibt unverändert im Code). */
@media screen and (max-width: 600px) {
  html:root:not(#_) #mobileCalendarDays { display: none !important; }
  html:root:not(#_) #mainContent #trainingTimeline.week-view .calendar-day:not(.mobile-selected-day) { display: block; }
  html:root:not(#_) #mainContent #trainingTimeline.week-view .calendar-day { padding: 12px 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent #trainingTimeline.week-view .calendar-day-heading { min-height: 32px; }
}

/* ---------- 2.1 Calendar-Werkzeuge: Races und Compare ----------
   Races nutzt den Panel-Platz von "Sessions" (#calendarSidebar[data-panel="races"], 340 px).
   Compare teilt die Kalenderfläche in zwei gleich breite Spalten; Kopf, Leiste und Raster
   beider Kalender liegen über subgrid in denselben drei Zeilen. */
@media screen {
  html:root:not(#_) #calendarToolStrip .calendar-tool-button { position: relative; }
  /* R6b: benannte dritte Art „Zählerpunkt“ (Lars 29.11.2026) – bewusst nicht Status-Chip, siehe Block „R6b Chips und Tags“ in prep-design.css */
  html:root:not(#_) #calendarToolStrip .calendar-tool-button > .calendar-tool-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; place-items: center;
    border: 2px solid var(--mk-surface); border-radius: 999px; background: var(--mk-ink); color: var(--mk-on-ink); font-size: 10px; font-weight: 700; line-height: 1;
  }
  html:root:not(#_) #appShell > #calendarSidebar[data-panel="races"] { width: 340px; padding: 12px 0 16px; overflow: auto; }
  html:root:not(#_) #appShell > #calendarSidebar[data-panel="races"] #calendarSidebarToggle { width: auto; margin: 0 14px 8px; }

  /* Panel "Races" */
  html:root:not(#_) #calendarRacesContent { display: flex; flex-direction: column; gap: 0; color: var(--mk-ink); }
  html:root:not(#_) .calendar-races-athlete { display: grid; gap: 6px; margin: 0; padding: 0 14px 14px; border-bottom: 1px solid var(--mk-line); }
  html:root:not(#_) .calendar-races-athlete small { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) :is(.calendar-races-athlete select, .calendar-races-search input, #compareCalendarSelect) {
    width: 100%; 
    font: inherit; font-size: 14px;
  }
  /* !important gegen "select { width: fit-content !important }" aus dem Theme */
  html:root:not(#_) #appShell #calendarSidebar .calendar-races-athlete select { width: 100% !important; max-width: none; justify-self: stretch; }
  html:root:not(#_) .calendar-next-race-card { display: flex; flex-direction: column; gap: 2px; margin: 14px 14px 4px; padding: 12px; background: var(--mk-ink); color: var(--mk-on-ink); }
  html:root:not(#_) #appShell #calendarSidebar .calendar-next-race-card small { font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--mk-on-ink) 80%, transparent); }
  html:root:not(#_) .calendar-next-race-card b { font-size: 15px; font-weight: 650; }
  html:root:not(#_) .calendar-next-race-card span { font-size: 12.5px; opacity: .85; }
  html:root:not(#_) .calendar-next-race-card strong { margin-top: 4px; font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
  html:root:not(#_) .calendar-races-section { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px 14px 6px; border: 0; background: none; }
  html:root:not(#_) .calendar-races-section h3 { display: flex; justify-content: space-between; gap: 8px; }
  html:root:not(#_) .calendar-races-search { display: block; margin: 0 0 4px; }
  html:root:not(#_) .calendar-race-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; }
  html:root:not(#_) .calendar-race-row:hover { background: var(--mk-sunk); }
  html:root:not(#_) .calendar-race-row.past { opacity: .6; }
  html:root:not(#_) .calendar-race-date { display: flex; flex-direction: column; align-items: center; padding: 4px 0; border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-surface); line-height: 1.1; }
  html:root:not(#_) .calendar-race-date small { font-size: 10px; font-weight: 650; letter-spacing: .04em; color: var(--mk-ink-3); }
  html:root:not(#_) .calendar-race-date b { font-size: 15px; font-weight: 650; }
  html:root:not(#_) .calendar-race-date span { font-size: 10px; color: var(--mk-ink-3); }
  html:root:not(#_) .calendar-race-name { display: flex; flex-direction: column; min-width: 0; }
  html:root:not(#_) .calendar-race-name .calendar-race-title { display: block; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--mk-ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
  html:root:not(#_) .calendar-race-name button.calendar-race-title { cursor: pointer; }
  html:root:not(#_) .calendar-race-name button.calendar-race-title:hover { text-decoration: underline; }
  html:root:not(#_) .calendar-race-name > span { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) .calendar-race-side { display: flex; align-items: center; gap: 4px; }
  html:root:not(#_) .calendar-race-count { white-space: nowrap; }
  html:root:not(#_) .calendar-race-count.soon { background: color-mix(in srgb, var(--mk-warn) 14%, var(--mk-surface)); color: var(--mk-warn); }
  html:root:not(#_) .calendar-race-remove { opacity: 0; }
  html:root:not(#_) .calendar-race-row:is(:hover, :focus-within) .calendar-race-remove { opacity: 1; }
  html:root:not(#_) .calendar-race-remove:hover { background: var(--mk-surface); color: var(--mk-ink); }
  html:root:not(#_) #calendarSidebar .calendar-race-assign { display: inline-flex; align-items: center; gap: 4px; height: 32px; min-height: 32px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  html:root:not(#_) .calendar-races-empty { margin: 0; padding: 6px; }
  html:root:not(#_) .calendar-races-foot { padding: 10px 14px 4px; }
  html:root:not(#_) #calendarSidebar .calendar-races-foot button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
  html:root:not(#_) .calendar-races-foot p { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--mk-ink-3); }

  /* Rennen im Calendar: schwarzer Chip (Woche) bzw. schwarzer Eintrag (Monat) */
  html:root:not(#_) #trainingTimeline .calendar-race-chip {
    display: flex; align-items: flex-start; gap: 6px; width: 100%; min-height: 0; margin: 0; padding: 6px 8px; border: 0; border-radius: 7px;
    background: var(--mk-ink); color: var(--mk-on-ink); box-shadow: none; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer;
  }
  html:root:not(#_) #trainingTimeline .calendar-race-chip svg { flex: none; width: 13px; height: 13px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  html:root:not(#_) #trainingTimeline .calendar-race-chip span { min-width: 0; overflow-wrap: anywhere; }
  html:root:not(#_) #trainingTimeline .calendar-race-chip.compact { padding: 3px 6px; font-size: 11.5px; }
  html:root:not(#_) #trainingTimeline .calendar-race-chip.compact svg { width: 11px; height: 11px; margin-top: 1px; }
  html:root:not(#_) .calendar-summary .calendar-next-race { white-space: nowrap; }
  html:root:not(#_) .calendar-summary .calendar-next-race strong { font-weight: 650; color: var(--mk-ink); }

  /* Rückgängig-Hinweis */
  html:root:not(#_) .calendar-undo-toast {
    position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 80; transform: translateX(-50%);
    display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: 10px;
    background: var(--mk-ink); color: var(--mk-on-ink); box-shadow: var(--mk-pop); font-size: 13.5px; font-weight: 600;
  }
  html:root:not(#_) .calendar-undo-toast button { padding: 0 12px; border: 1px solid color-mix(in srgb, var(--mk-on-ink) 40%, transparent); border-radius: 7px; background: transparent; color: var(--mk-on-ink); font: inherit; cursor: pointer; }
  html:root:not(#_) .calendar-undo-toast button:hover { background: color-mix(in srgb, var(--mk-on-ink) 14%, transparent); }

  /* Compare: Kopf und Leiste des zweiten Kalenders */
  html:root:not(#_) #trainingTimeline .calendar-compare-head { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; }
  html:root:not(#_) #trainingTimeline .calendar-compare-head h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
  html:root:not(#_) #compareCalendarSelect { width: auto; min-width: 0; max-width: 240px; flex: 0 1 240px; }
  html:root:not(#_) #trainingTimeline .calendar-compare-close { width: 34px; min-width: 34px; height: 34px; min-height: 34px; margin-left: auto; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--mk-ink-2); font-size: 20px; }
  html:root:not(#_) #trainingTimeline .calendar-compare-close:hover { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #trainingTimeline .calendar-compare-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; min-width: 0; margin: 0; }
  html:root:not(#_) #trainingTimeline .calendar-compare-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) #trainingTimeline .calendar-compare-hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  html:root:not(#_) #trainingTimeline .calendar-compare-bar .calendar-summary { margin: 0; }
  html:root:not(#_) #trainingTimeline .calendar-pane { display: flex; flex-direction: column; gap: inherit; min-width: 0; }
  /* Der zweite Kalender hat keine Bereichsmenüs, also keine Spalte dafür */
  html:root:not(#_) #trainingTimeline.has-range-actions .calendar-pane[data-calendar-pane="compare"] :is(.calendar-weekdays, .calendar-days) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  /* Handy: kein Compare */
  @media (max-width: 760px), (max-height:500px){
    html:root:not(#_) #calendarToolCompare { display: none !important; }
  }
}
@media screen and (min-width: 1100px) {
  html:root:not(#_) #appShell:has(#calendarView:not([hidden])):has(> #calendarToolStrip:not([hidden])):has(> #calendarSidebar[data-panel="races"]:not(.is-collapsed):not([hidden])) > #mainContent { margin-left: 388px !important; width: calc(100% - 388px) !important; }
  html:root:not(#_) #calendarView.calendar-compare-open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); column-gap: 0; row-gap: 12px; }
  html:root:not(#_) #calendarView.calendar-compare-open > .page-heading { grid-column: 1; grid-row: 1; min-width: 0; padding-right: 16px; }
  html:root:not(#_) #calendarView.calendar-compare-open > .calendar-toolbar { grid-column: 1; grid-row: 2; min-width: 0; padding-right: 16px; flex-wrap: wrap; }
  html:root:not(#_) #calendarView.calendar-compare-open > #trainingTimeline.calendar-compare {
    grid-column: 1 / -1; grid-row: 1 / 4; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; gap: inherit; min-width: 0; pointer-events: none;
  }
  html:root:not(#_) #trainingTimeline.calendar-compare > * { pointer-events: auto; }
  html:root:not(#_) #trainingTimeline.calendar-compare > .calendar-pane[data-calendar-pane="primary"] { grid-column: 1; grid-row: 3; padding-right: 16px; }
  html:root:not(#_) #trainingTimeline.calendar-compare > .calendar-compare-head { grid-column: 2; grid-row: 1; }
  html:root:not(#_) #trainingTimeline.calendar-compare > .calendar-compare-bar { grid-column: 2; grid-row: 2; }
  html:root:not(#_) #trainingTimeline.calendar-compare > .calendar-pane[data-calendar-pane="compare"] { grid-column: 2; grid-row: 3; }
  html:root:not(#_) #trainingTimeline.calendar-compare > :is(.calendar-compare-head, .calendar-compare-bar, .calendar-pane[data-calendar-pane="compare"]) { padding-left: 16px; border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #calendarView.calendar-compare-open > :is(.page-heading, .calendar-toolbar) { margin: 0; }
  html:root:not(#_) #calendarView.calendar-compare-open > .page-heading { flex-wrap: wrap; row-gap: 8px; }
  html:root:not(#_) #calendarView.calendar-compare-open > .page-heading,
  html:root:not(#_) #trainingTimeline.calendar-compare > .calendar-compare-head { align-self: center; }
}
/* Unter 1100 px stehen die Kalender untereinander */
@media screen and (min-width: 761px) and (max-width: 1099px) and (min-height:501px){
  html:root:not(#_) #trainingTimeline.calendar-compare { display: flex; flex-direction: column; gap: 12px; }
  html:root:not(#_) #trainingTimeline.calendar-compare > .calendar-compare-head { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--mk-line); }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  /* Races als Bottom Sheet in voller Breite wie "Sessions" */
  html:root:not(#_) #appShell > #calendarSidebar[data-panel="races"] { width: auto; padding-inline: 0; }
  html:root:not(#_) #trainingTimeline.calendar-compare > :is(.calendar-compare-head, .calendar-compare-bar, .calendar-pane[data-calendar-pane="compare"]) { display: none; }
}

/* ---------- 2.2 Session Builder: Umfang je Trainingsart ----------
   Nur Darstellung: Zusammenfassung des Umfangs mit geschätzter Dauer im Editor und als Zeile auf der Karte. */
@media screen {
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-block-choice > .builder-choice-dose { grid-column: 1 / -1; margin: 0; font-weight: 500; color: var(--mk-ink-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-block-choice > .builder-choice-dose:empty { display: none; }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-heading[hidden] { display: none; }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-summary {
    grid-column: 1 / -1; flex-direction: column; 
    border-radius: 8px; line-height: 1.4;
  }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-summary[hidden] { display: none; }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-summary > strong { font-size: 14px; font-variant-numeric: tabular-nums; }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-summary > strong[hidden] { display: none; }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-summary > span { color: var(--mk-ink-2); }
  html:root:not(#_) body :is(#onlinePlanDialog, #sessionDialog).planiq-builder .builder-dose-summary.builder-dose-pending > span { color: var(--mk-warn); font-weight: 500; }
  /* "Blockaktionen" sitzt bei allen Trainingsarten oben rechts neben dem Blocktitel (bisher nur bei BMX Track),
     statt über dem Feld "Blockart" zu liegen. */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .online-training-block:has(> .builder-block-menu) { position: static; }
}

/* ---------- 2.3 Exercises (Übungskatalog) ---------- */
@media screen {
  /* Menüsymbol: Liste/Klemmbrett (nicht die Hantel) */
  html:root #appShell #primaryNav a[data-view="exercises"] { --fliq81-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='3' width='15' height='18' rx='2'/%3E%3Cpath d='M8.5 8h7M8.5 12h7M8.5 16h4'/%3E%3C/svg%3E"); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-catalog { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-filters { display: grid; grid-template-columns: minmax(0, 1fr) 220px 220px auto; gap: 12px; align-items: end; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-filters label, html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-field { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--mk-ink-2); min-width: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) :is(.exercise-filters, .exercise-form) :is(input:not([type="checkbox"]), select, textarea) { width: 100% !important; max-width: none; font: inherit; justify-self: stretch; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) :is(.exercise-filters, .exercise-form) :is(input):disabled { background-color: var(--mk-sunk); color: var(--mk-ink); opacity: 1; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-archive-toggle { display: flex !important; align-items: center; gap: 8px; min-height: 36px; white-space: nowrap; }
  /* 2.9: Checkbox bleibt klein (Handy-Regeln vergrößerten sie auf Feldhöhe) */
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-archive-toggle { justify-self: start; justify-content: flex-start; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-archive-toggle input[type="checkbox"] { flex: none; width: 18px !important; height: 18px !important; min-width: 0; min-height: 0 !important; margin: 0; padding: 0; accent-color: var(--mk-ink); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-list-head h2 { margin: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-list-head p { margin: 4px 0 0; max-width: 640px; font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-list-actions { display: flex; gap: 4px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-list-actions .button { border: 0; }
  html:root:not(#_) :is(#exercisesView, #prepNewExerciseDialog) .exercise-group { overflow: hidden; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group + .exercise-group { margin-top: -6px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group h3 { margin: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 16px; border: 0; background: transparent; color: var(--mk-ink); font: inherit; font-size: 14px; font-weight: 650; text-align: left; cursor: pointer; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group-toggle::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--mk-ink-2); border-bottom: 1.6px solid var(--mk-ink-2); transform: rotate(-45deg); transition: transform .12s; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group-count { margin-left: auto; background: var(--mk-sunk); color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group-body { padding: 0 14px 8px; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-subhead { margin: 14px 4px 4px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 8px 4px; border: 0; border-top: 1px solid var(--mk-line); border-radius: 0; background: transparent; color: var(--mk-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: none; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-subhead + .exercise-row, html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-group-body > .exercise-row:first-child { border-top: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row:hover { background: var(--mk-sunk); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row-name { display: grid; min-width: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row-name strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row-name small, html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) :is(.exercise-row-equipment, .exercise-row-dose) { font-size: 12.5px; color: var(--mk-ink-2); overflow-wrap: anywhere; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row-dose { font-variant-numeric: tabular-nums; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-e1rm-chip { display: inline-block; background: var(--mk-sunk); color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-origin { justify-self: end; min-width: 64px; background: var(--mk-sunk); color: var(--mk-ink-2); text-align: center; white-space: nowrap; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-origin[data-origin="club"] { background: var(--mk-ink); color: var(--mk-on-ink); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-origin[data-origin="archived"] { background: transparent; border: 1px dashed var(--mk-line-strong); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-empty { margin: 0; padding: 20px; color: var(--mk-ink-2); }
  /* Detail */
  html:root:not(#_) #exercisesView:has(.exercise-detail-open) > .page-heading { display: none; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-head { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--mk-ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: none; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-title { flex: 1; min-width: 240px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-title p { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-title h2 { margin: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-title-input { width: 100%; padding: 0 0 4px !important; border: 0 !important; border-bottom: 1px solid var(--mk-line-strong) !important; border-radius: 0 !important; background: transparent !important; color: var(--mk-ink); font: inherit; font-size: 24px; font-weight: 650; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-readonly:empty { display: none; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-readonly { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--mk-sunk); font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-form { display: flex; flex-direction: column; gap: 0; margin: 0; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-form > section { padding: 18px 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-form > section:first-child { border-top: 0; padding-top: 4px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-form h3, html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-aside h3 { margin: 0 0 10px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-form section > p, html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-section-head p { margin: -6px 0 10px; font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-section-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; align-items: end; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-dose-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-field-wide { margin-bottom: 12px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-check { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--mk-control); border-radius: 8px; font-size: 13px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-save { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--mk-line); background: var(--mk-canvas); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-save p { margin: 0; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-aside { display: flex; flex-direction: column; gap: 12px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-aside > section { padding: 16px; border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-surface); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-aside p { margin: 0 0 6px; font-size: 14px; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-aside small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-link { padding: 0; border: 0; background: none; color: var(--mk-ink); font: inherit; text-decoration: underline; cursor: pointer; box-shadow: none; min-height: 0; }
}
@media screen and (max-width: 1099px) {
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-detail-body { grid-template-columns: minmax(0, 1fr); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row { grid-template-columns: minmax(0, 1fr) auto; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row :is(.exercise-row-equipment, .exercise-row-e1rm) { display: none; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-row-dose { grid-column: 1; grid-row: 2; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-origin { grid-row: 1 / span 2; grid-column: 2; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) .exercise-search { grid-column: 1 / -1; }
  html:root:not(#_) :is(#exercisesView, #sessionsView, #prepNewExerciseDialog) :is(.exercise-grid, .exercise-dose-grid) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- 2.4 Sessions (Session-Vorlagen) ---------- */
@media screen {
  html:root #appShell #primaryNav a[data-view="sessions"] { --fliq81-nav-icon: url("ci-8.1/icons/list-play.svg?v=a86bc677daa0"); }
  
  html:root:not(#_) #sessionsView .session-template-row { position: relative; display: flex; align-items: center; gap: 4px; }
  html:root:not(#_) #sessionsView .exercise-group-body > .session-template-row:first-child { border-top: 0; }
  html:root:not(#_) #sessionsView .session-template-open { display: grid; grid-template-columns: minmax(0, 2.4fr) 80px 90px minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; flex: 1; min-width: 0; min-height: 56px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; color: var(--mk-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: none; }
  html:root:not(#_) #sessionsView .session-template-open:hover { background: var(--mk-sunk); }
  html:root:not(#_) #sessionsView .session-template-name { display: grid; min-width: 0; }
  html:root:not(#_) #sessionsView .session-template-name strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
  html:root:not(#_) #sessionsView .session-template-name small, html:root:not(#_) #sessionsView :is(.session-template-duration, .session-template-blocks, .session-template-used, .session-template-owner) { font-size: 12.5px; color: var(--mk-ink-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #sessionsView .session-template-owner { justify-self: end; text-align: right; }
  html:root:not(#_) #sessionsView .session-template-menu { position: relative; flex: none; }
  html:root:not(#_) #sessionsView .session-template-menu > .icon-button:hover { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #sessionsView .session-template-actions { position: absolute; right: 0; top: 36px; z-index: 5; display: grid; gap: 2px; min-width: 210px; padding: 6px; border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-surface); box-shadow: var(--mk-pop); }
  html:root:not(#_) #sessionsView .session-template-actions > button { width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--mk-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; box-shadow: none; }
  html:root:not(#_) #sessionsView .session-template-actions > button:hover { background: var(--mk-sunk); }
  html:root:not(#_) #sessionsView .session-template-actions > [data-session-action="archive"] { color: var(--mk-danger); }
}
@media screen and (max-width: 1099px) {
  html:root:not(#_) #sessionsView .session-template-open { grid-template-columns: minmax(0, 1fr) auto; }
  html:root:not(#_) #sessionsView .session-template-open :is(.session-template-blocks, .session-template-owner) { display: none; }
  html:root:not(#_) #sessionsView .session-template-used { grid-column: 1; }
}

/* ---------- 2.7 Coachcenter: Kennzahlen als Filter, Hinweise, Wochenansicht ---------- */
@media screen {
  
  
  
  
  
  
  
  html:root:not(#_) #mainContent .coach-center-show .segmented-control { display: inline-flex; }
  html:root:not(#_) #mainContent .coach-center-show .segmented-control > button {   font: inherit; white-space: nowrap; cursor: pointer; }
  /* Je Sportler: Kennzahlen und Hinweise */
  /* Kennzahlen und Hinweise über die ganze Kartenbreite (das Kartenraster aus CI 8.1 hat feste Bereiche) */
  html:root:not(#_) #dashboardContent .coach-athlete-card > :is(.coach-athlete-metrics, .coach-flags) { grid-column: 1 / -1; }
  html:root:not(#_) #dashboardContent .coach-athlete-card > .coach-athlete-metrics { grid-row: 4; }
  html:root:not(#_) #dashboardContent .coach-athlete-card > .coach-flags { grid-row: 5; }
  html:root:not(#_) #dashboardContent .coach-athlete-card > .coach-athlete-body { grid-column: 1 / -1; }
  html:root:not(#_) #mainContent .coach-athlete-metrics { display: grid; }
  html:root:not(#_) #mainContent .coach-athlete-metrics > div { display: grid; gap: 1px; min-width: 0; }
  html:root:not(#_) #mainContent .coach-athlete-metrics span { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .coach-athlete-metrics strong { color: var(--mk-ink); font-variant-numeric: tabular-nums; }
  html:root:not(#_) #mainContent .coach-flags { display: flex; flex-wrap: wrap; gap: 6px; }
  html:root:not(#_) #mainContent .coach-flag { display: inline-flex; align-items: center; gap: 6px; }
  html:root:not(#_) #mainContent .coach-flag::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  html:root:not(#_) #mainContent .coach-flag[data-flag="needs-plan"] { background: color-mix(in srgb, var(--mk-warn) 14%, var(--mk-surface)); color: var(--mk-warn); }
  html:root:not(#_) #mainContent .coach-flag[data-flag="unfinished"] { background: color-mix(in srgb, var(--mk-danger) 12%, var(--mk-surface)); color: var(--mk-danger); }
  /* Wochenansicht */
  html:root:not(#_) #mainContent .coach-week-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
  html:root:not(#_) #mainContent .coach-week-nav { display: flex; align-items: center; gap: 4px; }
  html:root:not(#_) #mainContent .coach-week-nav .icon-button:hover:not(:disabled) { background: var(--mk-sunk); color: var(--mk-ink); }
  html:root:not(#_) #mainContent .coach-week-nav .icon-button:disabled { opacity: .35; }
  html:root:not(#_) #mainContent .coach-week-nav strong { margin-left: 6px; font-size: 14.5px; font-weight: 650; }
  html:root:not(#_) #mainContent .coach-week-nav .calendar-week-number { margin-left: 6px; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) #mainContent .coach-week-today { min-height: 30px; margin-left: 8px; padding: 0 10px; font-size: 13px; }
  html:root:not(#_) #mainContent .coach-week-summary { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent .coach-week-summary b { color: var(--mk-ink); }
  html:root:not(#_) #mainContent .coach-week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin-top: 8px; border: 1px solid var(--mk-line); border-radius: 10px; overflow: hidden; background: var(--mk-surface); }
  html:root:not(#_) #mainContent .coach-week-grid > .coach-week-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 112px; padding: 8px; border: 0; border-radius: 0; background: transparent; text-align: left; }
  html:root:not(#_) #mainContent .coach-week-grid > .coach-week-day + .coach-week-day { border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-week-day-head { display: flex; align-items: center; gap: 4px; }
  html:root:not(#_) #mainContent .coach-week-entries { flex-direction: column; gap: 6px; min-width: 0; }
  html:root:not(#_) #mainContent .coach-week-unit { gap: 1px; width: 100%; min-height: 0; padding: 6px 8px; border: 0; border-left: 3px solid var(--fliq-training-type-accent, var(--mk-ink-3)); border-radius: 6px; background: var(--fliq-training-type-tint, var(--mk-sunk)); color: var(--mk-ink); box-shadow: none; font: inherit; text-align: left; cursor: pointer; }
  html:root:not(#_) #mainContent .coach-week-unit > b { display: none; }
  html:root:not(#_) #mainContent .coach-week-unit > strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
  html:root:not(#_) #mainContent .coach-week-unit > small { font-size: 12px; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent .coach-week-unit > em { font-size: 11.5px; font-style: normal; font-weight: 600; }
  html:root:not(#_) #mainContent .coach-week-unit[data-state="documented"] > em { color: var(--mk-ok, var(--mk-ink-2)); }
  html:root:not(#_) #mainContent .coach-week-unit[data-state="missing"] > em { color: var(--mk-danger); }
  html:root:not(#_) #mainContent .coach-week-race { padding: 5px 8px; border-radius: 6px; background: var(--mk-ink); color: var(--mk-on-ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
  /* Leistungsdaten */
  html:root:not(#_) .coach-performance-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 20px 22px; border: 1px solid var(--mk-line); border-radius: 14px; background: var(--mk-surface); color: var(--mk-ink); overflow: auto; }
  html:root:not(#_) .coach-performance-dialog .dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0 0 12px; }
  html:root:not(#_) .coach-performance-dialog .dialog-heading h2 { margin: 0; font-size: 20px; font-weight: 650; }
  html:root:not(#_) .coach-performance-body { display: grid; gap: 14px; }
  html:root:not(#_) .coach-performance-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
}
@media screen and (max-width: 1099px) {
  html:root:not(#_) #mainContent .coach-week-grid > .coach-week-day:nth-child(-n+4) { border-top: 0; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #mainContent .coach-week-grid > .coach-week-day { min-height: 0; border-left: 0 !important; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #mainContent .coach-week-grid > .coach-week-day:first-child { border-top: 0; }
  html:root:not(#_) #mainContent .coach-center-show .segmented-control { flex-wrap: wrap; }
}

/* ---------- 2.8 Handy und Touch ---------- */
@media screen {
  /* Hinweis passt sich an: am PC "ziehen", auf Touch-Geräten bzw. unter 760 px "antippen" */
  html:root:not(#_) #calendarSidebar .sidebar-library-hint { margin: 0 0 8px; font-size: 12.5px; line-height: 1.4; color: var(--mk-ink-3); }
  html:root:not(#_) #calendarSidebar .sidebar-library-hint .hint-tap { display: none; }
  /* Leiste "„BMX“ einplanen: Tag antippen · Abbrechen" */
  html:root:not(#_) .calendar-pick-bar {
    position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px;
    border-radius: 12px; background: var(--mk-ink); color: var(--mk-on-ink); box-shadow: var(--mk-pop); font-size: 14px;
  }
  html:root:not(#_) .calendar-pick-bar strong { font-weight: 650; }
  html:root:not(#_) .calendar-pick-bar .button { min-height: 36px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--mk-on-ink) 40%, transparent); background: transparent; color: var(--mk-on-ink); box-shadow: none; }
  html:root:not(#_) body:has(.calendar-pick-bar) :is(.calendar-undo-toast, #newOnlineCalendarItemButton.page-primary) { display: none !important; }
  /* Beim Einplanen sind die Tage markiert */
  html:root:not(#_) #trainingTimeline.calendar-picking .calendar-day { cursor: copy; outline: 2px dashed color-mix(in srgb, var(--fliq-app-accent, var(--mk-ink)) 55%, transparent); outline-offset: -4px; border-radius: 8px; }
  html:root:not(#_) #trainingTimeline.calendar-picking .calendar-day:active { background: color-mix(in srgb, var(--fliq-app-accent, var(--mk-ink)) 10%, transparent); }
}
@media screen and (max-width: 760px), screen and (max-height:500px), screen and (hover: none) and (pointer: coarse){
  html:root:not(#_) #calendarSidebar .sidebar-library-hint .hint-drag { display: none; }
  html:root:not(#_) #calendarSidebar .sidebar-library-hint .hint-tap { display: inline; }
}
/* Touch ohne Maus: nichts darf nur per Hover sichtbar sein */
@media screen and (hover: none) {
  html:root:not(#_) #trainingTimeline .calendar-day-actions,
  html:root:not(#_) #trainingTimeline .calendar-day-add-unit,
  html:root:not(#_) #trainingTimeline .session-menu-button,
  html:root:not(#_) .calendar-race-remove,
  html:root:not(#_) #mainContent .coach-week-add { opacity: 1 !important; }
}

/* ---------- 2.6 Athletes (Planungseinstellungen je Sportler) ---------- */
@media screen {
  html:root:not(#_) #appShell #primaryNav a[data-view="plan-athletes"] { --fliq81-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18.5 14.2A6.5 6.5 0 0 1 21.5 20'/%3E%3C/svg%3E"); }
  html:root:not(#_) #planAthletesView .plan-athletes-intro { max-width: 640px; margin: -8px 0 16px; color: var(--mk-ink-2); }
  html:root:not(#_) #planAthletesView .plan-athletes-filters { display: grid; grid-template-columns: minmax(0, 360px); margin: 0 0 12px; }
  html:root:not(#_) #planAthletesView .exercise-search { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) #planAthletesView :is(input:not([type="checkbox"]), select) { width: 100% !important; max-width: none; min-height: 40px; padding: 6px 10px; border: 1px solid var(--mk-control); border-radius: 8px; background-color: var(--mk-surface); color: var(--mk-ink); font: inherit; font-size: 14px; box-shadow: none; }
  html:root:not(#_) #planAthletesView .exercise-empty { margin: 0; padding: 20px 4px; color: var(--mk-ink-2); }
  /* Liste: Sportler | Gruppe · Klasse | Trainingstage | Leistungswerte */
  html:root:not(#_) #planAthletesView .plan-athletes-table { border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #planAthletesView :is(.plan-athletes-head, .plan-athlete-row) { display: grid; grid-template-columns: 44px minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1.6fr) 24px; gap: 12px; align-items: center; }
  html:root:not(#_) #planAthletesView .plan-athletes-head { padding: 10px 4px; border-bottom: 1px solid var(--mk-line); font-size: 12px; font-weight: 600; color: var(--mk-ink-3); }
  html:root:not(#_) #planAthletesView .plan-athlete-row { width: 100%; min-height: 64px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--mk-line); border-radius: 0; background: transparent; color: var(--mk-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: none; }
  html:root:not(#_) #planAthletesView .plan-athlete-row:hover { background: var(--mk-sunk); }
  html:root:not(#_) #planAthletesView .plan-athlete-row:focus-visible { outline: 2px solid var(--mk-ink); outline-offset: -2px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--mk-line); border-radius: 50%; background: var(--mk-sunk); font-size: 11.5px; font-weight: 650; color: var(--mk-ink-2); }
  html:root:not(#_) #planAthletesView .plan-athlete-name { display: grid; min-width: 0; }
  html:root:not(#_) #planAthletesView .plan-athlete-name strong { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
  html:root:not(#_) #planAthletesView :is(.plan-athlete-name small, .plan-athlete-cell) { font-size: 13px; color: var(--mk-ink-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #planAthletesView .plan-athlete-cell[aria-busy="true"] { color: var(--mk-ink-3); }
  html:root:not(#_) #planAthletesView .plan-athlete-chevron { justify-self: end; font-size: 20px; color: var(--mk-ink-3); }
  /* Detail: vier Abschnitte */
  html:root:not(#_) #planAthletesView:has(.plan-athlete-detail) > .page-heading { display: none; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 8px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head .plan-athlete-avatar { width: 40px; height: 40px; font-size: 13px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head h2 { margin: 0; font-size: 22px; font-weight: 650; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head .eyebrow { margin: 0; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head .page-actions { margin-left: auto; display: flex; gap: 8px; }
  html:root:not(#_) #planAthletesView .plan-athlete-back { min-height: 36px; border-color: transparent; background: transparent; box-shadow: none; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-section { padding: 20px 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head + .plan-section { border-top: 0; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-section h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-section > .supporting { max-width: 640px; margin: 0 0 12px; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-section > .supporting.small { margin: 10px 0 0; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 220px)); gap: 14px 16px; margin-top: 12px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-grid-wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  /* Lange Übungsnamen in einer Zeile, damit die Felder auf einer Höhe bleiben */
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-grid-wide .plan-field > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-field { display: grid; gap: 6px; align-content: start; margin: 0; min-width: 0; font-size: 13px; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-field small { font-size: 12px; font-weight: 400; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-field small[data-source="manual"] { color: var(--mk-ink-2); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-field output { display: flex; align-items: center; min-height: 40px; padding: 6px 10px; border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-sunk); color: var(--mk-ink); font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-input-unit { position: relative; display: block; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-input-unit input { padding-right: 52px; font-variant-numeric: tabular-nums; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-input-unit em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12.5px; color: var(--mk-ink-3); pointer-events: none; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .link-button { padding: 0; border: 0; background: none; color: var(--mk-ink-2); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; box-shadow: none; min-height: 0; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-days { display: flex; flex-wrap: wrap; gap: 6px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-days button { min-width: 44px; min-height: 40px; padding: 0 12px; border: 1px solid var(--mk-control); border-radius: 8px; background: var(--mk-surface); color: var(--mk-ink); font: inherit; font-size: 13.5px; font-weight: 600; box-shadow: none; cursor: pointer; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-days button[aria-pressed="true"] { border-color: var(--mk-ink); background: var(--mk-ink); color: var(--mk-on-ink); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-add-metric { max-width: 260px; margin-top: 14px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-switches { display: grid; gap: 10px; margin-top: 16px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-switch { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-switch input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--mk-ink); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-switch span { display: grid; gap: 2px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-switch strong { font-size: 14px; font-weight: 550; color: var(--mk-ink); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-switch small { font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-soon { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--mk-line); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--mk-ink-3); vertical-align: 1px; }
}
@media screen and (max-width: 1099px) {
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-grid-wide { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #planAthletesView .plan-athletes-filters { grid-template-columns: minmax(0, 1fr); }
  html:root:not(#_) #planAthletesView .plan-athletes-head { display: none; }
  html:root:not(#_) #planAthletesView .plan-athlete-row { grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 2px 10px; padding: 10px 4px; }
  html:root:not(#_) #planAthletesView .plan-athlete-avatar { grid-row: 1 / span 4; }
  html:root:not(#_) #planAthletesView :is(.plan-athlete-name, .plan-athlete-cell) { grid-column: 2; }
  html:root:not(#_) #planAthletesView .plan-athlete-chevron { grid-column: 3; grid-row: 1 / span 4; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head .page-actions { margin-left: 0; width: 100%; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-athlete-detail-head .page-actions .button { flex: 1; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) :is(.plan-grid, .plan-grid-wide) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media screen {
  /* Exercises: rechte Spalte "e1RM der Sportler" */
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) .exercise-maxes { display: grid; gap: 0; margin: 0 0 10px; padding: 0; list-style: none; }
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) .exercise-maxes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 6px 0; border-top: 1px solid var(--mk-line); font-size: 13.5px; }
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) .exercise-maxes li:first-child { border-top: 0; }
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) .exercise-maxes span { overflow-wrap: anywhere; }
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) .exercise-maxes strong { font-variant-numeric: tabular-nums; }
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) .exercise-maxes small { grid-column: 1 / -1; }
  html:root:not(#_) :is(#exercisesView,#prepNewExerciseDialog) [data-exercise-maxes] .exercise-link { margin-top: 8px; }
}

/* ---------- Nachtrag Angleichung an den Prototyp: Felder 36 px, kleiner Pfeil ---------- */
@media screen and (min-width: 761px) and (min-height:501px){
  html:root:not(#_) body :is(#mainContent, #calendarSidebar, dialog) select:not([multiple]):not([size]) {
    text-overflow: ellipsis;
  }
}

/* ---------- Nachtrag Prototyp: Dialog "Kalendereintrag erstellen" ---------- */
@media screen {
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog { width: min(560px, calc(100vw - 32px)); }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-shell { display: flex; flex-direction: column; gap: 14px; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .dialog-heading > div { flex: 1; min-width: 0; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .dialog-heading [data-close-dialog]:hover { background: var(--mk-sunk); color: var(--mk-ink); }
  /* Umschalter Training / Event wie .seg */
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .builder-entry-tabs { display: inline-flex; margin: 0; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .builder-entry-tabs[hidden] { display: none !important; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .builder-entry-tab { flex: none; font: inherit; line-height: 1; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-context { margin: -6px 0 0; font-size: 13px; color: var(--mk-ink-2); }
  /* Gruppen ohne Überschrift, Knöpfe zweispaltig mit Farbpunkt */
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog [data-calendar-create-group] { display: block; margin: 0; padding: 0; border: 0; background: transparent; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog [data-calendar-create-group][hidden] { display: none !important; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog [data-calendar-create-group] > h3 { display: none; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-options button {
    display: flex; align-items: center; gap: 10px; min-height: 42px !important; 
    font: inherit; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
  }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-options button:hover { border-color: var(--mk-ink-3); background: var(--mk-sunk); }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-options button::before { content: ""; flex: none; width: 9px; height: 9px; border: 0; border-radius: 3px; background: var(--mk-ink-3); }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-options [data-create-from-library]::before {
    width: 16px; height: 16px; border-radius: 0; background: currentColor;
    -webkit-mask: url("ci-8.1/icons/library.svg?v=c56527b70d3e") center / contain no-repeat;
            mask: url("ci-8.1/icons/library.svg?v=c56527b70d3e") center / contain no-repeat;
  }
  /* "oder" und Kalendereinträge nur im Reiter Training */
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .builder-entry-shortcuts { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .builder-entry-shortcuts::before { content: attr(data-divider); display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mk-ink-3);
    background: linear-gradient(var(--mk-line), var(--mk-line)) left center / calc(50% - 22px) 1px no-repeat, linear-gradient(var(--mk-line), var(--mk-line)) right center / calc(50% - 22px) 1px no-repeat; justify-content: center; }
  html:root #calendarCreateDialog.builder-entry-dialog .builder-entry-shortcuts .calendar-create-options button::before { display: none; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog:has([data-calendar-create-group="event"]:not([hidden])) .builder-entry-shortcuts { display: none !important; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog [data-calendar-create-group="event"] .calendar-create-options button { white-space: nowrap; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .dialog-heading { flex-wrap: wrap; }
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .calendar-create-options { grid-template-columns: minmax(0, 1fr); }
}
@media screen {
  html:root:not(#_) #calendarCreateDialog.builder-entry-dialog .dialog-heading > .builder-entry-tabs { flex: none; width: auto; }
  /* Kalender: Woche/Monat/Jahr direkt hinter dem Zeitraum, Wochenmenü daneben; Abstände wie im Prototyp */
  html:root:not(#_) #calendarView:not(.calendar-compare-open) > .page-heading { margin-bottom: 12px; }
  html:root:not(#_) #calendarView:not(.calendar-compare-open) > .calendar-toolbar { row-gap: 4px; }
  html:root:not(#_) #calendarView .calendar-toolbar > .segmented-control { margin-left: 12px !important; margin-right: 0 !important; }
  html:root:not(#_) #calendarView .calendar-toolbar > .calendar-range-menu { margin-left: 0 !important; }
}

/* ---------- Nachtrag Prototyp: Coachcenter ---------- */
@media screen {
  /* Kopf: Name des Trainers als kleine Zeile über "Coachcenter", ohne Logo und ohne zweite Namenszeile */
  
  html:root:not(#_) #dashboardView .page-heading #dashboardEyebrow.coach-account-eyebrow { display: block !important; text-transform: none; }
  
  html:root:not(#_) #mainContent .coach-center-shell { gap: 24px; }
  

  /* Karte: eine Kopfzeile wie im Prototyp (Sportler · Kennzahlen · Aktionen), darunter Hinweise */
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card { display: flex; flex-direction: column; gap: 0; padding: 0; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card > .coach-athlete-head {
    display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(0, 2fr) auto; gap: 16px; align-items: center; margin: 0; padding: 14px 16px; border: 0;
  }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-copy { min-width: 0; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-copy h2 { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-copy p { margin: 0; font-size: 12.5px; color: var(--mk-ink-3); overflow-wrap: anywhere; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-metrics { grid-row: auto; grid-column: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 16px; margin: 0; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-metrics strong { font-size: 15px; font-weight: 600; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0; padding: 0; grid-row: auto; grid-column: auto; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-actions :is(.button, button) { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-actions .button-icon { width: 15px; height: 15px; }
  
  
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-actions .coach-athlete-details {
    width: auto; min-width: 0; border: 1px solid var(--mk-control); border-radius: 8px; background: var(--mk-surface); color: var(--mk-ink);
  }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-actions .coach-athlete-details[aria-expanded="true"] { background: var(--mk-sunk); }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-chevron { width: 7px; height: 7px; margin: -3px 2px 0 2px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-details[aria-expanded="true"] .coach-athlete-chevron { margin-top: 3px; transform: rotate(-135deg); }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-actions .coach-athlete-favorite { justify-content: center; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-actions .coach-athlete-favorite.is-favorite { color: var(--mk-ink); }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card > .coach-flags { grid-row: auto; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 16px 14px; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card > .coach-athlete-body { grid-row: auto; margin: 0; padding: 12px 16px 16px; border-top: 1px solid var(--mk-line); }
  /* Tageswerte im aufklappbaren Teil */
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-daily { align-items: center; font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-daily .daily-training-state { display: flex; gap: 16px; margin: 0; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-daily .daily-training-state-context { flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-daily :is(.daily-training-state-note, .coach-athlete-compact-task) { display: block; }
}
@media screen and (max-width: 1279px) {
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-metrics { grid-column: 1 / -1; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card > .coach-athlete-head { grid-template-columns: minmax(0, 1fr); }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-metrics { grid-row: auto; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-actions { flex-wrap: wrap; }
}
@media screen {
  /* Coachcenter: Abstände 24 px zwischen Kennzahlen, Filter und Liste; Karteninhalt linksbündig */
  html:root:not(#_) #mainContent .coach-center-shell { row-gap: 24px; }
  html:root:not(#_) #mainContent .coach-center-shell > :is(.coach-center-hero, .coach-center-filter, .coach-center-athletes) { margin: 0; }
  
  html:root:not(#_) #mainContent .coach-center-shell > .coach-search-count { margin: 0 0 9px; }
  
  html:root:not(#_) #mainContent .coach-center-show { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--mk-ink-2); }
  /* Suche mit Lupe wie im Prototyp */
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card { align-items: stretch; text-align: left; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card > .coach-athlete-head { width: 100%; box-sizing: border-box; justify-items: stretch; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-identity { justify-content: flex-start; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-copy { display: block; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-head > .coach-athlete-actions { justify-content: flex-end; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-card > .coach-flags { justify-content: flex-start; width: 100%; box-sizing: border-box; }
  html:root:not(#_) #mainContent #dashboardContent .coach-athlete-avatar { flex: none; width: 40px; height: 40px; }
}
@media screen {
  html:root:not(#_) #mainContent #dashboardContent .coach-center-athletes { display: flex; flex-direction: column; gap: 10px; }
  html:root:not(#_) #mainContent #dashboardContent .coach-center-athletes > .coach-athlete-card { margin: 0; }
}

/* ---------- Nachtrag Prototyp: Session Builder kompakt (Felder 36 px / 14 px, Beschriftung 12,5 px) ---------- */
@media screen and (min-width: 761px) and (min-height:501px){
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm label:not(.builder-title-field):not(#_) { font-size: 12.5px !important; line-height: 1.35; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm label:not(.builder-title-field):not(#_) > span { font-size: 12.5px !important; line-height: 1.35; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm select:not(#_) {
    padding-right: 30px !important; text-overflow: ellipsis;
  }
  html:root body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor :is(.gym-add-set, .gym-remove-set) {   }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor-title:not(#_) { font-size: 20px !important; line-height: 1.3 !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice strong:not(#_) { line-height: 1.35; }
}

/* Nachtrag Prototyp: kleiner gefüllter Pfeil in allen Auswahlfeldern (ersetzt das Symbol aus CI 8.1) */
html:root { --fliq81-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5h7L8 10z' fill='%235B6065'/%3E%3C/svg%3E"); }
html:root:is([data-theme="dark"], [data-fliq-theme="dark"]) { --fliq81-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5h7L8 10z' fill='%23A8B0AD'/%3E%3C/svg%3E"); }
@media screen and (min-width: 761px) and (min-height:501px){
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-editor .builder-block-menu > summary:not(#_) { line-height: 1 !important; }
}
@media screen and (min-width: 761px) and (min-height:501px){
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice :is(.builder-choice-meta, .builder-choice-status, .builder-choice-dose):not(#_) { font-size: 12.5px !important; line-height: 1.4 !important; }
}

/* ---------- 2.5b Blocks (Vorlagen für Strength, Sprint, Gate) ---------- */
@media screen {
  html:root:not(#_) #appShell #primaryNav a[data-view="blocks"] { --fliq81-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m12 4 9 4.5-9 4.5-9-4.5z'/%3E%3Cpath d='m3 12.5 9 4.5 9-4.5M3 16.5 12 21l9-4.5'/%3E%3C/svg%3E"); }
  html:root:not(#_) #blocksView:has(.block-editor) > .page-heading { display: none; }
  html:root:not(#_) #blocksView .supporting { margin: 2px 0 12px; }
  html:root:not(#_) #blocksView .block-note { margin: 8px 0 0; font-size: 12.5px; color: var(--mk-ink-3); }
  /* Typ-Kacheln */
  /* Liste */
  html:root:not(#_) #blocksView .block-row { position: relative; display: flex; align-items: center; gap: 4px; }
  html:root:not(#_) #blocksView .block-row-open { display: grid;  gap: 14px; align-items: center; flex: 1; min-width: 0; min-height: 64px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; color: var(--mk-ink); font: inherit; text-align: left; box-shadow: none; cursor: pointer; }
  html:root:not(#_) #blocksView .block-row-open:hover { background: var(--mk-sunk); }
  html:root:not(#_) #blocksView .block-row-name { display: grid; min-width: 0; }
  html:root:not(#_) #blocksView .block-row-name strong { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
  html:root:not(#_) #blocksView :is(.block-row-name small, .block-row-cell) { font-size: 13px; color: var(--mk-ink-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #blocksView .block-status { justify-self: end; white-space: nowrap; }
  html:root:not(#_) #blocksView .block-status[data-status="active"] {   }
  html:root:not(#_) #blocksView .block-row-menu { position: relative; }
  html:root:not(#_) #blocksView .block-row-actions { position: absolute; top: 36px; right: 0; left: auto; min-width: 180px; z-index: 20; }
  html:root:not(#_) #blocksView .block-row-actions > button { width: 100%; justify-content: flex-start; min-height: 36px; padding: 8px 10px; border: 0; background: transparent; color: var(--mk-ink); box-shadow: none; text-align: left; }
  html:root:not(#_) #blocksView .block-row-actions > button.danger { color: var(--mk-danger); }
  /* Editor */
  html:root:not(#_) #blocksView .block-editor-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 8px; }
  html:root:not(#_) #blocksView .block-title { flex: 1 1 320px; min-width: 0; }
  html:root:not(#_) #blocksView .block-title .eyebrow { margin: 0; }
  html:root:not(#_) #blocksView .block-title input { width: 100%; background: transparent !important; }
  html:root:not(#_) #blocksView .block-title input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--mk-ink); }
  html:root:not(#_) #blocksView .block-section { padding: 22px 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #blocksView .block-editor-head + div > .block-section:first-child { border-top: 0; }
  html:root:not(#_) #blocksView .block-section h3 { margin: 0 0 2px; }
  html:root:not(#_) #blocksView .block-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
  html:root:not(#_) #blocksView .block-field { display: grid; gap: 5px; align-content: start; margin: 0; min-width: 0; font-size: 12.5px; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) #blocksView .block-frame, html:root:not(#_) #blocksView .block-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; margin: 12px 0 0; }
  html:root:not(#_) #blocksView .block-frame > .block-field:first-child { width: 170px; }
  html:root:not(#_) #blocksView .block-seg { display: inline-flex; }
  html:root:not(#_) #blocksView .block-seg > button { font: inherit; }
  html:root:not(#_) #blocksView .block-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 2px; }
  html:root:not(#_) #blocksView .block-goals > button { display: grid; align-content: start; gap: 4px; min-height: 86px; border: 1px solid var(--mk-line); background: var(--mk-surface); color: var(--mk-ink); font: inherit; text-align: left; box-shadow: none; }
  html:root:not(#_) #blocksView .block-goals > button[aria-pressed="true"] { border: 2px solid var(--mk-ink); }
  html:root:not(#_) #blocksView .block-goals strong { font-size: 13.5px; font-weight: 650; }
  html:root:not(#_) #blocksView .block-goals small { font-size: 12px; line-height: 1.4; color: var(--mk-ink-2); }
  html:root:not(#_) #blocksView .block-frame + .block-note + .block-field { margin-top: 14px; }
  /* Einheiten (02.12.2026, Lars: Block übersichtlicher): je Übung eine Zeile mit Vorgabe, aufklappen zum Ändern */
  html:root:not(#_) #blocksView .block-steps { display: inline-flex; max-width: 100%; margin: 4px 0 2px; }
  html[data-prep-ui]:root:not(#_):not(#__) #blocksView .block-steps > button { flex: none; width: auto !important; max-width: none; white-space: nowrap; }
  html:root:not(#_) #blocksView .block-step-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, currentColor 16%, transparent); font-size: 11px; line-height: 1; }
  html:root:not(#_) #blocksView .block-coverage { margin: 0 0 12px; font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) #blocksView .block-unit { display: grid; gap: 10px; align-content: start; min-width: 0; padding: 16px; border: 1px solid var(--mk-line); border-radius: 12px; background: var(--mk-surface); }
  html:root:not(#_) #blocksView .block-unit-head { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  html:root:not(#_) #blocksView .block-unit-no { font-size: 12.5px; font-weight: 650; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-unit-head input[data-unit-field="name"] { width: 100% !important; max-width: none; font-weight: 600 !important; }
  html:root:not(#_) #blocksView .block-unit-when { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  html:root:not(#_) #appShell #blocksView .block-unit-when :is(select, input) { width: auto !important; max-width: 100%; }
  html:root:not(#_) #blocksView .block-unit-rest.block-unit-minutes { margin-left: 0; }
  html:root:not(#_) #blocksView .block-unit-minutes { margin-left: auto; font-size: 12.5px; color: var(--mk-ink-3); white-space: nowrap; }
  html:root:not(#_) #blocksView .block-role { margin: 4px 0 -4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-items { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--mk-line); border-radius: 8px; overflow: hidden; }
  html:root:not(#_) #blocksView .block-item + .block-item { border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #blocksView .block-item-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 0; background: transparent; color: var(--mk-ink); font: inherit; font-size: 13.5px; text-align: left; box-shadow: none; }
  html:root:not(#_) #blocksView button.block-item-toggle { cursor: pointer; }
  html:root:not(#_) #blocksView div.block-item-toggle { grid-template-columns: minmax(0, 1fr) auto; }
  html:root:not(#_) #blocksView .block-item-name { min-width: 0; font-weight: 500; overflow-wrap: break-word; }
  html:root:not(#_) #blocksView .block-item-dose { font-size: 13px; color: var(--mk-ink-2); font-variant-numeric: tabular-nums; text-align: right; }
  html:root:not(#_) #blocksView .block-item-toggle .prep-menu-chevron { justify-self: end; }
  html:root:not(#_) #blocksView .block-item.open .block-item-toggle .prep-menu-chevron { transform: rotate(180deg); }
  html:root:not(#_) #blocksView .block-item-panel { display: grid; gap: 12px; padding: 4px 12px 12px; }
  html:root:not(#_) #blocksView .block-item-panel .segmented-control { justify-self: start; max-width: 100%; }
  html:root:not(#_) #appShell #blocksView :is(.block-item-panel, .block-add-panel) select { width: 100% !important; max-width: none; }
  html:root:not(#_) #blocksView .block-item-actions { display: flex; justify-content: flex-start; margin-left: -12px; }
  html:root:not(#_) #blocksView .block-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  html:root:not(#_) #blocksView .block-suggestions > span { flex: 1 0 100%; font-size: 12.5px; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) #blocksView .block-add { justify-self: start; }
  html:root:not(#_) #blocksView .block-plus { margin-right: 6px; color: var(--prep-accent); font-weight: 700; }
  html:root:not(#_) #blocksView .block-add-panel { display: grid; gap: 12px; padding: 12px; border-radius: 8px; background: var(--mk-sunk); }
  html:root:not(#_) #blocksView .block-unit-empty { margin: 0; font-size: 13px; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-unit-patterns { margin: 0; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-menu-title { margin: 0; padding: 6px 12px; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-unit-actions { min-width: 220px; }
  @media (hover: hover) { html:root:not(#_) #blocksView button.block-item-toggle:hover { background: var(--prep-hover); } }
  html[data-prep-ui]:not([data-prep-input="pointer"]):root #blocksView .block-item-toggle:focus-visible { outline: 2px solid var(--prep-accent); outline-offset: -2px; }
  html:root:not(#_) #blocksView .block-units { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
  html:root:not(#_) #blocksView .link-button { padding: 4px 0; border: 0; background: none; color: var(--mk-ink-2); font: inherit; font-size: 13px; font-weight: 600; box-shadow: none; cursor: pointer; min-height: 0; }
  html:root:not(#_) #blocksView .block-range { display: flex; align-items: center; gap: 6px; }
  html:root:not(#_) #blocksView .block-range input { text-align: center; }
  /* Wochentabelle */
  html:root:not(#_) #blocksView .block-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--mk-line); border-radius: 12px; background: var(--mk-surface); }
  html:root:not(#_) #blocksView .block-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
  html:root:not(#_) #blocksView .block-table th { padding: 8px 6px; font-size: 12px; font-weight: 600; color: var(--mk-ink-3); text-align: center; white-space: nowrap; }
  html:root:not(#_) #blocksView .block-table thead tr:first-child th { padding-bottom: 0; color: var(--mk-ink-2); text-align: left; }
  html:root:not(#_) #blocksView .block-table td { padding: 5px 6px; text-align: center; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #blocksView .block-table tbody th { border-top: 1px solid var(--mk-line); color: var(--mk-ink); font-size: 13px; }
  html:root:not(#_) #blocksView .block-table :is(th, td).left { text-align: left; }
  html:root:not(#_) #blocksView .block-table .group { border-left: 1px solid var(--mk-line); }
  html:root:not(#_) #blocksView .block-table td.phase { color: var(--mk-ink-2); white-space: nowrap; }
  html:root:not(#_) #blocksView .block-table td.reserve { color: var(--mk-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #blocksView .block-table tr.deload td, html:root:not(#_) #blocksView .block-table tr.deload th { background: var(--mk-sunk); }
  html:root:not(#_) #blocksView .block-table input { width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #blocksView .block-table select { width: auto; min-width: 150px; }
  html:root:not(#_) #blocksView .block-table :is(input, select).edited { border-color: var(--mk-ink); box-shadow: inset 0 0 0 1px var(--mk-ink); }
  html:root:not(#_) #blocksView .block-mini { display: inline-grid; gap: 3px; width: 70px; vertical-align: middle; }
  html:root:not(#_) #blocksView .block-mini i { display: block; height: 3px; border-radius: 2px; background: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-mini i.volume { background: var(--mk-line-strong); }
  html:root:not(#_) #blocksView .block-flag { display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-radius: 50%; background: var(--mk-ok, #1F8A65); vertical-align: middle; }
  html:root:not(#_) #blocksView .block-flag.warn { background: var(--mk-warn); }
  /* Prüfung */
  html:root:not(#_) #blocksView .block-checks { margin: 4px 0 0; padding: 0; list-style: none; }
  html:root:not(#_) #blocksView .block-checks li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 9px 2px; border-bottom: 1px solid var(--mk-line); font-size: 13.5px; }
  html:root:not(#_) #blocksView .block-checks li i { width: 7px; height: 7px; border-radius: 50%; background: var(--mk-ok, #1F8A65); }
  html:root:not(#_) #blocksView .block-checks li[data-level="warn"] i { background: var(--mk-warn); }
  html:root:not(#_) #blocksView .block-checks li[data-level="info"] i { background: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-checks li small { font-size: 12px; color: var(--mk-ink-3); white-space: nowrap; }
  /* Wochenansicht */
  html:root:not(#_) #blocksView .block-week-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
  html:root:not(#_) #blocksView .block-preview { width: 230px; }
  html:root:not(#_) #blocksView .block-weeks { display: flex; flex-wrap: wrap; gap: 4px; }
  html:root:not(#_) #blocksView .block-weeks > button { min-width: 38px; font: inherit; }
  html:root:not(#_) #blocksView .block-week-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 14px; }
  html:root:not(#_) #blocksView .block-week-card { border: 1px solid var(--mk-line); border-left: 3px solid var(--fliq-training-type-accent, var(--mk-ink)); }
  html:root:not(#_) #blocksView .block-week-card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 6px; }
  html:root:not(#_) #blocksView .block-week-card header strong { font-size: 14px; font-weight: 650; }
  html:root:not(#_) #blocksView .block-week-card header small { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-week-card header .minutes { margin-left: auto; }
  html:root:not(#_) #blocksView .block-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 8px 0; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #blocksView .block-line strong { font-size: 13.5px; font-weight: 600; }
  html:root:not(#_) #blocksView .block-line .rx { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
  html:root:not(#_) #blocksView .block-line small { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-rules { margin-top: 8px; border: 1px solid var(--mk-line); border-radius: 12px; background: var(--mk-surface); }
  html:root:not(#_) #blocksView .block-rules summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; font-weight: 650; cursor: pointer; }
  html:root:not(#_) #blocksView .block-rules summary small { font-weight: 400; color: var(--mk-ink-3); }
  html:root:not(#_) #blocksView .block-rules > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; padding: 0 16px 16px; }
  html:root:not(#_) #blocksView .block-rules h4 { margin: 0 0 6px; font-size: 13.5px; }
  html:root:not(#_) #blocksView .block-rules ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) #blocksView .block-rules > div > .block-note { grid-column: 1 / -1; }
}
@media screen and (max-width: 1099px) {
  html:root #blocksView .block-row-open {  }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #blocksView :is(.block-units, .block-week-cards) { grid-template-columns: minmax(0, 1fr); }
  html:root:not(#_) #blocksView .block-preview { width: 100%; }
}
@media screen {
  /* Felder im Blocks-Editor füllen ihre Spalte (Theme setzt sonst fit-content) */
  html:root:not(#_) #appShell #blocksView :is(.block-frame, .block-controls, .block-preview) :is(select, input:not([type="checkbox"])) { width: 100% !important; max-width: none; justify-self: stretch; }
  html:root:not(#_) #appShell #blocksView .block-table select { width: auto !important; }
  html:root:not(#_) #appShell #blocksView .block-title input { border: 0 !important; }
  html:root:not(#_) #appShell #blocksView .block-title input:focus { box-shadow: inset 0 -2px 0 var(--mk-ink) !important; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
}

/* ---------- 2.5c Blocks im Calendar: Ladedialog, Panel, Leiste über der Woche ---------- */
@media screen {
  html:root:not(#_) dialog.block-load-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
  html:root dialog.block-load-dialog::backdrop { background: rgba(10, 12, 12, .45); }
  html:root:not(#_) .block-load-shell { display: flex; flex-direction: column; gap: 14px; }
  html:root:not(#_) .block-load-field { display: grid; gap: 5px; margin: 0; font-size: 12.5px; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) .block-load-field small { font-size: 12px; font-weight: 400; color: var(--mk-ink-3); }
  html:root:not(#_) .block-load-seg { display: flex; }
  html:root:not(#_) .block-load-seg > button { flex: 1; font: inherit; }
  html:root:not(#_) .block-load-summary { margin: 0; font-size: 14px; color: var(--mk-ink-2); }
  html:root:not(#_) .block-load-summary strong { color: var(--mk-ink); }
  html:root:not(#_) .block-load-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--mk-ink-3); }
  html:root:not(#_) .block-load-dates { max-height: 300px; margin: 0; padding: 0; overflow: auto; list-style: none; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) .block-load-dates li { display: grid; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--mk-line); font-size: 13.5px; font-variant-numeric: tabular-nums; }
  html:root:not(#_) .block-load-dates li > small { font-size: 12px; color: var(--mk-ink-3); }
  /* Panel */
  html:root:not(#_) #calendarBlocksContent { display: grid; gap: 14px; padding: 4px 14px 16px; }
  html:root:not(#_) #calendarBlocksContent .calendar-blocks-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--mk-ink-3); }
  html:root:not(#_) #calendarBlocksContent .calendar-blocks-group h3 { display: flex; justify-content: space-between; margin: 0 0 6px; }
  html:root:not(#_) #calendarBlocksContent .calendar-blocks-group h3 b { font-weight: 600; }
  html:root:not(#_) #calendarBlocksContent .calendar-blocks-empty { margin: 0; padding: 6px 4px; }
  html:root:not(#_) #calendarBlocksContent .calendar-block-row { display: grid; gap: 10px; align-items: center; padding: 8px 4px; border-radius: 8px; }
  html:root:not(#_) #calendarBlocksContent .calendar-block-row[data-block-template] { cursor: grab; }
  html:root:not(#_) #calendarBlocksContent .calendar-block-row[data-block-template]:hover { background: var(--mk-sunk); }
  html:root:not(#_) #calendarBlocksContent .calendar-block-row[data-loaded-block] { grid-template-columns: 32px minmax(0, 1fr); }
  html:root:not(#_) #calendarBlocksContent .calendar-block-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;   }
  html:root:not(#_) #calendarBlocksContent .calendar-block-icon svg { width: 18px; height: 18px; }
  html:root:not(#_) #calendarBlocksContent .calendar-block-name { display: grid; min-width: 0; }
  html:root:not(#_) #calendarBlocksContent .calendar-block-name strong { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
  html:root:not(#_) #calendarBlocksContent .calendar-block-name small { font-size: 12px; color: var(--mk-ink-3); }
  html:root:not(#_) #calendarBlocksContent .calendar-block-actions { grid-column: 2; display: flex; gap: 6px; }
  html:root:not(#_) #calendarBlocksContent :is(.calendar-block-actions .button, .calendar-block-week) { white-space: nowrap; }
  html:root #calendarBlocksContent .calendar-blocks-create {       }
  /* Leiste über der Woche */
  html:root:not(#_) #trainingTimeline .calendar-block-bars { display: grid; gap: 6px; margin: 0 0 10px; }
  html:root:not(#_) #trainingTimeline .calendar-block-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px 8px 14px; border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-surface); font-size: 13px; color: var(--mk-ink-2); }
  html:root:not(#_) #trainingTimeline .calendar-block-bar strong { color: var(--mk-ink); font-weight: 650; }
  html:root:not(#_) #trainingTimeline .calendar-block-dot { width: 9px; height: 9px; border-radius: 3px;  }
  html:root:not(#_) #trainingTimeline .calendar-block-progress { display: inline-block; width: 120px; height: 5px; border-radius: 3px; background: var(--mk-sunk); overflow: hidden; }
  html:root:not(#_) #trainingTimeline .calendar-block-progress i { display: block; height: 100%; border-radius: 3px; background: var(--fliq-training-type-accent, var(--mk-ink)); }
  html:root:not(#_) #trainingTimeline .calendar-block-bar .button { margin-left: auto; height: 30px; min-height: 30px; padding: 0 10px; font-size: 12.5px; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #trainingTimeline .calendar-block-progress { width: 80px; }
}
@media screen {
  /* "Sportler sieht seinen Kalender": Auswahl in Athletes */
  html:root:not(#_) #planAthletesView .plan-calendar-visibility { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--mk-line); }
  html:root:not(#_) #planAthletesView .plan-calendar-visibility .plan-grid { margin-top: 0; }
}
@media screen and (min-width: 1000px) {
  /* Session Builder (Wunsch Lars): nur Titel und Aktionen bleiben stehen, Kopfzeile (Kalender, Datum, Zeit, Ort, Track,
     Coach-Hinweis) und Editor scrollen gemeinsam, damit mehr Platz für das Training bleibt. Der Trainingsablauf bleibt
     als eigene Spalte stehen (sticky) und scrollt für sich, damit der gewählte Block beim Klicken nicht verloren geht. */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm > .dialog-heading { top: 0; z-index: 6; background: var(--mk-surface, #fff); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm > .dialog-actions { bottom: 0; z-index: 6; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-workspace.builder-desktop { overflow: visible; align-items: start; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-workspace.builder-desktop > .builder-outline { position: sticky; top: var(--builder-head, 86px); max-height: var(--builder-room, calc(100dvh - 240px)); overflow-y: auto; overscroll-behavior: contain; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-workspace.builder-desktop > .builder-editor { overflow: visible; max-height: none; min-height: var(--builder-room, calc(100dvh - 240px)); }
}
@media screen {
  /* Session Builder: Coach-Hinweis zur ganzen Session unter der Kopfzeile */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta > .online-plan-session-notes { grid-column: 1 / -1; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-session-notes > summary small { margin-left: 6px; }
  
}
@media screen {
  /* Session Builder: Startzeit oder Reihenfolge ("Session 1, 2 …") */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-start { display: grid; min-width: 0; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-start-head { align-items: center; gap: 6px; }
  html:root:not(#_) #appShell ~ dialog#onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-start-head select[name="timeMode"]{ width: auto !important; border: 0 !important; background-color: transparent !important; box-shadow: none !important; cursor: pointer; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-start > :is(input, select)[hidden] { display: none !important; }
}
@media screen {
  /* Startzeit/Reihenfolge: Kopfzeile so hoch wie die anderen Feldbeschriftungen, damit die Felder auf einer Linie liegen */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta .online-plan-start { gap: 4px; align-content: start; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta .online-plan-start-head { height: 16.875px; overflow: visible; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta .online-plan-start-head select#onlinePlanTimeMode:not(#_) { height: 22px !important; min-height: 0 !important; max-height: 22px; margin: -3px 0; line-height: 20px !important; padding: 0 20px 0 4px !important; background-position: right 2px center !important; }
}
@media screen {
  /* Session Builder: Drag & Drop im Ablauf, Übungen eines Super-Sets */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-block-choice[draggable="true"] { cursor: grab; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-superset-members { display: grid; gap: 3px; margin: -4px 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--mk-line); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-superset-member { position: relative; padding: 4px 8px 4px 20px; border: 1px solid var(--mk-line); border-radius: 6px; background: var(--mk-surface); font-size: 12.5px; color: var(--mk-ink-2); cursor: grab; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-superset-member::before { content: "⋮⋮"; position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font-size: 10px; letter-spacing: -2px; color: var(--mk-ink-3); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-superset-member.active { border-color: var(--mk-ink); color: var(--mk-ink); font-weight: 600; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-dragging { opacity: .45; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-drop-before { box-shadow: 0 -3px 0 0 var(--mk-ink) !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-drop-after { box-shadow: 0 3px 0 0 var(--mk-ink) !important; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-drop-into { outline: 2px dashed var(--mk-ink); outline-offset: 2px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-phase-rows.builder-drop-after { box-shadow: none !important; outline: 1px dashed var(--mk-line); }
}
@media screen {
  /* Session Builder: Gate-/Track-Effort mit eigenen Werten je Satz (Tabelle ab 2 Sätzen) */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-table { display: grid; gap: 6px; margin-top: 10px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-table[hidden] { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm :is(.online-track-set-head, .online-track-set-row) { display: grid; grid-template-columns: 44px minmax(0, 120px) minmax(0, 140px); gap: 8px; align-items: center; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-gate :is(.online-track-set-head, .online-track-set-row) { grid-template-columns: 44px minmax(0, 120px) minmax(0, 140px) minmax(0, 1fr); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-head { font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-head [hidden], html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-row [hidden] { display: none; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-no { font-weight: 600; color: var(--mk-ink-2); text-align: center; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-track-set-row :is(input, select) { width: 100% !important; min-width: 0; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  /* Handy: Startzeit/Reihenfolge so beschriftet wie die anderen Felder (16 px), Feld auf gleicher Höhe */
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta .online-plan-start-head { height: 22px; }
}
/* Gym: variable Spaltenköpfe. Spalten der Tabelle kommen aus --gym-cols (planiq-gym-prescription.js). */
html:root:not(#_) #onlinePlanDialog .gym-structured-layout :is(.gym-set-table-header, .gym-set-row) { grid-template-columns: var(--gym-cols, 44px minmax(64px,1fr) minmax(80px,1fr) minmax(56px,.7fr) minmax(72px,.9fr) 44px); }
html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-table-header > span { min-width: 0; }
html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-extra-head { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-extra-head > button { width: 22px; min-width: 22px; height: 22px; min-height: 22px; padding: 0; border: 0; background: transparent; color: var(--mk-ink-3); box-shadow: none; cursor: pointer; }
html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-row > label[hidden], html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-table-header [hidden] { display: none !important; }
@container (max-width:620px) {
  /* Schmal: Spaltenauswahl als Leiste über den Sätzen, Felder je Satz paarweise umbrechend */
  html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-table-header { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
  html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-table-header > [data-gym-head="set"], html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-table-header > [data-gym-head="pause"] { display: none; }
  html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
  html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-row > strong { flex: 0 0 24px; align-self: center; }
  html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-row > label { flex: 1 1 calc(50% - 48px); min-width: 110px; grid-column: auto !important; grid-row: auto !important; }
  html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-row > .gym-remove-set { order: 99; flex: 0 0 44px; grid-column: auto !important; grid-row: auto !important; }
}
html:root:not(#_) #onlinePlanDialog .gym-structured-layout .gym-set-table-header [data-gym-add-column]:not(#_) { max-width: none !important; }
@media screen {
  /* Exercises: Standard-Spalten der Gym-Satztabelle */
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-columns { display: grid; gap: 8px; margin-top: 12px; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-columns > h4 { margin: 0; font-size: 14px; font-weight: 600; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-columns > p { margin: 0; max-width: 620px; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-extras > span { width: 100%; font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-extras .exercise-check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--mk-line); border-radius: 999px; background: var(--mk-surface); font-size: 13px; cursor: pointer; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-gym-extras .exercise-check input:not(#_) { width: 16px !important; height: 16px !important; min-width: 16px; min-height: 16px !important; margin: 0; padding: 0 !important; }
}

/* UX-Prüfung Session Builder, Handy: Kalender oben über die volle Breite, dann Datum | Startzeit, Ort | Track
   (ohne Track Ort über die volle Breite); „Nach oben/unten“ direkt an der Karte, weil Ziehen dort nicht geht. */
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta > label:has(> select[name="athleteId"]) { grid-column: 1 / -1; grid-row: auto; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta > label:has(> input[name="date"]) { grid-column: auto; grid-row: auto; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .online-plan-meta > label:has(> input[name="location"]):has(~ #onlineSessionTrackField[hidden]) { grid-column: 1 / -1; }
}
@media screen {
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-choice-wrap { position: relative; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-choice-move { top: 50%; right: 10px; display: flex; gap: 6px; }
  html:root:not(#_) body #onlinePlanDialog.planiq-builder #onlinePlanForm .builder-choice-move > button:not(#_) { border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-surface); }
}

/* Rückmeldung Lars 27.10.: Calendar-Kopf in einer Zeile – Titel, Kalender, ‹ Heute ›, Zeitraum, Woche/Monat/Jahr, ⋮, ⋯, Session planen.
   Die Summe steht klein darunter, der Kalender füllt den Rest. Compare behält seinen eigenen Aufbau; schmale Fenster wie bisher. */
html:root #mainContent:has(> #calendarView:not([hidden])) { container-type: inline-size; }
@container (min-width: 960px) {
  html:root:not(#_) #mainContent #calendarView:not([hidden]):not(.calendar-compare-open) { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto auto auto auto; grid-template-rows: auto auto minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 4px; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) > :is(.page-heading, .calendar-toolbar),
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) > .page-heading > .page-actions { display: contents; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) > * { grid-column: 1 / -1; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-heading-title { grid-area: 1 / 1; gap: 12px; width: max-content; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) #calendarHeadingCalendar { flex: none; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) #calendarHeadingCalendar #sidebarCalendarSelect { min-width: 160px; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-navigation { grid-area: 1 / 2; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-period-row { grid-area: 1 / 3; margin-left: 4px; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) #calendarPeriod { white-space: nowrap; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .segmented-control { grid-area: 1 / 5; margin: 0 !important; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-toolbar > .calendar-range-menu { grid-area: 1 / 6; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-more { grid-area: 1 / 7; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) #newOnlineCalendarItemButton { grid-area: 1 / 8; min-width: 0; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-summary { grid-area: 2 / 1 / 3 / -1; margin: 0 0 8px; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) > #trainingTimeline { grid-area: 3 / 1 / 4 / -1; align-self: stretch; min-width: 0; min-height: 0; }
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) > #trainingTimeline.week-view { align-self: start; max-height: 100%; }
}
/* Zwischen 960 und 1060 px Platz entfällt der sichtbare Titel (Calendar ist in der Navigation markiert), damit alles in die Zeile passt. */
@container (min-width: 960px) and (max-width: 1059.98px) {
  html:root:not(#_) #mainContent #calendarView:not(.calendar-compare-open) .calendar-heading-title > h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Monat fortlaufend: der Kalender scrollt in sich, der Monatsname steht über der Woche, in der der Monat beginnt (bleibt beim Scrollen oben). */
@media screen {
  html:root:not(#_) #trainingTimeline.month-view.month-continuous { overflow-y: auto; overscroll-behavior: contain; }
  html:root:not(#_) #trainingTimeline.month-continuous > .calendar-week { flex: none; }
  html:root:not(#_) #trainingTimeline.month-continuous > .calendar-month-label { z-index: 3; flex: none; background: var(--mk-canvas); color: var(--mk-ink); }
}

/* Plan kopieren: Zeitraum unter dem Datum, Liste der Einheiten, die kopiert werden. */
@media screen {
  html:root:not(#_) #planCopyDialog .plan-copy-range { display: block; margin-top: 4px; font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) #planCopyDialog .plan-copy-range[hidden] { display: none; }
  html:root:not(#_) #planCopyDialog .plan-copy-preview { margin-top: 4px; padding: 10px 12px; border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-surface); }
  html:root:not(#_) #planCopyDialog .plan-copy-preview h3 { margin: 0 0 6px; font-size: 13px; font-weight: 650; }
  html:root:not(#_) #planCopyDialog .plan-copy-preview ul { display: grid; gap: 4px; max-height: 196px; overflow: auto; margin: 0; padding: 0; list-style: none; }
  html:root:not(#_) #planCopyDialog .plan-copy-preview li { display: grid; grid-template-columns: minmax(118px, auto) minmax(0, 1fr); gap: 8px; font-size: 13px; }
  html:root:not(#_) #planCopyDialog .plan-copy-preview time { color: var(--mk-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
  html:root:not(#_) #planCopyDialog .plan-copy-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html:root:not(#_) #planCopyDialog .plan-copy-preview p { margin: 6px 0 0; font-size: 12.5px; color: var(--mk-ink-2); }
  html:root:not(#_) #planCopyDialog .plan-copy-preview > p:only-child { margin: 0; }
}

/* Exercises (Rückmeldung Lars 27.10.): Name als beschriftetes Feld, Abfrageangaben als Auswahl, Hinweise unter Bewegungsmuster/Art. */
@media screen {
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-detail-title > h2.exercise-title-empty { color: var(--mk-ink-3); }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-field-hint { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-muted { margin: 4px 0 0; font-size: 13px; color: var(--mk-ink-3); }
  /* „Einseitig / einbeinig“: Häkchen in normaler Größe vor dem Text */
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-grid > .exercise-check { align-self: end; justify-content: flex-start; width: max-content; max-width: 100%; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-grid > .exercise-check input:not(#_) { width: 16px !important; height: 16px !important; min-width: 16px; min-height: 16px !important; margin: 0; padding: 0; }
}
@media screen {
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-grid.exercise-grid-top { align-items: start; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-grid.exercise-grid-top > .exercise-check { align-self: start; margin-top: 22px; }
}
/* Exercises: Planungsfelder und Standardwerte */
@media screen {
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-rows { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
  :is([data-exercise-param-add], [data-exercise-gym-add], [data-feedback-add]) { gap: 6px; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-row { display: flex; align-items: flex-end; gap: 4px; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-row > :is(.exercise-field, .exercise-planning-choice) { width: 232px; min-width: 0; margin: 0; }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-remove:not(#_) { display: inline-grid; place-items: center; width: 40px; min-width: 40px; padding: 0; border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-surface); color: var(--mk-ink-2); font-size: 18px; line-height: 1; }
  html[data-prep-ui]:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-row > .exercise-param-remove:not(#_) { height: var(--prep-control-h); min-height: var(--prep-control-h); }
  html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-remove:disabled { opacity: .35; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-subheading { margin: 20px 0 8px; font-size: 14px; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-optional > summary { cursor: pointer; font-weight: 650; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-optional[open] > summary { margin-bottom: 12px; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-methodical-order { display: grid; gap: 6px; max-width: 640px; margin: 0 0 12px; padding-left: 24px; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-methodical-order > li { padding: 6px; border-bottom: 1px solid var(--mk-line); }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-methodical-order li > span { overflow-wrap: anywhere; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-order-actions { display: inline-flex; gap: 4px; margin: 4px 0 0 8px; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-order-actions > button { width: var(--prep-control-h); }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-alternatives { display: grid; gap: 4px; max-height: 232px; max-width: 640px; overflow-y: auto; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-alternative { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-alternative span { overflow-wrap: anywhere; }
  :is(#exercisesCatalog,#prepNewExerciseEditor) .prep-feedback-field { flex-wrap: wrap; max-width: 100%; }
  @media (max-width: 540px) {
    html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-detail-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "back" "title" "actions"; }
    html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-detail-title { min-width: 0; }
    :is(#exercisesCatalog,#prepNewExerciseEditor) .prep-feedback-field > .exercise-field { flex: 1 1 130px; }
  }
  @media (max-width: 760px), (max-height:500px){
    html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-row { flex: 1 1 100%; min-width: 0; max-width: 100%; }
    html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .exercise-param-row > :is(.exercise-field, .exercise-planning-choice) { flex: 1 1 0; width: auto; }
    html:root:not(#_) :is(#exercisesCatalog,#prepNewExerciseEditor) .prep-feedback-field > .exercise-field { flex-basis: 130px; }
  }
}

/* Athletes (Rückmeldung Lars 27.10.): „‹ Athletes“ in eigener Zeile, darunter Avatar, Name und Aktionen. */
@media screen {
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; }
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head > .plan-athlete-back { grid-column: 1 / -1; justify-self: start; }
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head > .page-actions { grid-area: 2 / 3; margin-left: 0; }
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head > .plan-athlete-back { grid-area: 1 / 1 / 2 / -1; }
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head > .plan-athlete-avatar { grid-area: 2 / 1; }
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head > div:not(.page-actions) { grid-area: 2 / 2; min-width: 0; }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) #planAthletesView .plan-athlete-detail-head > .page-actions { grid-area: 3 / 1 / 4 / -1; }
}

/* Event (Rückmeldung Lars 27.10.): Beginn und Ende in einer Zeile, je Datum + optionale Uhrzeit. */
@media screen {
  html:root:not(#_) #onlineEventForm .online-event-period { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; }
  html:root:not(#_) #onlineEventForm .online-event-period > fieldset { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
  html:root:not(#_) #onlineEventForm .online-event-period > fieldset > legend { grid-column: 1 / -1; float: left; width: 100%; margin: 0 0 4px; padding: 0; }
  html:root:not(#_) #onlineEventForm .online-event-period > fieldset > input { min-width: 0; width: 100%; }
  html:root:not(#_) #onlineEventForm .online-event-time-hint { grid-column: 1 / -1; font-size: 12px; color: var(--mk-ink-3); }
}
@media screen and (max-width: 620px) {
  html:root:not(#_) #onlineEventForm .online-event-period { grid-template-columns: 1fr; }
}

/* Calendar › Panel „Sessions“ (Rückmeldung Lars 27.10.): Suche und „+“ in einer ruhigen Zeile, Sortieren und Filter gleich hoch,
   Bibliotheksname nicht doppelt (steht schon über dem Baum). */
@media screen {
  html:root:not(#_) #calendarSidebar #sidebarLibraryOwner:not(:has(select)) { display: none; }
  html:root:not(#_) #calendarSidebar .library-tree-tools { display: grid; gap: 8px; margin: 4px 0 10px; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-search-row { display: flex; align-items: center; gap: 6px; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-search { flex: 1; min-width: 0; min-height: 0; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-search input:not(#_) { width: 100%; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-add > summary:not(#_) { width: 36px; min-width: 36px; max-width: 36px; height: 36px; min-height: 36px; max-height: 36px; border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-surface); color: var(--mk-ink); }
  html:root #calendarSidebar .library-tree-tools .library-tree-add > summary::after { display: none; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-add > summary:not(#_)::before { width: 16px; height: 16px; mask-size: 16px 16px; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary { display: flex; align-items: center; gap: 6px; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary > label { flex: 1; min-width: 0; min-height: 0; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary > label > select:not(#_) { width: 100% !important; max-width: none; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary > details > summary:not(#_) { display: inline-flex; align-items: center; gap: 6px; height: 36px; min-height: 36px; padding: 0 12px; border: 1px solid var(--mk-line); border-radius: 8px; background: var(--mk-surface); color: var(--mk-ink); font-size: 13px; font-weight: 500; list-style: none; cursor: pointer; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary > details > summary::-webkit-details-marker { display: none; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary > details[open] > summary { border-color: var(--mk-ink); }
}
@media screen and ((max-width: 767px) or (pointer: coarse)) {
  html:root:not(#_) #calendarSidebar .library-tree-tools :is(.library-tree-search input, .library-tree-secondary > label > select, .library-tree-secondary > details > summary, .library-tree-add > summary):not(#_) { height: 44px; min-height: 44px !important; max-height: 44px; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-add > summary:not(#_) { width: 44px; min-width: 44px; max-width: 44px; }
}
@media screen {
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary { position: relative; flex-wrap: nowrap; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-secondary > details { flex: none; position: static; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-surface); box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields select:not(#_) { width: 100% !important; max-width: none; height: 36px; min-height: 36px !important; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields fieldset { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields legend { width: 100%; margin: 0 0 4px; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--mk-ink-2); }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields fieldset > label { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--mk-line); border-radius: 999px; font-size: 12.5px; cursor: pointer; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields fieldset > label:has(input:checked) { border-color: var(--mk-ink); font-weight: 600; }
  html:root:not(#_) #calendarSidebar .library-tree-tools .library-tree-filter-fields fieldset > label > input:not(#_) { width: 14px !important; height: 14px !important; min-width: 14px; min-height: 14px !important; margin: 0; padding: 0; }
}

/* Tracks (Rückmeldung Lars 27.10.): Status „Aktiv“ und „Bearbeiten“ nebeneinander oben rechts statt versetzt. */
@media screen {
  html:root:not(#_) #mainContent .bmx-track-card { align-items: start; }
  html:root:not(#_) #mainContent .bmx-track-card > [data-edit-bmx-track] { align-self: start; height: 36px; min-height: 36px; }
  html:root:not(#_) #mainContent .bmx-track-card .card-heading:not(#_) { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
  html:root:not(#_) #mainContent .bmx-track-card .card-heading > .status-pill { align-self: center; margin-top: 0; }
  html:root:not(#_) #mainContent .bmx-track-card .card-heading > div { min-width: 0; }
}
@media screen and (min-width: 761px) and (min-height:501px){
  /* Pill und Knopf teilen die Höhe der Kopfzeile: Pill mittig auf Höhe des Knopfs */
  html:root:not(#_) #mainContent .bmx-track-card .card-heading { min-height: 36px; }
}

/* Athletes › Wettkampfziele: je Wettkampf eine Karte mit Zusammenfassung und Feldern. */
@media screen {
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-surface); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal > header strong { display: block; font-size: 14.5px; font-weight: 650; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal > header small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal-summary { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--mk-sunk); font-size: 12.5px; font-weight: 600; color: var(--mk-ink); white-space: nowrap; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal-summary.empty { background: transparent; font-weight: 400; color: var(--mk-ink-3); }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal-fields { margin: 0; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal-fields > .plan-goal-wide { grid-column: span 2; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goals-past { margin-top: 12px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goals-past > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--mk-ink-2); }
}
@media screen and (max-width: 760px), screen and (max-height:500px){
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal > header { flex-direction: column; gap: 6px; }
  html:root:not(#_) :is(#planAthletesView,#profilePlanningDialog) .plan-goal-fields > .plan-goal-wide { grid-column: 1 / -1; }
}

/* Navigation (Rückmeldung Lars 27.10.): „Library“ statt Sessions/Blocks/Exercises, „Settings“-Menü für Tracks und Session Builder Editor. */
@media screen {
  html:root:not(#_) #appShell #primaryNav a[data-library-member] { display: none !important; }
  html[data-fliq-ci="8.1"] #appShell #primaryNav a[data-view="library"]::before { mask: url("ci-8.1/icons/library.svg?v=c56527b70d3e") center/contain no-repeat; }
  html[data-fliq-ci="8.1"] #appShell #primaryNav a[data-view="session-builder-editor"]::before { mask: url("ci-8.1/icons/sliders-horizontal.svg?v=2a333775136c") center/contain no-repeat; }
  /* Reiter oben in Sessions, Blocks und Exercises */
  html:root:not(#_) #mainContent .view > .library-tabs { max-width: 100%; }
  html:root:not(#_) #mainContent .view > .library-tabs > a { text-decoration: none; white-space: nowrap; }
}

/* Blocks › Wochenansicht: längere VBT-Angaben in eigener Zeile unter Übung und Rolle. */
@media screen {
  html:root:not(#_) #blocksView .block-line > .detail { grid-column: 1 / -1; text-align: left; }
  html:root:not(#_) #blocksView .block-line > strong { min-width: 7em; }
}

/* Library-Reiter mit Piktogrammen wie in der Navigation (Wunsch Lars). */
@media screen {
  html:root:not(#_) #mainContent .view > .library-tabs > a[href="#exercises"]::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='3' width='15' height='18' rx='2'/%3E%3Cpath d='M8.5 8h7M8.5 12h7M8.5 16h4'/%3E%3C/svg%3E") center/contain no-repeat; opacity: .85; }
  html:root:not(#_) #mainContent .view > .library-tabs > a[href="#sessions"]::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; mask: url("ci-8.1/icons/list-play.svg?v=a86bc677daa0") center/contain no-repeat; opacity: .85; }
  html:root:not(#_) #mainContent .view > .library-tabs > a[href="#blocks"]::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m12 4 9 4.5-9 4.5-9-4.5z'/%3E%3Cpath d='m3 12.5 9 4.5 9-4.5M3 16.5 12 21l9-4.5'/%3E%3C/svg%3E") center/contain no-repeat; opacity: .85; }
}
/* Wettkampf-Dialog (Calendar) und Ergebnis in Athletes */
@media screen {
  html:root:not(#_) #competitionDialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 14px; background: var(--mk-surface); color: var(--mk-ink); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
  html:root:not(#_) #competitionDialog form { display: grid; gap: 12px; padding: 20px 22px; }
  html:root:not(#_) #competitionDialog .dialog-heading h2 { margin: 2px 0; font-size: 20px; font-weight: 650; }
  html:root:not(#_) #competitionDialog .competition-athlete { max-width: 320px; }
  html:root:not(#_) #competitionDialog .competition-athlete-name { margin: 0; font-size: 14px; }
  html:root:not(#_) #competitionDialog .dialog-actions { display: flex; align-items: center; gap: 8px; }
  html:root:not(#_) #competitionDialog .dialog-actions > span { flex: 1; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-subhead { margin: 14px 0 6px; font-size: 13px; font-weight: 650; color: var(--mk-ink-2); }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-subhead:first-child { margin-top: 0; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-fields > .plan-goal-wide { grid-column: span 2; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-fields > .plan-goal-full { grid-column: 1 / -1; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  html:root:not(#_) #competitionDialog .plan-goal-chips { justify-content: flex-start; }
  html:root:not(#_) #competitionDialog .plan-goal-chips:empty { display: none; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-summary { padding: 3px 10px; border-radius: 999px; background: var(--mk-sunk); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-summary.plan-goal-result { background: color-mix(in srgb, var(--mk-accent, #2e7d5b) 14%, transparent); }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-later { margin: 10px 0 0; }
  html:root:not(#_) #competitionDialog .plan-goal-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
}
@media screen and (max-width: 620px) {
  html:root:not(#_) #competitionDialog .plan-goal-fields { grid-template-columns: 1fr 1fr; }
  html:root:not(#_) :is(#competitionDialog,#planAthletesView,#profilePlanningDialog) .plan-goal-fields > .plan-goal-wide { grid-column: 1 / -1; }
}
/* Wettkampf-Dialog: Felder wie in Athletes */
@media screen {
  html:root:not(#_) #competitionDialog .plan-field { display: grid; gap: 6px; align-content: start; margin: 0; min-width: 0; font-size: 13px; font-weight: 500; color: var(--mk-ink-2); }
  html:root:not(#_) #competitionDialog .plan-field :is(input, select):not(#_) { width: 100% !important; max-width: none !important; height: 40px; min-height: 40px; box-sizing: border-box; }
  html:root:not(#_) #competitionDialog .plan-input-unit { position: relative; display: block; }
  html:root:not(#_) #competitionDialog .plan-input-unit input { padding-right: 36px; font-variant-numeric: tabular-nums; }
  html:root:not(#_) #competitionDialog .plan-input-unit em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12.5px; color: var(--mk-ink-3); pointer-events: none; }
}
/* Completed session overview: fit the summary on laptop-height screens.
   Documentation, planned sessions and print retain their existing layout. */
