  border-color: rgba(25, 122, 97, 0.36);
  background: var(--accent-soft);
}

.set-comment-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.set-comment-toggle.has-comment .set-comment-dot {
  opacity: 1;
}

.set-row.set-up .set-weight {
  border-color: rgba(25, 122, 97, 0.5);
  background: #f3fbf7;
}

.set-row.set-down .set-weight {
  border-color: rgba(217, 107, 95, 0.5);
  background: #fff7f5;
}

.set-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.set-number {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: var(--radius);
  color: var(--accent-dark);
  font-weight: 900;
  background: var(--accent-soft);
}

.link-exercise,
.add-set,
.confirm-exercise,
.next-exercise {
  width: max-content;
  min-height: 38px;
  padding: 0 11px;
}

.exercise-flow-actions {
  display: grid;
  grid-template-columns: max-content max-content max-content max-content;
  gap: 8px;
  justify-content: flex-end;
}

.remove-exercise {
  color: var(--coral);
}

.remove-set {
  color: var(--coral);
}

.save-button {
  width: 100%;
  margin-top: 18px;
  color: #fff;
  background: var(--accent-dark);
}

.save-button:hover,
.primary-action:hover {
  filter: brightness(1.04);
}

.progress-panel canvas {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7faf7);
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 458px;
  overflow: auto;
  padding-right: 4px;
}

.history-item {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.history-item:hover {
  border-color: rgba(25, 122, 97, 0.38);
}

.history-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.history-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.history-top strong,
.history-top span {
  display: block;
}

.history-top span,
.history-summary,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-summary span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.delta-pill {
  color: var(--accent-dark);
  font-weight: 900;
}

.delta-pill.negative {
  color: var(--coral);
}

.stats-list {
  display: grid;
  gap: 8px;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.stat-row span {
  color: var(--muted);
  font-size: 13px;
}

.stat-row strong {
  color: var(--ink);
  font-size: 14px;
  text-align: right;
}

.stat-row strong.positive {
  color: var(--accent-dark);
}

.stat-row strong.negative {
  color: var(--coral);
}

.session-table {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.session-table-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(170px, 1.5fr) auto;
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.session-table-row strong {
  font-size: 13px;
}

.session-table-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.session-set-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.session-set-line {
  display: grid;
  gap: 2px;
}

.session-set-line small {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.session-table-row em {
  color: var(--accent-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.delete-session,
.copy-session-log {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
}

.delete-session {
  color: var(--coral);
  background: #fff3f1;
}

.copy-session-log {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 10px;
  gap: 5px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.client-dialog {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.client-dialog::backdrop {
  background: rgba(23, 33, 27, 0.28);
  backdrop-filter: blur(5px);
}

.client-dialog form {
  display: grid;
  gap: 14px;
}

.dialog-shell {
  display: grid;
  gap: 14px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dialog-heading > div {
  flex: 1;
  min-width: 0;
}

.dialog-heading h3 {
  font-size: 24px;
  line-height: 1.08;
}

.dialog-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.danger-button {
  color: var(--coral);
}

.quiet-add-button {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-dark);
  background: var(--surface);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.quiet-add-button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
}

.calendar-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow: auto;
}

.client-picker-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 28px));
  overflow: auto;
}

.client-picker-actions {
  display: flex;
  justify-content: flex-end;
}

.client-picker-actions .logout-button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
}

.client-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(390px, 46dvh);
  overflow: auto;
  padding-right: 2px;
}

.client-picker-list .client-row {
  grid-template-columns: minmax(0, 1fr) 44px 34px;
}

.client-picker-list .client-button {
  background: var(--surface);
}

.set-comment-dialog {
  width: min(430px, calc(100vw - 32px));
}

.exercise-suggest {
  position: fixed;
  z-index: 2400;
  display: grid;
  gap: 4px;
  max-height: min(340px, calc(100dvh - 120px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.exercise-suggest[hidden] {
  display: none;
}

.exercise-suggest-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.exercise-suggest-item:hover,
.exercise-suggest-item:focus-visible {
  background: var(--soft);
  outline: 0;
}

.exercise-suggest-item span,
.exercise-suggest-item strong,
.exercise-suggest-item em {
  min-width: 0;
}

.exercise-suggest-item strong,
.exercise-suggest-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exercise-suggest-item strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.18;
}

.exercise-suggest-item em {
  color: var(--muted);
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.calendar-dialog .training-calendar {
  grid-column: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateY(18px);
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent-dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.pull-refresh-indicator {
  position: fixed;
  top: calc(4px + var(--safe-top));
  left: 50%;
  z-index: 1200;
  transform: translate(-50%, -44px);
  min-width: 104px;
  padding: 8px 13px;
  border: 1px solid rgba(25, 122, 97, 0.22);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(23, 33, 27, 0.12);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}

.pull-refresh-indicator.visible {
  opacity: 1;
}

.pull-refresh-indicator.ready,
.pull-refresh-indicator.refreshing {
  color: #fff;
  background: var(--accent-dark);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .client-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    max-height: none;
    overflow: visible;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  * {
    max-width: 100%;
  }

  .app-shell {
    display: block;
    overflow-x: hidden;
  }

  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    align-items: center;
    min-height: auto;
    gap: 8px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
  }

  .workspace {
    padding: 14px;
    overflow-x: hidden;
  }

  .brand {
    gap: 9px;
    min-width: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    padding: 7px;
  }

  .brand h1 {
    overflow: hidden;
    font-size: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .brand p {
    display: none;
  }

  .selected-client-strip {
    display: flex;
    min-width: 0;
    min-height: 46px;
    padding: 6px 8px;
    border-radius: 12px;
  }

  .selected-client-strip .avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .selected-client-strip span:last-child {
    min-width: 0;
  }

  .selected-client-strip strong,
  .selected-client-strip small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .selected-client-strip strong {
    font-size: 14px;
    line-height: 1.1;
  }

  .selected-client-strip small {
    font-size: 11px;
  }

  body:not(.client-picker-open) .client-tools,
  body:not(.client-picker-open) .client-list,
  body.client-picker-open .client-tools,
  body.client-picker-open .client-list {
    display: none;
  }

  .client-tools {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .mode-switch {
    grid-column: 1 / -1;
  }

  .primary-action {
    width: 48px;
    padding: 0;
  }

  .primary-action span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .client-list {
    display: none;
  }

  .client-button {
    grid-template-columns: 36px minmax(126px, 1fr);
    padding: 10px;
    scroll-snap-align: start;
    background: var(--surface);
  }

  .client-row {
    flex: 0 0 min(78vw, 274px);
    grid-template-columns: minmax(0, 1fr) 42px 34px;
    scroll-snap-align: start;
  }

  .avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .client-header {
    display: none;
  }

  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .metric {
    padding: 10px;
  }

  .metric span {
    font-size: 12px;
  }

  .metric strong {
    font-size: 18px;
  }

  .content-grid {
