/* Muscle map (public/shared/muscles.js): front + back body figures with
   worked muscles shaded green, and a ranked list of sets per muscle. */
:root {
  --mm-skin: var(--n-soft);
  --mm-off: #dfe2e6;
  --mm-hit: 34, 197, 94;
}
:root[data-theme="dark"] {
  --mm-skin: var(--d-raise);
  --mm-off: #2f3338;
}

.mm-block { display: grid; grid-template-columns: minmax(160px, 230px) 1fr; gap: 20px; align-items: center; }
.mm-block-sm { grid-template-columns: minmax(120px, 160px) 1fr; gap: 14px; }
@media (max-width: 420px) {
  .mm-block, .mm-block-sm { grid-template-columns: 1fr; gap: 12px; }
  .mm-block .mm-map { max-width: 240px; margin: 0 auto; }
  .mm-block-sm .mm-map { max-width: 200px; margin: 0 auto; }
}

.mm-map { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mm-map figure { margin: 0; text-align: center; }
.mm-map figcaption { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.mm-fig { display: block; width: 100%; height: auto; overflow: visible; }
.mm-fig path { stroke: var(--panel); stroke-width: 0.9; stroke-linejoin: round; transition: fill 0.25s ease; }
.mm-fig .mm-skin { fill: var(--mm-skin); }
.mm-fig .mm-off { fill: var(--mm-off); }
.mm-fig .mm-hit { fill: rgba(var(--mm-hit), calc(0.22 + var(--mm-t, 1) * 0.78)); }

.mm-list { display: grid; gap: 7px; }
.mm-row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.mm-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-track { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.mm-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.mm-num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.mm-num small { font-weight: 500; color: var(--muted); font-size: 11px; }
.mm-more summary { font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none; padding: 2px 0; }
.mm-more summary::-webkit-details-marker { display: none; }
.mm-more summary::after { content: ' ▾'; }
.mm-more[open] summary::after { content: ' ▴'; }
.mm-more[open] > .mm-list { margin-top: 7px; }
.mm-note { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* A card wrapper used by the routine sheet and finished workouts. */
.mm-card { background: var(--panel); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); margin: 6px 0 4px; }
.mm-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.mm-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.mm-card-head span { font-size: 12px; color: var(--muted); }

/* Plan editor: per-day block and the weekly map above the volume bars. */
.pl-day-muscles { margin: 14px 0 4px; padding: 14px; border-radius: 18px; background: var(--panel-2); }
.pl-day-muscles .pl-kicker { margin-bottom: 10px; }
.pl-day-muscles .mm-track { background: var(--panel); }
.pl-vol-map { max-width: 220px; margin: 6px auto 10px; text-align: center; }
.pl-vol-map p { margin: 6px 0 0; }

/* Muscle freshness (Workouts): tired muscles in amber, bars show how fresh. */
.wo-fresh { --mm-hit: 245, 158, 11; }
.wo-fresh .hm-section-head { margin-bottom: 10px; }
