:root {
  --theme-accent: #ff3345;
  --theme-welcome: #ff263b;
  --theme-bright: #ff5261;
  --theme-logo: #ed1429;
  --theme-primary: #f0192d;
  --theme-hover: #c90018;
  --theme-border: #493033;
  --theme-border-strong: #6d3439;
  --theme-tint: #351116;
  --theme-tint-deep: #301416;
  --theme-line: #3b2527;
  --theme-soft: #ff9aa4;
  --theme-muted: #a23c46;
  --theme-glow: rgba(180, 0, 20, 0.22);
  color-scheme: light;
  --ink: #111111;
  --muted: #666666;
  --primary: #111111;
  --primary-hover: #000000;
  --paper: #f7f7f7;
  --card: #ffffff;
  --line: #dddddd;
  --accent: #ffffff;
  --danger: #111111;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-color-scheme="magenta"] {
  --theme-accent: #cc00cc;
  --theme-welcome: #cc00cc;
  --theme-bright: #eb66eb;
  --theme-logo: #cc00cc;
  --theme-primary: #cc00cc;
  --theme-hover: #a300a3;
  --theme-border: #493049;
  --theme-border-strong: #6d346d;
  --theme-tint: #351135;
  --theme-tint-deep: #301430;
  --theme-line: #3b253b;
  --theme-soft: #ff9aff;
  --theme-muted: #a23ca2;
  --theme-glow: rgba(204, 0, 204, 0.22);
}

body[data-color-scheme="cyan"] {
  --theme-accent: #00c8ff;
  --theme-welcome: #00c8ff;
  --theme-bright: #66deff;
  --theme-logo: #00c8ff;
  --theme-primary: #00c8ff;
  --theme-hover: #0085aa;
  --theme-border: #304349;
  --theme-border-strong: #345f6d;
  --theme-tint: #112d35;
  --theme-tint-deep: #142a30;
  --theme-line: #25363b;
  --theme-soft: #9ae9ff;
  --theme-muted: #3c8ca2;
  --theme-glow: rgba(0, 200, 255, 0.22);
}

body[data-color-scheme="yellow"] {
  --theme-accent: #ffc30b;
  --theme-welcome: #ffc30b;
  --theme-bright: #ffff66;
  --theme-logo: #ffc30b;
  --theme-primary: #ffc30b;
  --theme-hover: #aa8207;
  --theme-border: #494930;
  --theme-border-strong: #6d6d34;
  --theme-tint: #353511;
  --theme-tint-deep: #303014;
  --theme-line: #3b3b25;
  --theme-soft: #ffff9a;
  --theme-muted: #a2a23c;
  --theme-glow: rgba(255, 195, 11, 0.22);
}

body[data-color-scheme="orange"] {
  --theme-accent: #ff6e00;
  --theme-welcome: #ff6e00;
  --theme-bright: #ffa866;
  --theme-logo: #ff6e00;
  --theme-primary: #ff6e00;
  --theme-hover: #aa4900;
  --theme-border: #493b30;
  --theme-border-strong: #6d4d34;
  --theme-tint: #352111;
  --theme-tint-deep: #302014;
  --theme-line: #3b2f25;
  --theme-soft: #ffc69a;
  --theme-muted: #a2683c;
  --theme-glow: rgba(255, 110, 0, 0.22);
}

body[data-color-scheme="lime"] {
  --theme-accent: #4cbb17;
  --theme-welcome: #4cbb17;
  --theme-bright: #9cff66;
  --theme-logo: #4cbb17;
  --theme-primary: #4cbb17;
  --theme-hover: #327d0f;
  --theme-border: #394930;
  --theme-border-strong: #486d34;
  --theme-tint: #1e3511;
  --theme-tint-deep: #1e3014;
  --theme-line: #2d3b25;
  --theme-soft: #beff9a;
  --theme-muted: #60a23c;
  --theme-glow: rgba(76, 187, 23, 0.22);
}

body:is([data-color-scheme="cyan"], [data-color-scheme="yellow"], [data-color-scheme="orange"], [data-color-scheme="lime"]) .workout-action-button,
body:is([data-color-scheme="cyan"], [data-color-scheme="yellow"], [data-color-scheme="orange"], [data-color-scheme="lime"]) .add-exercise-button {
  color: #111111;
}

body[data-color-scheme="ultramarine"] {
  --theme-accent: #ff6a00;
  --theme-welcome: #ff6a00;
  --theme-bright: color-mix(in srgb, #ff6a00 70%, #ffffff);
  --theme-logo: #ff6a00;
  --theme-primary: #ff6a00;
  --theme-hover: color-mix(in srgb, #ff6a00 75%, #000000);
  --theme-border: #7098ff;
  --theme-border-strong: #a4bdff;
  --theme-tint: #172650;
  --theme-tint-deep: #101b38;
  --theme-line: #3c5599;
  --theme-soft: color-mix(in srgb, #ff6a00 70%, #ffffff);
  --theme-muted: #a9c3ff;
  --theme-glow: color-mix(in srgb, #ff6a00 16%, transparent);
}

/* Dark mode surfaces for the saturated schemes. */
body.intensity-theme[data-display-mode="dark"][data-color-scheme="ultramarine"] {
  --paper: #172d80;
  --card: #090e1b;
  --scheme-card: #090e1b;
  --scheme-input: #101b38;
  --muted: #bcd0ff;
}

body.intensity-theme[data-color-scheme="ultramarine"] :is(.storage-indicator, .session-date, .workout-choice-status, .exercise-progress, .set-number, .stat-label, .volume-label, .summary-footnote, .privacy-note) {
  color: #bcd0ff;
}

.color-scheme-select {
  width: 100%;
}

.pull-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--theme-accent);
  pointer-events: none;
  transform: translate(-50%, calc(var(--pull-distance, 0px) / 2 - 16px));
  opacity: var(--pull-progress, 0);
  transition: transform 260ms ease-out, opacity 180ms ease-out;
}

#app-shell.pull-refresh-moving {
  transform: translate3d(0, var(--pull-distance, 0px), 0);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#app-shell.is-pulling,
.pull-refresh-indicator.is-pulling {
  transition: none;
}

.pull-refresh-indicator.is-ready svg {
  stroke-width: 2.8;
}

.pull-refresh-indicator[hidden] {
  display: none;
}

.pull-refresh-indicator.is-refreshing svg {
  animation: pull-refresh-spin 0.7s linear infinite;
}

@keyframes pull-refresh-spin {
  to { transform: rotate(360deg); }
}

html.pull-refresh-enabled:has(#app-shell:not([hidden])) {
  overscroll-behavior-y: none;
}

@media (prefers-reduced-motion: reduce) {
  #app-shell.pull-refresh-moving,
  .pull-refresh-indicator {
    transition: none;
  }
  .pull-refresh-indicator.is-refreshing svg {
    animation: none;
  }
}

body[data-color-scheme="lava"] {
  --theme-accent: #00edff;
  --theme-welcome: #00edff;
  --theme-bright: #83f6ff;
  --theme-logo: #00edff;
  --theme-primary: #00edff;
  --theme-hover: #00c8db;
  --theme-border: #ff784f;
  --theme-border-strong: #ffa27f;
  --theme-tint: #491b10;
  --theme-tint-deep: #35130d;
  --theme-line: #a9472a;
  --theme-soft: #83f6ff;
  --theme-muted: #ffd2c5;
  --theme-glow: rgba(255, 91, 20, 0.16);
}

body.intensity-theme[data-display-mode="dark"][data-color-scheme="lava"] {
  --paper: #701707;
  --card: #180b09;
  --scheme-card: #180b09;
  --scheme-input: #35130d;
  --muted: #ffd2c5;
}

body.intensity-theme[data-color-scheme="lava"] :is(.storage-indicator, .session-date, .workout-choice-status, .exercise-progress, .set-number, .stat-label, .volume-label, .summary-footnote, .privacy-note) {
  color: #ffd2c5;
}

.brand:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

* {
  box-sizing: border-box;
}

html {
  background-color: #000000;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

#app-shell[hidden],
.welcome-screen[hidden] {
  display: none;
}

.welcome-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 28px;
  display: grid;
  place-items: center;
  background: #000000;
  color: #ffffff;
  text-align: center;
}

.welcome-content {
  width: min(100%, 480px);
}

.welcome-brand {
  margin: 0 0 24px;
  color: #a8a8a8;
  font: 700 11px "Manrope", sans-serif;
  letter-spacing: 4px;
}

.welcome-content h1 {
  margin: 0;
  color: var(--theme-welcome);
  font: 800 clamp(52px, 12vw, 88px)/1 "Manrope", sans-serif;
  letter-spacing: 0.04em;
}

.welcome-prompt {
  margin: 19px 0 22px;
  color: #c3c3c3;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.profile-choices {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.cloud-login-panel,
#profile-choice-panel {
  width: min(100%, 360px);
  margin: 28px auto 0;
}

.cloud-login-panel {
  display: grid;
  justify-items: center;
  text-align: center;
}

.cloud-login-panel[hidden] {
  display: none;
}

.cloud-login-panel h2 {
  margin-bottom: 8px;
  font: 700 20px "Manrope", sans-serif;
}

.cloud-login-panel .welcome-prompt {
  margin-bottom: 4px;
}

.welcome-attribution {
  margin: 0 0 22px;
  color: #c3c3c3;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.google-signin-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 320px);
  min-height: 54px;
  margin: 24px auto 0;
  padding: 10px 16px;
  border: 1px solid #555;
  border-radius: 8px;
  background: #fff;
  color: #222;
  cursor: pointer;
  font: 700 16px "Manrope", sans-serif;
  text-align: center;
}

.google-signin-button:hover {
  border-color: #aaa;
  background: #f2f2f2;
}

.google-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.cloud-login-message {
  min-height: 1.5em;
  color: var(--theme-soft);
  font-size: 13px;
}

.cloud-login-message:empty {
  display: none;
}

.profile-choice {
  width: min(44vw, 170px);
  min-height: 54px;
  border: 1px solid var(--theme-border-strong);
  border-radius: 8px;
  background: var(--scheme-card, #151515);
  color: #ffffff;
  cursor: pointer;
  font: 700 15px "Manrope", sans-serif;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.profile-choice:hover {
  transform: translateY(-2px);
  border-color: var(--theme-welcome);
  background: #2a0b0f;
}

.profile-choice:focus-visible {
  outline: 2px solid var(--theme-welcome);
  outline-offset: 4px;
}

body.intensity-theme {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #c5c5c5;
  --primary: var(--theme-primary);
  --primary-hover: var(--theme-hover);
  --paper: #090909;
  --card: #151515;
  --line: var(--theme-line);
  --danger: var(--theme-bright);
  background:
    radial-gradient(ellipse at 88% 4%, var(--theme-glow), transparent 32rem),
    var(--paper);
}

body.intensity-theme:has(.welcome-screen:not([hidden])) {
  background: #000000;
}

body.intensity-theme .topbar {
  border-bottom-color: var(--theme-line);
}

body.intensity-theme .brand-period,
body.intensity-theme .section-kicker,
body.intensity-theme .summary-icon,
body.intensity-theme .empty-icon,
body.intensity-theme .exercise-index,
body.intensity-theme .volume-value,
body.intensity-theme .add-set-button,
body.intensity-theme .privacy-note span {
  color: var(--theme-accent);
}

body.intensity-theme .brand-mark,
body.intensity-theme .storage-dot {
  background: var(--theme-logo);
}

body.intensity-theme .storage-dot.is-cloud-connected {
  background: #22c55e;
  box-shadow: none;
}

body.intensity-theme .brand-mark span {
  background: #ffffff;
}

body.intensity-theme .storage-indicator,
body.intensity-theme .session-date,
body.intensity-theme .workout-choice-status,
body.intensity-theme .exercise-progress,
body.intensity-theme .set-number,
body.intensity-theme .stat-label,
body.intensity-theme .volume-label,
body.intensity-theme .summary-footnote,
body.intensity-theme .privacy-note {
  color: #b8b8b8;
}

body.intensity-theme .workout-choice,
body.intensity-theme .add-workout-form input,
body.intensity-theme .week-select,
body.intensity-theme .set-input {
  border-color: var(--theme-border);
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
}

body.intensity-theme .workout-choice.is-selected {
  border-color: var(--theme-primary);
  background: var(--theme-tint);
  color: #ffffff;
}

body.intensity-theme .workout-choice:hover,
body.intensity-theme .workout-choice.is-selected .workout-choice-status {
  border-color: var(--theme-bright);
  color: #ffffff;
}

body.intensity-theme .workout-title::placeholder,
body.intensity-theme .add-workout-form input::placeholder,
body.intensity-theme .exercise-input-wrap input::placeholder {
  color: #a8a0a1;
}

body.intensity-theme .workout-title:focus-visible,
body.intensity-theme .exercise-name-editor:focus-visible,
body.intensity-theme .set-input:focus,
body.intensity-theme .add-workout-form input:focus,
body.intensity-theme .exercise-input-wrap:focus-within {
  border-color: var(--theme-accent);
  outline-color: var(--theme-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 25%, transparent);
}

body.intensity-theme .workout-action-button,
body.intensity-theme .add-workout-button,
body.intensity-theme .add-exercise-button {
  background: var(--theme-logo);
  color: #ffffff;
}

body.intensity-theme[data-display-mode="dark"][data-color-scheme="ultramarine"] :is(.workout-action-button, .add-workout-button, .add-exercise-button) {
  color: #111111;
}

body.intensity-theme[data-display-mode="dark"][data-color-scheme="lava"] :is(.workout-action-button, .add-workout-button, .add-exercise-button) {
  color: #111111;
}

body.intensity-theme .workout-action-button:hover:not(:disabled),
body.intensity-theme .add-workout-button:hover,
body.intensity-theme .add-exercise-button:hover {
  background: var(--theme-hover);
}

body.intensity-theme .start-over-button {
  border-color: var(--theme-border-strong);
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
}

body.intensity-theme .start-over-button:hover {
  background: var(--theme-tint);
}

body.intensity-theme .exercise-index,
body.intensity-theme .summary-icon,
body.intensity-theme .empty-icon {
  background: var(--theme-tint);
}

body.intensity-theme .exercise-header,
body.intensity-theme .exercise-footer,
body.intensity-theme .sets-table td,
body.intensity-theme .summary-stats,
body.intensity-theme .summary-stat + .summary-stat {
  border-color: #302426;
}

body.intensity-theme .empty-state {
  border-color: #513237;
  background: #131111;
}

body.intensity-theme .icon-button {
  color: #c4babb;
}

body.intensity-theme .icon-button:hover {
  background: var(--theme-tint);
  color: var(--theme-bright);
}

body.intensity-theme .llp-checkbox {
  accent-color: var(--theme-logo);
}

body.intensity-theme .myo-checkbox {
  accent-color: var(--theme-logo);
}

body.intensity-theme .set-input[aria-invalid="true"] {
  border-color: var(--theme-bright);
  background: var(--theme-tint-deep);
}

body.intensity-theme .storage-notice {
  border-color: var(--theme-muted);
  background: var(--theme-tint-deep);
  color: #ffffff;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  height: 76px;
  padding: 0 max(6.5vw, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.brand {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 800 23px/1 "Manrope", sans-serif;
  letter-spacing: -1.3px;
  text-decoration: none;
}

.brand-period {
  color: #111111;
}

.brand-mark {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  padding: 5px;
  display: flex;
  align-items: end;
  gap: 2px;
  border-radius: 8px;
  background: var(--primary);
}

.brand-mark span {
  width: 4px;
  border-radius: 3px;
  background: var(--accent);
}

.brand-mark span:nth-child(1) {
  height: 8px;
}

.brand-mark span:nth-child(2) {
  height: 13px;
}

.brand-mark span:nth-child(3) {
  height: 10px;
}

.bail-meter {
  flex: 0 0 auto;
  margin-inline: auto;
  display: grid;
  gap: 3px;
  color: #ffffff;
}

.bail-meter h2 {
  white-space: nowrap;
  margin: 0;
  color: #ffffff;
  font: 700 12px/1.2 "Manrope", sans-serif;
  letter-spacing: 0.02em;
}

.bail-meter-content {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bail-meter-counts {
  margin: 0;
  display: grid;
  gap: 2px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
}

.bail-meter-count {
  display: grid;
  grid-template-columns: 39px 22px;
  gap: 3px;
}

.bail-meter-count dt,
.bail-meter-count dd {
  margin: 0;
  color: #ffffff;
}

.bail-meter-count dd {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bail-meter-chart {
  height: 36px;
  position: relative;
  left: 5px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  border-bottom: 1px solid var(--theme-accent);
}

.bail-meter-bar {
  width: 16px;
  height: 0;
  flex: 0 0 16px;
  border-radius: 0;
  transition: height 220ms ease;
}

.bail-meter-bar--sean,
.bail-meter-bar--kick {
  background: var(--theme-accent);
}

.bail-meter-bar.is-stale {
  background: var(--theme-accent);
}

.storage-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555555;
  font-size: 12px;
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 16px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.topbar-actions > * {
  flex-shrink: 0;
}

.display-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  margin-inline: auto;
}

.display-mode-button svg[hidden] {
  display: none;
}

.display-mode-button .mode-moon {
  transform: rotate(-45deg);
}

.display-mode-button:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.storage-indicator strong {
  color: var(--ink);
  font-weight: 700;
}

.switch-profile-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--theme-border-strong);
  border-radius: 6px;
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.switch-profile-button:hover {
  border-color: var(--theme-bright);
  background: var(--theme-tint);
}

.refresh-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  padding: 0;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #777777;
}

.refresh-icon-button:hover {
  background: transparent;
  color: #dddddd;
}

.refresh-icon-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.refresh-control {
  position: relative;
  flex: 0 0 32px;
}

.undo-structure-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--theme-border-strong);
  border-radius: 6px;
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.undo-structure-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.undo-structure-button:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.refresh-feedback {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  color: #999999;
  font-size: 10px;
}

.refresh-feedback:empty {
  display: none;
}

.switch-profile-button:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.storage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.page-shell {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 46px 0 25px;
}

.intro-heading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.plan-note-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-note-row .plan-note {
  flex: 1;
}

.mirroring-switch {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 28px;
  cursor: pointer;
}

.mirroring-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.mirroring-switch span {
  display: block;
  margin-top: 4px;
  height: 20px;
  border-radius: 20px;
  background: #555555;
  pointer-events: none;
}

.mirroring-switch span::after {
  content: "";
  display: block;
  position: relative;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
}

.mirroring-switch input:checked + span {
  background: var(--theme-primary);
}

.mirroring-switch input:checked + span::after {
  left: 16px;
}

.mirroring-switch input:focus-visible + span {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.section-kicker {
  margin: 0;
  color: #555555;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  font: 700 clamp(30px, 4vw, 38px)/1.15 "Manrope", sans-serif;
  letter-spacing: -1.5px;
}

.workout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 19px;
}

.workout-planner {
  margin-bottom: 23px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
}

.workout-planner-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workout-planner-heading .section-kicker {
  margin-bottom: 4px;
  font-size: 9px;
}

.workout-planner-heading h2 {
  margin: 0;
  font: 700 17px "Manrope", sans-serif;
  letter-spacing: -0.4px;
}

.week-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.week-select {
  min-height: 34px;
  padding: 0 29px 0 10px;
  border: 1px solid var(--theme-border);
  border-radius: 7px;
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
  font: 600 12px "DM Sans", sans-serif;
}

.week-select:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.add-workout-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-workout-form input {
  width: 180px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #dddddd;
  border-radius: 7px;
  outline: none;
  background: #fafafa;
  color: var(--ink);
  font-size: 12px;
}

.add-workout-form input:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.add-workout-form input::placeholder {
  color: #777777;
}

.add-workout-button,
.workout-action-button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background 120ms ease;
}

.add-workout-button:hover,
.workout-action-button:hover:not(:disabled) {
  background: var(--primary-hover);
}

.start-over-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cccccc;
  border-radius: 7px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.start-over-button:hover {
  background: #eeeeee;
}

.start-over-button[hidden] {
  display: none;
}

.add-workout-button span {
  margin-right: 3px;
  font-size: 15px;
  vertical-align: -1px;
}

.workout-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.workout-context-menu {
  min-width: 148px;
  padding: 5px;
  position: fixed;
  z-index: 10;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: var(--scheme-input, #1d1b1b);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.workout-context-menu[hidden] {
  display: none;
}

.delete-workout-button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--theme-bright);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.delete-workout-button:hover,
.delete-workout-button:focus-visible {
  background: var(--theme-tint);
}

.workout-choice {
  min-height: 36px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dddddd;
  border-radius: 7px;
  background: #fafafa;
  cursor: pointer;
  text-align: left;
}

.workout-choice:hover {
  border-color: #999999;
}

.workout-choice.is-selected {
  border-color: #111111;
  background: #eeeeee;
  color: #111111;
}

.workout-choice-name {
  font-size: 11px;
  font-weight: 700;
}

.workout-choice-status {
  color: #666666;
  font-size: 9px;
}

.week-empty {
  padding: 2px 1px;
  color: #b8b8b8;
  font-size: 11px;
}

.session-controls {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.session-controls .session-date {
  margin: 0;
}

.workout-start-controls {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.workout-action-timer {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.workout-timer-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding-left: 3px;
}

.workout-timer-controls[hidden] {
  display: none;
}

.workout-timer-display {
  min-width: 52px;
  flex: 0 0 auto;
  color: var(--ink);
  font: 700 13px "Manrope", sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.workout-timer-toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.workout-timer-toggle::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  background: linear-gradient(
    to right,
    currentColor 0 3px,
    transparent 3px 10px,
    currentColor 10px 13px
  );
}

.workout-timer-toggle.is-paused::before {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  background: transparent;
}

.workout-timer-toggle:hover,
.workout-timer-toggle:active {
  background: transparent;
  color: var(--muted);
}

.workout-action-button:disabled {
  background: #bdbdbd;
  cursor: not-allowed;
}

.workout-action-button[hidden],
.add-exercise-form[hidden] {
  display: none;
}

.session-notes-card[hidden] {
  display: none;
}

.workout-layout.is-training {
  grid-template-columns: minmax(0, 1fr);
}

.workout-column {
  min-width: 0;
}

.session-heading {
  position: relative;
  min-height: 84px;
  padding: 19px 23px 17px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: var(--card);
}

.session-heading > div:first-child {
  min-width: 0;
  max-width: 100%;
}

.session-controls {
  padding-right: 30px;
}

.delete-workout-day-button {
  position: absolute;
  top: 4px;
  right: 4px;
}

.delete-workout-day-button[hidden] {
  display: none;
}

.session-heading .section-kicker {
  margin-bottom: 5px;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.workout-title {
  width: min(100%, 400px);
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 700 19px/1.3 "Manrope", sans-serif;
  letter-spacing: -0.5px;
}

.workout-title::placeholder {
  color: #777777;
  opacity: 1;
}

.workout-title:focus-visible {
  border-radius: 3px;
  outline: 2px solid #111111;
  outline-offset: 4px;
}

.session-date {
  margin: 15px 0 0;
  flex: 0 0 auto;
  color: #666666;
  font-size: 11px;
}

.exercise-list {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.empty-state {
  min-height: 208px;
  padding: 32px 22px;
  display: grid;
  justify-items: center;
  align-content: center;
  border: 1px dashed #c8c8c8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.empty-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eeeeee;
  color: #111111;
  font-size: 23px;
}

.empty-state h2 {
  margin: 0 0 5px;
  font: 700 16px/1.3 "Manrope", sans-serif;
  letter-spacing: -0.3px;
}

.empty-state p {
  max-width: 285px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.exercise-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
}

.exercise-header {
  min-height: 66px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eeeeee;
}

.exercise-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.target-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--theme-accent);
  cursor: pointer;
}

.target-button:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.target-details {
  display: grid;
  gap: 0;
  margin: 0;
}

.target-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--theme-border);
}

.target-detail-row:last-child {
  border-bottom: 0;
}

.target-detail-row dt {
  color: #dddddd;
}

.target-detail-row dd {
  margin: 0;
  color: #ffffff;
  text-align: right;
  overflow-wrap: anywhere;
}

.bail-exercise-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.bail-exercise-button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.bail-exercise-button.is-bailed,
.bail-exercise-button:disabled {
  border-color: var(--theme-border);
  background: var(--theme-tint-deep);
  color: var(--theme-bright);
  cursor: default;
}

.exercise-name-editor:disabled {
  opacity: 0.8;
}

.add-set-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.exercise-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.exercise-index {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eeeeee;
  color: #111111;
  font: 700 12px "Manrope", sans-serif;
}

.exercise-heading-text {
  min-width: 0;
  flex: 1;
}

.exercise-name-heading {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.exercise-edit-button {
  flex: 0 0 24px;
  width: 24px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--theme-accent);
  cursor: pointer;
}

.exercise-edit-button:focus-visible,
.exercise-history-name:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.exercise-history-name {
  min-width: 0;
  max-width: 270px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 14px/1.35 "Manrope", sans-serif;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  text-align: left;
}

.exercise-name-heading > [hidden] {
  display: none;
}

.exercise-edit-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.exercise-history-content {
  max-height: 55vh;
  overflow: auto;
}

.history-week + .history-week {
  margin-top: 18px;
}

.history-week h3 {
  margin: 0 0 8px;
  font-size: 12px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.history-table th,
.history-table td {
  padding: 8px 4px;
  text-align: left;
  border-bottom: 1px solid var(--theme-border);
  overflow-wrap: anywhere;
}

.exercise-name-editor {
  width: min(100%, 270px);
  min-width: 90px;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 700 14px/1.35 "Manrope", sans-serif;
  letter-spacing: -0.2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exercise-name-editor:focus-visible {
  border-radius: 3px;
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.exercise-progress {
  display: block;
  margin-top: 2px;
  color: #666666;
  font-size: 10px;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777777;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.icon-button:hover {
  background: #eeeeee;
  color: #111111;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 17px;
}

.sets-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.sets-table th {
  padding: 11px 7px 8px;
  color: #666666;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.sets-table th:first-child,
.sets-table td:first-child {
  width: 36px;
  padding-left: 0;
  padding-right: 0;
  text-align: left;
}

.sets-table th:nth-child(2),
.sets-table td:nth-child(2) {
  width: 42px;
  padding-left: 6px;
}

.sets-table th:nth-last-child(2),
.sets-table td:nth-last-child(2) {
  width: 112px;
  text-align: center;
}

.sets-table th:last-child,
.sets-table td:last-child {
  width: 80px;
  text-align: center;
}

.sets-table td {
  padding: 5px 7px;
  border-top: 1px solid #eeeeee;
}

.sets-table td:nth-child(2) .set-number {
  display: inline-block;
  margin-left: 7px;
}

.backup-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
}

.backup-menu {
  margin-top: 20px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  color: #888888;
  font-size: 11px;
}

.backup-menu summary {
  width: fit-content;
  cursor: pointer;
}

.backup-menu[open] {
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.backup-controls {
  scroll-margin-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.backup-menu summary:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.set-number {
  color: #666666;
  font: 600 11px "Manrope", sans-serif;
}

.set-input {
  width: 100%;
  min-width: 54px;
  height: 35px;
  padding: 0 10px;
  border: 1px solid #dddddd;
  border-radius: 6px;
  outline: none;
  background: #fafafa;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.set-input:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.set-input::placeholder {
  color: #aaa0a1;
  opacity: 0.62;
}

.shadow-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--scheme-card, #151515);
  color: #f5f5f5;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
}

.shadow-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.shadow-form {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.shadow-form h2 {
  margin: 0;
  font: 700 19px "Manrope", sans-serif;
}

.shadow-description {
  margin: -4px 0 4px;
  color: #b8b8b8;
  font-size: 12px;
  line-height: 1.5;
}

.shadow-form label {
  font-size: 11px;
  font-weight: 700;
}

.shadow-form select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--theme-border);
  border-radius: 7px;
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
  font: inherit;
}

.shadow-dialog-actions {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.shadow-dialog-spacer {
  flex: 1;
}

.shadow-dialog-actions [hidden] {
  display: none;
}

.shadow-dialog .workout-action-button:disabled {
  opacity: 0.5;
}

body.intensity-theme .shadow-dialog :focus-visible,
body.intensity-theme .session-controls :focus-visible {
  outline-color: var(--theme-accent);
}

.set-input[aria-invalid="true"] {
  border-color: #555555;
  background: #eeeeee;
}

.set-input:disabled {
  border-color: var(--theme-border);
  background: #241315;
  color: var(--theme-bright);
  opacity: 1;
  -webkit-text-fill-color: var(--theme-bright);
}

.llp-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.myo-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.llp-checkbox:focus-visible,
.myo-checkbox:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.llp-cell,
.myo-cell {
  text-align: center;
  vertical-align: middle;
}

.llp-cell {
  position: relative;
}

.shadow-progress {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--theme-accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.myo-cell {
  white-space: nowrap;
}

.llp-cell:has(.llp-reps-input) .llp-checkbox,
.myo-cell:has(.myo-reps-input) .myo-checkbox {
  display: none;
}

.llp-reps-input {
  min-width: 0;
  margin: 0;
  padding: 0 2px;
}

.myo-reps-input {
  display: inline-block;
  min-width: 0;
  margin: 0;
  padding: 0 2px;
  vertical-align: middle;
}

.set-input.llp-reps-input,
.set-input.myo-reps-input {
  width: 30px;
}

.myo-notes-button {
  width: 13px;
  height: 18px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777777;
  font: 700 11px "Manrope", sans-serif;
  line-height: 18px;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}

.myo-notes-button:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 1px;
}

body.intensity-theme .myo-notes-button:focus-visible {
  outline-color: var(--theme-accent);
}

.myo-notes-dialog {
  max-height: min(80vh, 720px);
  overflow-y: auto;
}

.myo-notes-dialog .shadow-form {
  padding-top: 27px;
}

.myo-notes-rows {
  display: grid;
  gap: 7px;
  padding: 6px 5px;
  max-height: min(56vh, 480px);
  overflow-y: auto;
  scroll-padding-block: 6px;
}

.myo-note-row {
  display: grid;
  grid-template-columns: minmax(75px, 1fr) minmax(90px, 140px);
  align-items: center;
  gap: 12px;
}

.myo-note-row label {
  color: #dddddd;
}

.myo-note-row input {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--theme-border);
  border-radius: 7px;
  background: var(--scheme-input, #1d1b1b);
  color: #ffffff;
  font: inherit;
}

.myo-note-row input:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.field-hint {
  display: block;
  margin-top: 3px;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.2;
}

.remove-set {
  width: 29px;
  height: 29px;
  font-size: 18px;
}

.empty-sets-cell {
  padding: 16px 7px !important;
  color: var(--muted);
  font-size: 12px;
  text-align: center !important;
}

.exercise-footer {
  padding: 10px 17px 13px;
  border-top: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exercise-info-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--theme-accent);
  font: 700 15px "Manrope", sans-serif;
  cursor: pointer;
}

.exercise-info-button:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

#exercise-edit-form :is(input, textarea) {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--theme-border);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

#exercise-edit-form textarea {
  resize: vertical;
}

#exercise-edit-info summary {
  color: var(--theme-accent);
  cursor: pointer;
  font-size: 13px;
  list-style: none;
}

#exercise-edit-info summary::-webkit-details-marker {
  display: none;
}

#exercise-edit-info summary::marker {
  content: "";
}

#exercise-edit-info label {
  display: block;
  margin: 12px 0 6px;
}

#exercise-info-content {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.add-set-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.add-set-button span {
  margin-right: 4px;
  font-size: 15px;
  vertical-align: -1px;
}

.add-set-button:hover {
  color: #000000;
}

.add-exercise-form {
  min-height: 60px;
  margin-top: 14px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dddddd;
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.045);
}

.exercise-input-wrap {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 7px;
}

.input-plus {
  color: #555555;
  font-size: 22px;
  font-weight: 400;
}

.exercise-input-wrap input {
  width: 100%;
  min-width: 0;
  height: 39px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.rpe-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

.rpe-input::-webkit-inner-spin-button,
.rpe-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.exercise-input-wrap input::placeholder {
  color: #777777;
}

.exercise-input-wrap:focus-within {
  border-radius: 6px;
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.add-exercise-button {
  min-height: 40px;
  padding: 0 14px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background 120ms ease, transform 120ms ease;
}

.add-exercise-button:hover {
  transform: translateY(-1px);
  background: var(--primary-hover);
}

.add-exercise-button span {
  margin-right: 3px;
  font-size: 15px;
  vertical-align: -1px;
}

.form-hint {
  margin: 9px 0 0 4px;
  color: #666666;
  font-size: 10px;
}

.summary-column {
  display: grid;
  gap: 13px;
}

.session-notes-card {
  margin-top: 19px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
}

.session-notes-heading {
  margin-bottom: 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.session-notes-heading .section-kicker {
  margin-bottom: 5px;
  font-size: 9px;
}

.session-notes-heading h2 {
  margin: 0;
  font: 700 17px "Manrope", sans-serif;
  letter-spacing: -0.4px;
}

.session-notes-caption {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.session-notes-paper {
  padding: 0 10px 0 35px;
  border-left: 2px solid color-mix(in srgb, var(--theme-primary) 45%, transparent);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 39px,
    var(--theme-border) 39px,
    var(--theme-border) 40px
  );
}

.session-notes-paper input {
  width: 100%;
  height: 40px;
  padding: 7px 2px 5px;
  border: 0;
  outline: none;
  background: transparent;
  color: #ffffff;
  font: 12px/1.5 "DM Sans", sans-serif;
}

.session-notes-paper input:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.summary-card {
  padding: 21px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
}

.summary-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-card-heading .section-kicker {
  margin-bottom: 6px;
  font-size: 9px;
}

.summary-card-heading h2 {
  margin-bottom: 0;
  font: 700 17px "Manrope", sans-serif;
  letter-spacing: -0.4px;
}

.summary-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eeeeee;
  color: #111111;
}

.summary-icon svg {
  width: 20px;
  height: 20px;
}

.summary-stats {
  margin-top: 20px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}

.summary-stat {
  display: grid;
  gap: 3px;
}

.summary-stat + .summary-stat {
  padding-left: 17px;
  border-left: 1px solid #eeeeee;
}

.stat-value {
  font: 700 22px/1.2 "Manrope", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.8px;
}

.stat-label {
  color: #666666;
  font-size: 10px;
}

.volume-stat {
  padding-top: 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.volume-label {
  color: #555555;
  font-size: 11px;
  font-weight: 600;
}

.volume-label span {
  color: #777777;
  font-size: 9px;
  font-weight: 400;
}

.volume-value {
  color: #111111;
  font: 700 19px "Manrope", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.volume-value span {
  font: 500 10px "DM Sans", sans-serif;
  letter-spacing: 0;
}

.summary-footnote {
  margin: 6px 0 0;
  color: #777777;
  font-size: 9px;
}

.privacy-note {
  margin: 1px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #666666;
  font-size: 10px;
}

.privacy-note span {
  color: #111111;
  font-size: 13px;
}

.storage-notice {
  margin: -18px 0 20px;
  padding: 11px 14px;
  border: 1px solid #999999;
  border-radius: 8px;
  background: #eeeeee;
  color: #111111;
  font-size: 12px;
  line-height: 1.5;
}

.storage-notice[hidden] {
  display: none;
}

.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  position: absolute;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 24px;
    gap: 8px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar .undo-structure-button,
  .topbar .switch-profile-button {
    min-height: 32px;
    white-space: nowrap;
  }

  .page-shell {
    width: min(100% - 36px, 560px);
  }

  .intro {
    padding: 35px 0 22px;
  }


  h1 {
    font-size: clamp(42px, 10vw, 55px);
  }

  .workout-layout {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .summary-column {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .summary-card {
    grid-row: span 2;
  }

  .privacy-note {
    align-self: start;
    font-size: 9px;
  }

  .workout-planner-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .add-workout-form {
    width: 100%;
  }

  .add-workout-form input {
    width: auto;
    flex: 1;
  }

}

@media (min-width: 481px) and (max-width: 600px) {
  .topbar {
    padding: 0 12px;
  }

  .topbar-actions {
    gap: 3px;
  }

  .topbar .undo-structure-button,
  .topbar .switch-profile-button {
    padding: 0 4px;
  }

  .topbar .brand {
    font-size: 20px;
  }

  .topbar .storage-indicator .saved-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0 12px;
    gap: 4px;
  }

  .brand {
    gap: 7px;
    font-size: 17px;
    letter-spacing: -0.9px;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .topbar-actions {
    gap: clamp(2px, calc((100vw - 350px) / 8), 8px);
  }

  .topbar .undo-structure-button,
  .topbar .switch-profile-button {
    padding: 0 4px;
    font-size: 9px;
  }

  .topbar .refresh-control,
  .topbar .refresh-icon-button {
    width: 22px;
    flex-basis: 22px;
  }

  .intro {
    padding-top: 37px;
  }

  .intro h1 {
    font-size: clamp(26px, 7.5vw, 36px);
    letter-spacing: -1.2px;
  }


  .storage-indicator {
    gap: 3px;
    font-size: 9px;
  }

  @media (max-width: 374px) {
    .topbar {
      padding: 0 6px;
    }
  }
}

    html[data-display-mode="light"] {
      background-color: #ffffff;
      color-scheme: light;
    }

    body.intensity-theme[data-display-mode="light"] {
      color-scheme: light;
      --ink: #111111;
      --muted: #555555;
      --paper: #ffffff;
      --card: #fafafa;
      --theme-border: color-mix(in srgb, var(--theme-primary) 20%, #dddddd);
      --theme-border-strong: color-mix(in srgb, var(--theme-primary) 35%, #cccccc);
      --theme-line: color-mix(in srgb, var(--theme-primary) 10%, #e5e5e5);
      --theme-tint: color-mix(in srgb, var(--theme-primary) 10%, #ffffff);
      --theme-tint-deep: color-mix(in srgb, var(--theme-primary) 15%, #ffffff);
    }

    body.intensity-theme[data-display-mode="light"]:has(.welcome-screen:not([hidden])),
    body[data-display-mode="light"] .welcome-screen {
      background: #ffffff;
      color: var(--ink);
    }

    body[data-display-mode="light"] :is(.profile-choice, .switch-profile-button, .undo-structure-button, .shadow-form select, .myo-note-row input, .workout-context-menu),
    body.intensity-theme[data-display-mode="light"] :is(.workout-choice, .add-workout-form input, .week-select, .set-input, .start-over-button) {
      background: #f2f2f2;
      color: var(--ink);
    }

    body[data-display-mode="light"] .shadow-dialog {
      background: var(--card);
      color: var(--ink);
      box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
    }

    body[data-display-mode="light"] .shadow-dialog::backdrop {
      background: rgba(0, 0, 0, 0.3);
    }

    body.intensity-theme[data-display-mode="light"] :is(.workout-choice.is-selected, .workout-choice:hover, .workout-choice.is-selected .workout-choice-status, .start-over-button:hover, .profile-choice:hover) {
      background: var(--theme-tint);
      color: var(--ink);
    }

    body.intensity-theme[data-display-mode="light"] :is(.workout-action-button, .add-workout-button, .add-exercise-button) {
      color: #111111;
    }

    body[data-display-mode="light"] :is(.session-notes-paper input, .bail-meter, .bail-meter h2, .bail-meter-counts, .bail-meter-count dt, .bail-meter-count dd, .exercise-name-heading, .exercise-name-editor, .exercise-name-editor:disabled, .myo-note-row label, .sets-table th) {
      color: var(--ink);
    }

    body[data-display-mode="light"] :is(.bail-meter-chart) {
      border-color: var(--theme-accent);
    }

    body[data-display-mode="light"] :is(.bail-meter-bar, .bail-meter-bar.is-stale) {
      background: var(--theme-accent);
    }

    body[data-display-mode="light"] .brand-mark span {
      background: var(--ink);
    }

    body.intensity-theme[data-display-mode="light"] :is(.storage-indicator, .session-date, .workout-choice-status, .exercise-progress, .set-number, .stat-label, .volume-label, .summary-footnote, .privacy-note, .shadow-description, .welcome-brand, .welcome-prompt, .welcome-attribution, .cloud-login-message) {
      color: var(--muted);
    }

    body.intensity-theme[data-display-mode="light"] :is(.exercise-header, .exercise-footer, .sets-table td, .summary-stats, .summary-stat + .summary-stat) {
      border-color: var(--line);
    }

    body.intensity-theme[data-display-mode="light"] .empty-state {
      background: var(--card);
      border-color: var(--theme-border);
    }

    body.intensity-theme[data-display-mode="light"] .icon-button {
      color: #666666;
    }

    body.intensity-theme[data-display-mode="light"] :is(.set-input[aria-invalid="true"], .set-input:disabled, .storage-notice) {
      background: var(--theme-tint-deep);
      color: var(--ink);
      -webkit-text-fill-color: var(--ink);
    }

    body[data-display-mode="light"] .refresh-icon-button {
      background: transparent;
      color: #666666;
    }

    body[data-display-mode="light"] :is(.refresh-icon-button:hover, .refresh-feedback, .myo-notes-button) {
      color: #555555;
    }

    body[data-display-mode="light"] .set-input::placeholder,
    body.intensity-theme[data-display-mode="light"] :is(.workout-title, .add-workout-form input, .exercise-input-wrap input)::placeholder {
      color: #777777;
    }

    @media (max-width: 420px) {
      .topbar .storage-indicator {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
      }
    }

    @media (max-width: 374px) {
      .topbar .brand {
        font-size: 15px;
        gap: 5px;
      }

      .topbar .brand-mark {
        width: 20px;
        height: 20px;
      }

      .topbar .display-mode-button {
        width: 20px;
        flex-basis: 20px;
      }
    }

@media (max-width: 480px) {
  .storage-indicator .saved-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .switch-profile-button {
    min-height: 30px;
    padding: 0 7px;
    font-size: 9px;
  }

  .page-shell {
    width: calc(100% - 30px);
  }

  .workout-planner {
    padding: 15px;
  }

  .session-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .session-controls {
    width: 100%;
    justify-content: space-between;
  }

  .workout-start-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .session-heading {
    min-height: 77px;
    padding: 16px;
  }

  .workout-title {
    max-width: 210px;
    font-size: 17px;
  }

  .session-date {
    max-width: 105px;
    font-size: 10px;
    text-align: right;
  }

  .exercise-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .table-wrap {
    padding: 0 11px;
  }

  .sets-table th {
    padding-right: 4px;
    padding-left: 4px;
    font-size: 8px;
    letter-spacing: 0.55px;
  }

  .sets-table th:first-child,
  .sets-table td:first-child {
    width: 25px;
    padding-right: 0;
  }

  .sets-table th:nth-child(2),
  .sets-table td:nth-child(2) {
    width: 27px;
    padding-left: 3px;
  }

  .sets-table td:nth-child(2) .set-number {
    margin-left: 5px;
  }

  .sets-table th:nth-last-child(2),
  .sets-table td:nth-last-child(2) {
    width: 78px;
  }

  .sets-table th:last-child,
  .sets-table td:last-child {
    width: 74px;
  }

  .sets-table td {
    padding-right: 2px;
    padding-left: 2px;
  }

  .set-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 3px;
    font-size: 16px;
  }

  .exercise-footer {
    padding-left: 13px;
  }

  .add-exercise-form {
    gap: 3px;
  }

  .add-exercise-button {
    padding: 0 9px;
    font-size: 10px;
  }

  .add-exercise-button span {
    display: none;
  }

  .summary-column {
    grid-template-columns: 1fr;
  }

  .session-notes-card {
    padding: 16px;
  }

  .session-notes-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .session-notes-paper {
    padding-right: 3px;
    padding-left: 24px;
  }

  .summary-card {
    grid-row: auto;
  }

  .privacy-note {
    margin-top: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
