/* Handy-Ansicht "Graphit" (js/components/m-app.js). Greift nur, wenn
   body.m-graphit gesetzt ist - also am Handy (bis 700 px) und solange die
   Ansicht in den Einstellungen nicht abgeschaltet ist. Am Computer ändert
   diese Datei nichts. */

#m-app[hidden], .m-backbar { display: none; }

body.m-graphit {
  /* Graphit-Farben */
  --m-bg: #0c0d0f; --m-surface: #16181b; --m-surface-2: #1e2125; --m-text: #f2f3f5; --m-muted: #8d929a;
  --m-line: rgba(255,255,255,0.07); --m-accent: #7fb2ff;
  --m-swim: #4cc3b0; --m-bike: #6f9cf0; --m-run: #f08a5d; --m-strength: #c9a0ff;
  --m-good: #4fd18b; --m-warn: #f2c14e; --m-bad: #f2705e;
  --m-r1: #4fd18b; --m-r2: #7fb2ff; --m-r3: #a99bff;
  --m-radius: 18px;

  /* Die bisherigen Seiten und Fenster (Mehr, Details, Plan bearbeiten ...)
     bekommen dieselben dunklen Farben, damit alles zusammenpasst. */
  color-scheme: dark;
  --page: #0c0d0f; --surface-1: #16181b; --text-primary: #f2f3f5; --text-secondary: #c4c8ce; --text-muted: #8d929a;
  --grid: #26292e; --baseline: #34383e; --border: rgba(255,255,255,0.07);
  --card-shadow: none; --card-shadow-hover: none;
  --accent: #7fb2ff; --accent-fill: #5b97f0; --accent-wash: rgba(127,178,255,0.16);
  --c-good-text: #4fd18b; --c-warn-text: #f2c14e; --c-crit-text: #f2705e;
  --c-schwimmen: #4cc3b0; --c-rad: #6f9cf0; --c-laufen: #f08a5d;
  --c-ctl: #7fb2ff; --c-atl: #f08a5d; --c-tsb-pos: #4fd18b; --c-tsb-neg: #f2705e; --c-load: #34383e;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Hauptansicht: die bisherige Seite ausblenden (nur Hinweisbanner bleiben). */
body.m-graphit:not(.m-classic) .page > *:not(.api-error-banner):not(.app-update-banner) { display: none !important; }
body.m-graphit .parallax-bg, body.m-graphit .glow-orb { display: none !important; }
body.m-graphit .page { padding-top: 0; }

/* Bisherige Seite geöffnet ("Mehr"): eigene Zurück-Leiste statt Kopf und Tabs. */
body.m-graphit.m-classic .page > header.top,
body.m-graphit.m-classic .page > .topnav { display: none !important; }
body.m-graphit.m-classic .m-backbar {
  display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: color-mix(in srgb, var(--m-bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--m-line);
  font-size: 16px; font-weight: 650;
}
.m-back { border: none; background: none; color: var(--m-accent); font: inherit; font-size: 16px; font-weight: 600; padding: 6px 4px; cursor: pointer; min-height: 40px; }

#m-app {
  max-width: 480px; margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(28px + env(safe-area-inset-bottom));
}
#m-app button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
#m-app button:focus-visible, #m-app [role=button]:focus-visible { outline: 2px solid var(--m-accent); outline-offset: 2px; }
.m-body { display: flex; flex-direction: column; gap: 14px; }

/* Bereiche oben */
.m-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 10px; padding: 10px 16px 8px; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--m-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.m-tabs::-webkit-scrollbar { display: none; }
.m-tabs button {
  flex: none; border: 1px solid var(--m-line); background: var(--m-surface); color: var(--m-muted);
  font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 36px;
}
.m-tabs button.on { background: var(--m-text); color: var(--m-bg); border-color: var(--m-text); }

/* Kopf */
.m-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.m-title { margin: 0; font-size: 32px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.05; color: var(--m-text); }
.m-kicker { font-size: 13px; color: var(--m-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.m-top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.m-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--m-muted); padding: 6px 10px; border-radius: 999px; background: var(--m-surface); border: none; cursor: pointer; }
.m-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--m-good); display: inline-block; }
.m-pill i.old { background: var(--m-warn); }
.m-pill i.off { background: var(--m-muted); }
.m-icon { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--m-surface); color: var(--m-text); font-size: 20px; font-weight: 600; cursor: pointer; }

/* Karten */
.m-card { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--m-radius); padding: 16px; }
.m-hero { background: linear-gradient(180deg, var(--m-surface) 0%, color-mix(in srgb, var(--m-surface) 70%, var(--m-bg)) 100%); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.m-head h2 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--m-muted); }
.m-head-note { font-size: 13px; color: var(--m-muted); font-variant-numeric: tabular-nums; }
.m-link { border: none; background: none; padding: 4px 0; color: var(--m-accent); font-size: 14px; font-weight: 500; cursor: pointer; }
.m-chip { border: none; background: var(--m-surface-2); color: var(--m-text); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 32px; }
.m-arrows { display: inline-flex; align-items: center; gap: 6px; }
.m-empty { margin: 0; font-size: 14.5px; color: var(--m-muted); line-height: 1.45; }
.m-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-more { display: block; width: 100%; text-align: center; padding: 14px; border-radius: var(--m-radius); background: var(--m-surface); border: 1px solid var(--m-line); color: var(--m-accent); font-weight: 600; font-size: 15px; cursor: pointer; }

/* Ringe */
.m-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.m-ring-col { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.m-ring { position: relative; width: 100%; max-width: 108px; }
.m-ring svg { width: 100%; aspect-ratio: 1; transform: rotate(-90deg); display: block; }
.m-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.m-ring-track { stroke: color-mix(in srgb, var(--m-text) 9%, transparent); }
.m-ring-val { transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 45%, transparent)); }
.m-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.m-ring-txt b { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.m-ring-txt small { font-size: 11px; color: var(--m-muted); margin-top: 3px; }
.m-unit { font-size: 14px; font-weight: 650; }
.m-ring-sub { font-size: 11.5px; color: var(--m-muted); }
.m-ring.sm { width: 64px; flex: none; }
.m-ring.sm circle { stroke-width: 10; }
.m-ring.sm .m-ring-txt b { font-size: 18px; }
.m-ring.sm .m-ring-txt small { display: none; }

.m-verdict { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.m-verdict i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.m-verdict.good { background: color-mix(in srgb, var(--m-good) 13%, transparent); } .m-verdict.good i { background: var(--m-good); }
.m-verdict.warn { background: color-mix(in srgb, var(--m-warn) 13%, transparent); } .m-verdict.warn i { background: var(--m-warn); }
.m-verdict.bad { background: color-mix(in srgb, var(--m-bad) 13%, transparent); } .m-verdict.bad i { background: var(--m-bad); }
.m-verdict.neutral { background: var(--m-surface-2); color: var(--m-muted); } .m-verdict.neutral i { background: var(--m-muted); }

/* Sport-Symbole, Zeilen */
.m-ic { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.m-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-ic.lg { width: 46px; height: 46px; border-radius: 14px; } .m-ic.lg svg { width: 24px; height: 24px; }
.m-ic.sm { width: 32px; height: 32px; border-radius: 10px; } .m-ic.sm svg { width: 17px; height: 17px; }
.m-today { display: flex; gap: 14px; align-items: center; }
.m-row-title { font-size: 15px; font-weight: 600; color: var(--m-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row-title.lg { font-size: 17px; font-weight: 700; white-space: normal; }
.m-row-meta { font-size: 12.5px; color: var(--m-muted); margin-top: 2px; line-height: 1.35; }
.m-list { display: flex; flex-direction: column; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border: none; border-top: 1px solid var(--m-line); background: none; color: inherit; text-align: left; width: 100%; cursor: pointer; }
.m-row:first-child { border-top: none; padding-top: 2px; }
.m-load { text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--m-text); }
.m-load small { display: block; font-size: 11px; color: var(--m-muted); font-weight: 600; }
.m-tag { display: inline-block; flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin-right: 4px; white-space: nowrap;
  background: color-mix(in srgb, var(--m-accent) 18%, transparent); color: var(--m-accent); }
.m-tag.locker { background: color-mix(in srgb, var(--m-good) 18%, transparent); color: var(--m-good); }
.m-tag.mittel { background: color-mix(in srgb, var(--m-warn) 20%, transparent); color: var(--m-warn); }
.m-tag.hart { background: color-mix(in srgb, var(--m-bad) 20%, transparent); color: var(--m-bad); }
.m-tag.done { background: color-mix(in srgb, var(--m-good) 18%, transparent); color: var(--m-good); }
.m-tag.bad { background: color-mix(in srgb, var(--m-bad) 18%, transparent); color: var(--m-bad); }
.m-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.m-btn { flex: 1; min-height: 44px; border-radius: 12px; border: none; font-size: 15px; font-weight: 650; cursor: pointer; padding: 0 14px; }
.m-btn.primary { background: var(--m-accent); color: #0c0d0f; }
.m-btn.soft { background: color-mix(in srgb, var(--m-accent) 14%, transparent); color: var(--m-accent); }
.m-btn.ghost { background: none; color: var(--m-accent); min-height: 38px; }
.m-btn.wide { width: 100%; flex: none; }
.m-done-note { font-size: 14px; font-weight: 650; color: var(--m-good); }
.m-extra { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--m-line); font-size: 14px; }
.m-extra span { color: var(--m-muted); }

/* Woche */
.m-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.m-day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--m-muted); font-weight: 600; border: none; background: none; padding: 2px 0; cursor: pointer; }
.m-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #0c0d0f; }
.m-dot.rest { background: none; border: 1.5px dashed color-mix(in srgb, var(--m-text) 25%, transparent); color: var(--m-muted); }
.m-dot.plan { background: none; border: 2px solid; }
.m-day.today span:last-child { color: var(--m-text); }
.m-day.today .m-dot { box-shadow: 0 0 0 3px var(--m-surface), 0 0 0 5px var(--m-accent); }
.m-week-num { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; font-size: 13.5px; color: var(--m-muted); }
.m-week-num b { font-size: 22px; color: var(--m-text); font-variant-numeric: tabular-nums; }
.m-bar { margin-top: 8px; height: 10px; border-radius: 6px; overflow: hidden; display: flex; background: color-mix(in srgb, var(--m-text) 8%, transparent); }
.m-bar span { display: block; height: 100%; }
.m-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--m-muted); }
.m-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.m-legend i.ctl { background: var(--m-accent); } .m-legend i.tsb { background: var(--m-good); }

/* Zahlen, Form */
.m-nums, .m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-nums { margin-bottom: 10px; }
.m-num { padding: 10px; border-radius: 12px; background: var(--m-surface-2); min-width: 0; }
.m-num small { display: block; font-size: 11.5px; color: var(--m-muted); font-weight: 600; }
.m-num b { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-stats .m-num b { font-size: 18px; }
.m-num b.good { color: var(--m-good); } .m-num b.warn { color: var(--m-warn); } .m-num b.bad { color: var(--m-bad); }
.m-num em { font-style: normal; font-size: 11.5px; font-weight: 700; }
.m-num em.up { color: var(--m-good); } .m-num em.down { color: var(--m-warn); }
.m-spark { width: 100%; height: 86px; display: block; overflow: visible; }
.m-spark-zero { stroke: var(--m-line); stroke-width: 1; stroke-dasharray: 3 4; }
.m-spark-fill { fill: color-mix(in srgb, var(--m-accent) 12%, transparent); }
.m-spark-ctl { fill: none; stroke: var(--m-accent); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-spark-tsb { fill: none; stroke: var(--m-good); stroke-width: 1.8; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.m-spark-dot { fill: var(--m-accent); stroke: var(--m-surface); stroke-width: 2; }

/* Ziel */
.m-goal { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.m-goal b { font-size: 15.5px; }
.m-goal small { font-size: 12.5px; color: var(--m-muted); display: block; margin-top: 5px; }
.m-goal-days { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; text-align: center; }
.m-goal-days small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0; margin-top: 2px; }
.m-phases { display: flex; gap: 3px; margin-top: 8px; }
.m-phases span { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--m-text) 10%, transparent); }
.m-phases span.now { background: var(--m-accent); }

/* Kalender */
.m-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 2px; text-align: center; }
.m-wd { font-size: 11px; color: var(--m-muted); font-weight: 700; padding-bottom: 4px; }
.m-mc { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 10px; border: none; background: none; color: var(--m-text); cursor: pointer; }
.m-mc.empty { cursor: default; }
.m-mc b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-mc.past b { color: var(--m-muted); }
.m-mc.inweek { background: var(--m-surface-2); }
.m-mc i { width: 5px; height: 5px; border-radius: 50%; }
.m-mc.today { background: var(--m-accent); }
.m-mc.today b { color: var(--m-bg); }
.m-mc.today i[style*="background"] { background: var(--m-bg) !important; }
.m-agenda { display: flex; flex-direction: column; }
.m-ag-day { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--m-line); }
.m-ag-day:first-child { border-top: none; padding-top: 0; }
.m-ag-date { width: 34px; flex: none; display: flex; flex-direction: column; align-items: center; }
.m-ag-date b { font-size: 12px; color: var(--m-muted); font-weight: 700; }
.m-ag-date span { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-ag-day.today .m-ag-date span { color: var(--m-accent); }
.m-ag-items { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-ag-add { align-self: flex-start; border: none; background: none; color: var(--m-muted); font-size: 13.5px; padding: 8px 0; cursor: pointer; }
.m-ev { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 12px; background: var(--m-surface-2); overflow: hidden; border: none; color: inherit; text-align: left; width: 100%; cursor: pointer; }
.m-ev-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }

/* Coach */
.m-check { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--m-line); font-size: 14.5px; font-weight: 600; }
.m-check:first-of-type { border-top: none; }
.m-seg { display: flex; padding: 2px; border-radius: 10px; background: var(--m-surface-2); flex-wrap: nowrap; }
.m-seg button { border: none; background: none; color: var(--m-muted); font-size: 12.5px; font-weight: 600; padding: 7px 8px; border-radius: 8px; cursor: pointer; min-height: 32px; }
.m-seg button.on { background: var(--m-text); color: var(--m-bg); }
.m-say { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: color-mix(in srgb, var(--m-text) 90%, var(--m-muted)); }
.m-say:last-child { margin-bottom: 0; }
.m-say.small { font-size: 13.5px; color: var(--m-muted); }
.m-say.muted { color: var(--m-muted); }
.m-say.bad { color: var(--m-bad); }

/* Training */
.m-subseg { display: flex; padding: 3px; border-radius: 12px; background: var(--m-surface); border: 1px solid var(--m-line); }
.m-subseg button { flex: 1; border: none; background: none; color: var(--m-muted); font-size: 14.5px; font-weight: 650; padding: 9px; border-radius: 9px; cursor: pointer; }
.m-subseg button.on { background: var(--m-surface-2); color: var(--m-text); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.m-hero-ex { display: flex; flex-direction: column; gap: 12px; }
.m-hero-title { font-size: 18px; display: block; }
.m-fig-lg { aspect-ratio: 6 / 4; border-radius: 14px; background: var(--m-surface-2); padding: 6px 10px 0; }
.m-fig-sm { width: 56px; height: 44px; flex: none; border-radius: 10px; background: var(--m-surface-2); padding: 2px; }
.m-fig-lg svg, .m-fig-sm svg { width: 100%; height: 100%; display: block; }

/* Mehr */
.m-navlist { padding: 4px 16px; }
.m-nav-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 0; border: none; border-top: 1px solid var(--m-line); background: none; color: var(--m-text); font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; }
.m-nav-row:first-child { border-top: none; }
.m-nav-row i { font-style: normal; color: var(--m-muted); font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  .m-ring-val { transition: none; }
}

.m-tag.leicht { background: color-mix(in srgb, var(--m-good) 18%, transparent); color: var(--m-good); }

/* ---- Geplante Einheit als Blatt von unten (m-app.js: mPlanSheet) ---- */
body.m-sheet-open { overflow: hidden; }
.m-sheet-overlay {
  position: fixed; inset: 0; z-index: 240; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0); transition: background .25s ease;
}
.m-sheet-overlay.is-open { background: rgba(0,0,0,.55); }
.m-sheet {
  width: 100%; max-width: 520px; max-height: calc(100dvh - 24px - env(safe-area-inset-top));
  display: flex; flex-direction: column; background: var(--m-bg); color: var(--m-text);
  border-radius: 22px 22px 0 0; border: 1px solid var(--m-line); border-bottom: none;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
.m-sheet-overlay.is-open .m-sheet { transform: none; }
.m-sheet-bar { position: relative; display: flex; justify-content: center; padding: 8px 12px 0; flex: none; }
.m-sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--m-text) 22%, transparent); }
.m-sheet-close { position: absolute; right: 12px; top: 8px; width: 32px; height: 32px; font-size: 20px; line-height: 1; }
.m-sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.m-sheet button { font-family: inherit; }
.m-sh-head { display: flex; align-items: center; gap: 14px; padding: 6px 40px 2px 0; }
.m-sh-title { margin: 2px 0 0; font-size: 24px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.m-sh-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-sh-facts .m-num b { font-size: 17px; }
.m-int.leicht { color: var(--m-good); } .m-int.mittel { color: var(--m-warn); } .m-int.hart { color: var(--m-bad); }
.m-flowbar { display: flex; gap: 3px; height: 12px; margin-bottom: 14px; }
.m-flowbar span { border-radius: 4px; min-width: 6px; }
.m-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.m-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--m-line); }
.m-step:first-child { border-top: none; padding-top: 0; }
.m-step > i { width: 4px; align-self: stretch; min-height: 34px; border-radius: 2px; flex: none; }
.m-step b { font-size: 15px; font-weight: 650; }
.m-step-amt { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-notes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.m-notes li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.45; color: color-mix(in srgb, var(--m-text) 90%, var(--m-muted)); }
.m-notes li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--m-accent); }
.m-sh-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.m-sh-row { display: flex; gap: 10px; }
.m-sh-note { margin: 0; font-size: 13px; color: var(--m-good); text-align: center; }
.m-sheet .m-btn:disabled { opacity: .6; }

/* ---- Bearbeiten-Fenster & andere Fenster in der Handy-Ansicht: hell genug, klar ---- */
body.m-graphit .modal-overlay { align-items: flex-end; padding: 0; }
body.m-graphit .modal-card {
  width: 100%; max-width: 520px; max-height: calc(100dvh - 24px - env(safe-area-inset-top)); margin: 0;
  border-radius: 22px 22px 0 0; background: var(--m-bg); border: 1px solid var(--m-line); border-bottom: none;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: none;
}
body.m-graphit .modal-close { width: 32px; height: 32px; background: var(--m-surface-2); color: var(--m-text); }
body.m-graphit .plan-edit-card h3 { font-size: 22px; letter-spacing: -0.02em; margin: 0 40px 14px 0; }
body.m-graphit .plan-edit-card .onb-field { margin-bottom: 14px; }
body.m-graphit .plan-edit-card .onb-field > label { font-size: 13px; font-weight: 650; color: var(--m-muted); text-transform: none; margin-bottom: 6px; display: block; }
body.m-graphit .plan-edit-card .onb-row { gap: 10px; }
body.m-graphit .modal-card .coach-input {
  font-size: 16px; color: var(--m-text); background: var(--m-surface-2);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 11px 12px; min-height: 46px;
}
body.m-graphit .modal-card .coach-input:focus { outline: none; border-color: var(--m-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-accent) 25%, transparent); }
body.m-graphit .modal-card input[type="date"].coach-input { text-align: left; -webkit-appearance: none; appearance: none; display: block; }
body.m-graphit .modal-card textarea.coach-input { min-height: 150px; line-height: 1.45; resize: vertical; }
body.m-graphit .modal-card .cal-today-btn, body.m-graphit .modal-card .update-btn { min-height: 44px; border-radius: 12px; font-size: 15px; }

/* ---- Mitmach-Modus (Mobility/Kraft) am Handy: alles auf einen Bildschirm ---- */
@media (max-width: 700px) {
  .mob-player { height: 100dvh; padding-bottom: calc(12px + var(--safe-bottom)); }
  .mob-player-body {
    display: flex; flex-direction: column; gap: 8px; overflow: hidden; padding-top: 10px; align-items: stretch;
  }
  .mob-player-stage {
    flex: 1 1 auto; min-height: 110px; height: auto; max-height: none; width: 100%;
    aspect-ratio: auto; margin: 0; padding: 2% 4% 1%; border-radius: 22px; box-sizing: border-box;
  }
  .mob-player-badge { top: 10px; font-size: 13px; padding: 5px 12px; }
  .mob-player-info { flex: none; }
  .mob-player-kicker { font-size: 13px; }
  .mob-player-name { font-size: 22px; margin-top: 2px; }
  .mob-player-note { font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mob-timer { width: 112px; height: 112px; margin: 8px 0 2px; }
  .mob-timer-num { font-size: 32px; }
  .mob-player.is-manual .mob-timer-num { font-size: 44px; }
  .mob-player-sub { font-size: 14px; margin-top: 2px; }
  .mob-weight { margin-top: 4px; }
  .mob-player-controls { margin-top: 8px; gap: 26px; }
  .mob-ctrl { width: 50px; height: 50px; }
  .mob-ctrl-main { width: 66px; height: 66px; }
  .mob-player-howto { margin-top: 4px; }
  .mob-player-howto summary { padding: 6px; font-size: 14px; }
  .mob-player-howto[open] { max-height: 30dvh; overflow-y: auto; }
}
body.m-graphit .plan-edit-card h3 { background: none; }
.m-sheet-bar { min-height: 46px; box-sizing: border-box; background: var(--m-bg); border-radius: 22px 22px 0 0; z-index: 1; }
.m-sheet-body { padding-top: 0; }
.m-sh-head { padding-right: 0; }

/* Kein heller Rand unter kurzen Seiten (z. B. "Mehr"): auch html dunkel. */
html.m-graphit-root { background: #0c0d0f; color-scheme: dark; }
body.m-graphit { min-height: 100vh; min-height: 100dvh; }

/* Garmin-Knopf oben */
.m-pill i.bad { background: var(--m-bad); }
.m-pill.busy { cursor: default; color: var(--m-text); }
.m-pill.busy i { background: var(--m-accent); animation: m-pulse 1s ease-in-out infinite; }
@keyframes m-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .m-pill.busy i { animation: none; } }

/* Training aus dem Plan */
.m-planbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--m-accent) 12%, var(--m-surface));
  border: 1px solid color-mix(in srgb, var(--m-accent) 25%, transparent); font-size: 13.5px; line-height: 1.35;
}
.m-planbar-act { display: flex; gap: 14px; flex: none; }

/* Coach: Nächste Einheiten nach Tagen */
.m-cdays { display: flex; flex-direction: column; gap: 14px; }
.m-cday + .m-cday { border-top: 1px solid var(--m-line); padding-top: 14px; }
.m-cday-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.m-cday-head b { font-size: 15px; font-weight: 700; color: var(--m-text); }
.m-cday.today .m-cday-head b { color: var(--m-accent); }
.m-cday-head span { font-size: 12.5px; color: var(--m-muted); font-variant-numeric: tabular-nums; }
.m-cday .m-row:first-child { padding-top: 6px; }

/* Coach: Nachricht an den Coach */
.m-note { display: block; width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--m-line); background: color-mix(in srgb, var(--m-text) 5%, transparent); color: var(--m-text);
  font: inherit; font-size: 16px; line-height: 1.4; }
.m-note::placeholder { color: var(--m-muted); }
.m-note:focus { outline: none; border-color: var(--m-accent); }
.m-card .m-actions { margin-top: 10px; }
.m-btn:disabled { opacity: .6; cursor: default; }
.m-reply { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--m-accent) 10%, transparent); }
.m-reply .m-link { margin-top: 4px; padding: 0; }

/* Übersicht: Nachtwerte der Uhr unter den Ringen */
.m-night { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 8px 14px; margin: 12px 0 12px; padding-top: 12px; border-top: 1px solid var(--m-line); }
.m-night span { display: flex; flex-direction: column; align-items: center; font-size: 14px; font-weight: 650; color: var(--m-text); font-variant-numeric: tabular-nums; }
.m-night small { font-size: 11px; font-weight: 500; color: var(--m-muted); }
.m-night span.bad { color: var(--m-bad); }
