/* Exercise detail is a scrollable mobile sheet, sharing the existing light palette. */
.sheet.exercise-detail-sheet .sheet-body {
  background: var(--bg);
  padding: 16px 14px;
}
.exercise-progress {
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
  color: var(--tx);
}
.ep-card {
  padding: 16px;
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  min-width: 0;
}
.ep-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.ep-heading h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ep-ai-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--brand-soft);
  padding: 3px 9px;
  border-radius: 20px;
}
.ep-saved {
  font-size: 11px;
  color: var(--ok-ink);
  white-space: nowrap;
}
.ep-caption {
  color: var(--tx-2);
  font-size: 11px;
  line-height: 1.65;
  margin: 8px 0;
}
.ep-heading > .ep-caption {
  margin: 0;
  font-size: 10px;
  text-align: right;
}
.ep-advice-values {
  display: flex;
  align-items: stretch;
  background: var(--brand-soft);
  border-radius: 12px;
  margin: 16px 0;
  overflow: hidden;
  padding: 13px 0;
}
.ep-advice-values > div {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0 4px;
  border-left: 1px solid rgba(255, 90, 60, 0.12);
}
.ep-advice-values > div:first-child {
  border-left: 0;
}
.ep-advice-values strong {
  display: block;
  font-size: 24px;
  line-height: 1.4;
  color: var(--brand-ink);
  font-weight: 750;
  overflow-wrap: anywhere;
}
.ep-advice-values span {
  display: block;
  font-size: 10px;
  color: var(--tx-2);
  margin-top: 6px;
}
.ep-advice-reason {
  white-space: pre-line;
  font-size: 12px;
  line-height: 1.85;
  color: var(--tx-2);
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.ep-manual {
  text-align: center;
  font-size: 10px;
  margin: 10px 0 0;
}
.ep-notice {
  background: var(--brand-soft);
  color: var(--brand-ink);
  padding: 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.75;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.ep-empty {
  text-align: center;
  line-height: 1.9;
  padding: 22px 4px;
  color: var(--tx-2);
  font-size: 14px;
  margin: 8px 0;
}
.ep-empty small {
  font-size: 12px;
  color: var(--tx-2);
}
.ep-segment {
  display: flex;
  gap: 4px;
  background: var(--card-2);
  padding: 3px;
  border-radius: 11px;
  margin: 10px 0;
}
.ep-segment button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 12px;
  font-family: inherit;
  color: var(--tx-2);
  padding: 5px 3px;
  line-height: 1.4;
  cursor: pointer;
}
.ep-segment button.on {
  background: var(--card);
  color: var(--brand-ink);
  font-weight: 700;
  box-shadow: 0 1px 3px #1720340a;
}
.ep-range {
  background: transparent;
  padding: 0;
  gap: 6px;
}
.ep-range button {
  background: var(--card-2);
}
.ep-range button.on {
  background: var(--brand-soft);
  box-shadow: none;
}
.ep-convention {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  color: var(--tx-2);
  font-size: 10px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.ep-convention button {
  background: none;
  border: 0;
  min-height: 44px;
  white-space: nowrap;
  color: var(--tx-2);
  font-family: inherit;
  font-size: 10px;
  padding: 4px;
  cursor: pointer;
}
.ep-latest {
  display: flex;
  align-items: baseline;
  gap: 6px;
  position: relative;
  min-height: 54px;
}
.ep-latest > strong {
  font-size: 40px;
  line-height: 1.3;
  letter-spacing: -1px;
  font-weight: 780;
}
.ep-latest > span {
  font-size: 12px;
  color: var(--tx-2);
}
.ep-delta {
  margin-left: auto;
  color: var(--ok-ink);
  font-weight: 700;
  font-size: 12px;
  background: var(--ok-soft);
  padding: 5px 9px;
  border-radius: 8px;
  align-self: center;
  text-align: center;
}
.ep-delta.down {
  color: var(--tx-2);
  background: var(--card-2);
}
.ep-delta small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: var(--tx-2);
  margin-top: 3px;
}
.ep-mini-stats {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 16px 0 8px;
}
.ep-mini-stats > div {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0 3px;
}
.ep-mini-stats strong,
.ep-summary-top strong {
  display: block;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ep-mini-stats span,
.ep-summary-top span {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: var(--tx-2);
  margin-top: 5px;
}
.ep-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  margin-top: 20px;
}
.ep-chart text {
  font-size: 10px;
  fill: var(--tx-2);
  font-family: inherit;
}
.ep-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.ep-chart g[role="button"] {
  cursor: pointer;
  outline: none;
}
.ep-chart g[role="button"]:focus circle:last-child {
  stroke: var(--tx);
  stroke-width: 3;
}
.ep-date-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--tx-2);
  font-size: 11px;
}
.ep-date-select select {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  color: var(--tx);
  background: var(--card-2);
  font-family: inherit;
  font-size: 12px;
}
.ep-selected {
  background: var(--card-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 11px;
  color: var(--tx-2);
}
.ep-selected-value {
  font-size: 25px;
  line-height: 1.5;
  margin: 8px 0;
  color: var(--tx);
  font-weight: 750;
}
.ep-selected-value small {
  font-size: 12px;
  font-weight: 400;
}
.ep-selected p {
  margin: 4px 0;
}
.ep-selected button {
  display: block;
  margin-left: auto;
  min-height: 44px;
  background: none;
  border: 0;
  color: var(--brand-ink);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.ep-stat-note {
  margin-top: 14px;
}
.ep-summary-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ep-summary-top > div {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  text-align: center;
  padding: 13px 6px;
}
.ep-summary-top strong {
  font-size: 21px;
}
[data-progress-summary] > .ep-mini-stats {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  padding: 14px 6px;
  margin-top: 10px;
}
.ep-method {
  font-size: 12px;
  line-height: 1.9;
  color: var(--tx-2);
}
.ex-history-day {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.ex-history-day > summary {
  padding: 14px 12px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.8;
  display: list-item;
  list-style-position: inside;
}
.ex-history-day > summary small {
  float: right;
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 400;
}
.ex-history-day > .ex-block {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.exercise-progress button:focus-visible,
.exercise-progress select:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 3px;
}
.exercise-progress button:disabled {
  cursor: default;
  opacity: 0.55;
}
@media (max-width: 360px) {
  .ep-card {
    padding: 13px;
  }
  .ep-advice-values strong {
    font-size: 21px;
  }
  .ep-advice-values span {
    font-size: 9px;
  }
  .ep-heading h4 {
    font-size: 15px;
  }
  .ep-mini-stats strong {
    font-size: 14px;
  }
}
