.workout-entry-screen .page-content { position: relative; isolation: isolate; }
.workout-entry-screen .page-content > header,
.workout-entry-screen .page-content > main,
.workout-entry-screen .page-content > footer { position: relative; z-index: 1; }
.workout-entry-screen .page-content > header { z-index: 40; }

.workout-form {
    width: 100%;
    max-width: 720px;
    margin-top: 24px;
    padding: 32px;
    background: radial-gradient(ellipse at 12% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 68%), color-mix(in srgb, var(--panel-bg) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, var(--accent) 18%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 7%, transparent), 0 12px 28px rgb(0 0 0 / 8%);
}

.form-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.form-intro-copy { min-width: 0; }

.form-intro p,
.section-description {
    margin-top: 7px;
    color: #66667a;
    font-size: 13px;
}

.form-kicker {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.session-timer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 18px;
    padding: 16px;
    background: color-mix(in srgb, var(--muted-bg) 82%, transparent);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.session-timer-readout { display: grid; gap: 5px; }
.session-timer-readout output {
    color: var(--text);
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    font-weight: bold;
}
.session-timer-readout p { margin: 0; color: #9292a3; font-size: 12px; }
.session-timer-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.session-timer-controls button {
    min-height: 40px;
    padding: 8px 13px;
    color: var(--accent-ink);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.session-timer-controls button[hidden] { display: none; }
.session-timer-controls button:disabled { opacity: .55; cursor: wait; }
.session-timer-controls #discardSessionTimeButton { color: var(--text); background: transparent; border-color: var(--border); }
.session-timer-controls #checkBackInButton { color: var(--accent); background: transparent; }
.use-session-time { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 13px; }
.use-session-time[hidden] { display: none; }
.workout-form .use-session-time input {
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    accent-color: var(--accent);
}

.workout-form h2 { margin-top: 20px; margin-bottom: 5px; font-size: 18px; }
.workout-form label { font-size: 14px; font-weight: bold; }
.optional-label { color: #66667a; font-size: 11px; font-weight: normal; }

.exercise-card {
    --exercise-glow-position: 100% 0%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 5px 0 15px;
    padding: 20px;
    background: radial-gradient(ellipse at var(--exercise-glow-position), color-mix(in srgb, var(--accent) 8%, transparent), transparent 66%), color-mix(in srgb, var(--muted-bg) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, var(--accent) 18%);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent), 0 8px 20px rgb(0 0 0 / 7%);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.exercise-card:nth-child(even) { --exercise-glow-position: 0% 100%; }

@media (hover: hover) {
    .exercise-card:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
    .exercise-card { transition: none; }
    .exercise-card:hover { transform: none; }
}

.exercise-card h3 { font-size: 16px; color: var(--accent); }

/* "Last time: 80 kg × 8, 8, 7" under the exercise, with a button to fill in the same sets. */
.exercise-last-time {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 8px;
    padding: 8px 10px;
    color: var(--muted-text);
    background: var(--soft-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
}
.exercise-last-time-repeat {
    padding: 4px 10px;
    color: var(--accent);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.exercise-last-time-repeat:hover { color: var(--accent-ink); background: var(--accent); }

/* Coach's "Ready to go heavier" note (Premium): one compact accent-edged line that slides in with a light sweep. */
.exercise-coach-tip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 11px;
    color: var(--text);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--panel-bg)), var(--panel-bg) 75%) padding-box,
        linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 25%, var(--border)) 60%) border-box;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    animation: coach-tip-in 380ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.exercise-coach-tip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: coach-tip-sheen 1100ms 260ms ease-out forwards;
    pointer-events: none;
}
/* Just the arrow, in the accent colour. */
.exercise-coach-tip-icon { display: grid; flex: 0 0 auto; place-items: center; color: var(--accent); }
.exercise-coach-tip-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)); }
.exercise-coach-tip-body { display: grid; gap: 1px; min-width: 0; }
.exercise-coach-tip strong { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 1.3; }
/* The crown on its own, without the round chip it has elsewhere. */
.exercise-coach-tip strong .premium-crown { width: 13px; height: 13px; background: none; border: 0; border-radius: 0; }
.exercise-coach-tip strong .premium-crown svg { width: 13px; height: 13px; }
.exercise-coach-tip-text { color: var(--muted-text); font-size: 12px; line-height: 1.35; }
@keyframes coach-tip-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes coach-tip-sheen { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
    .exercise-coach-tip, .exercise-coach-tip::after { animation: none; }
    .exercise-coach-tip::after { display: none; }
}
.exercise-card-heading,
.body-part-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.remove-exercise-button,
.remove-body-part-button {
    flex: 0 0 auto;
    padding: 7px 10px;
    background: transparent;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.remove-exercise-button:disabled { opacity: 0.45; cursor: default; }
.workout-form [hidden] { display: none !important; }

.workout-blocks-title { font-size: 14px; font-weight: bold; }
.workout-blocks-intro .section-description { margin-top: 4px; }
.workout-blocks { display: flex; flex-direction: column; }
.rep-section { display: flex; flex-direction: column; gap: 10px; }
.cardio-block .cardio-fields { display: flex; }
.cardio-fields label { display: flex; flex-direction: column; gap: 7px; }
.session-duration-field { display: flex; flex-direction: column; gap: 10px; }
.cancel-edit-link { align-self: center; padding: 6px; color: #9292a3; font-size: 13px; }

.workout-cardio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workout-cardio-actions button[hidden] { display: none; }

.workout-split-selection {
    display: grid;
    justify-items: end;
    gap: 7px;
    min-width: 0;
}

.select-split-button {
    align-self: flex-start;
    padding: 9px 12px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.select-split-button:hover { background: var(--accent); color: var(--accent-ink); }
.selected-split-label { color: var(--muted-text); font-size: 12px; }
.form-intro .form-intro-status { grid-column: 1 / -1; margin-top: 0; }
.selected-split-label[hidden] { display: none; }

.split-selection-dialog {
    width: min(460px, calc(100vw - 32px));
    max-height: min(75vh, 600px);
    margin: auto;
    padding: 20px;
    overflow: auto;
    background: var(--panel-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.split-selection-dialog:not([open]) { display: none; }
.split-selection-dialog::backdrop { background: rgb(0 0 0 / 65%); backdrop-filter: blur(3px); }

.split-selection-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.split-selection-dialog-header h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 20px; }
.split-selection-dialog-header button {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    background: transparent;
    color: var(--muted-text);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
}

.split-selection-list { display: grid; gap: 8px; }
.split-plan-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.split-plan-option > div { display: grid; min-width: 0; gap: 4px; }
.split-plan-option strong { overflow-wrap: anywhere; color: var(--text); font-size: 13px; }
.split-plan-option span { color: var(--muted-text); font-size: 11px; }
.split-plan-option .split-choice-button { flex: 0 0 auto; white-space: nowrap; }
.split-plan-back-button { margin-bottom: 12px; padding: 7px 9px; background: transparent; color: var(--muted-text); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 11px; }
.split-plan-week-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.split-plan-day { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 7px; padding: 10px; background: var(--muted-bg); border: 1px solid var(--border); border-radius: 6px; }
.split-plan-day.has-workout { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.split-plan-day > strong { color: var(--accent); font-size: 11px; }
.split-plan-day h3 { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.split-plan-day p { color: var(--muted-text); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.split-plan-day .split-choice-button { flex: 0 0 auto; margin-top: auto; white-space: nowrap; }
.split-plan-day.is-empty { opacity: 0.65; }

@media (max-width: 600px) {
    .split-plan-week-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .session-timer { gap: 8px 10px; padding: 12px; }
    .session-timer-readout { min-width: 0; }
    .session-timer-readout output { font-size: 24px; white-space: nowrap; }
    .session-timer-controls { flex-wrap: nowrap; justify-content: flex-end; }
    .session-timer-controls button { padding-inline: 8px; font-size: 12px; }
}

@media (max-width: 380px) {
    .split-plan-week-overview { grid-template-columns: minmax(0, 1fr); }
}
.split-choice-button {
    padding: 8px 11px;
    background: var(--accent);
    color: var(--accent-ink);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}
.split-choice-button:hover { background: transparent; color: var(--accent); }
.selected-split-label { overflow-wrap: anywhere; line-height: 1.4; }
.split-selection-empty-state { display: grid; gap: 10px; padding: 16px 0 4px; }
.split-selection-empty,
.split-selection-error { color: var(--muted-text); font-size: 13px; line-height: 1.5; }
.split-selection-error { color: #ff737b; }
.split-selection-empty-state a { color: var(--accent); font-size: 13px; }

.workout-participants-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 4px 0 8px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.workout-participants-section[hidden] { display: none; }

.workout-participants-section p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: bold;
}

.select-workout-friends {
    padding: 8px 12px;
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.select-workout-friends:hover {
    background-color: var(--accent);
    color: var(--accent-ink);
}

.selected-workout-friends {
    flex-basis: 100%;
    color: var(--muted-text);
    font-size: 12px;
}

.workout-friends-dialog {
    width: min(440px, calc(100vw - 32px));
    max-height: min(75vh, 560px);
    margin: auto;
    padding: 22px;
    background-color: var(--panel-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.workout-friends-dialog:not([open]) { display: none; }
.workout-friends-dialog::backdrop { background-color: rgb(0 0 0 / 65%); backdrop-filter: blur(3px); }

.workout-friends-dialog-header,
.workout-friends-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workout-friends-dialog-header h2 { margin: 0; color: var(--text); font-size: 20px; }

.workout-friends-dialog-header button {
    width: 34px;
    height: 34px;
    background-color: transparent;
    color: var(--muted-text);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
}

.workout-friends-list {
    display: grid;
    max-height: 48vh;
    overflow-y: auto;
    gap: 4px;
    margin: 16px 0;
}

.workout-friend-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
}

.workout-friend-option:hover { background-color: var(--soft-bg); }

.workout-friends-dialog .workout-friend-option input {
    appearance: none;
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    place-content: center;
    background-color: var(--soft-bg);
    border: 1px solid var(--muted-text);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.workout-friends-dialog .workout-friend-option input::before {
    content: "";
    width: 8px;
    height: 5px;
    border: solid var(--accent-ink);
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg) scale(0);
    transition: transform 120ms ease;
}

.workout-friends-dialog .workout-friend-option input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: none;
}

.workout-friends-dialog .workout-friend-option input:checked::before {
    transform: rotate(-45deg) scale(1);
}

.workout-friends-dialog .workout-friend-option input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.workout-friends-dialog .workout-friend-option input:active {
    transform: scale(0.9);
}

.workout-friends-empty,
.workout-friends-loading {
    padding: 16px 0;
    color: var(--muted-text);
    font-size: 13px;
}

.workout-friends-loading { display: grid; gap: 16px; }
.workout-friends-loading .skeleton-line { width: 80%; }
.workout-friends-actions { justify-content: flex-end; }

.additional-body-part-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 16px;
    padding: 18px;
    background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 68%), color-mix(in srgb, var(--muted-bg) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, var(--accent) 18%);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent), 0 8px 20px rgb(0 0 0 / 7%);
}

.body-part-section-heading label {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
    font-weight: bold;
}

.workout-participants-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 4px 0 8px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.workout-participants-section[hidden] {
    display: none;
}

.workout-participants-section p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: bold;
}

.select-workout-friends {
    padding: 8px 12px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.select-workout-friends:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.selected-workout-friends {
    flex-basis: 100%;
    color: var(--muted-text);
    font-size: 12px;
}

.workout-friends-dialog {
    width: min(440px, calc(100vw - 32px));
    max-height: min(75vh, 560px);
    margin: auto;
    padding: 22px;
    background: var(--panel-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.workout-friends-dialog:not([open]) {
    display: none;
}

.workout-friends-dialog::backdrop {
    background: rgb(0 0 0 / 65%);
    backdrop-filter: blur(3px);
}

.workout-friends-dialog-header,
.workout-friends-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workout-friends-dialog-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
}

.workout-friends-dialog-header button {
    width: 34px;
    height: 34px;
    background: transparent;
    color: var(--muted-text);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
}

.workout-friends-list {
    display: grid;
    max-height: 48vh;
    overflow-y: auto;
    gap: 4px;
    margin: 16px 0;
}

.workout-friend-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
}

.workout-friend-option:hover { background: var(--soft-bg); }
.workout-form .workout-friend-option input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    accent-color: var(--accent);
}

.workout-friends-empty,
.workout-friends-loading {
    padding: 16px 0;
    color: var(--muted-text);
    font-size: 13px;
}

.workout-friends-loading {
    display: grid;
    gap: 16px;
}

.workout-friends-loading .skeleton-line { width: 80%; }

.workout-friends-actions {
    justify-content: flex-end;
}

.workout-form input,
.workout-form select {
    width: 100%;
    padding: 11px;
    margin-bottom: 15px;
    background-color: var(--soft-bg);
    color: white;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.workout-form input:focus,
.workout-form select:focus { outline: none; border-color: var(--accent); }

.pr-section {
    display: none;
    margin-top: 8px;
    padding: 20px;
    background-color: var(--muted-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

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

.section-heading h2 {
    margin-top: 5px;
    color: white;
    font-size: 18px;
}

.new-pr-button {
    padding: 9px 12px;
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.new-pr-button:hover { background-color: var(--accent); color: var(--accent-ink); }

.pr-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.pr-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr) auto;
    align-items: end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.pr-row label { display: flex; flex-direction: column; gap: 6px; }
.pr-row input,
.pr-row select { margin-bottom: 0; }

.remove-pr-button {
    padding: 10px;
    background-color: transparent;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    border-radius: 6px;
    cursor: pointer;
}

.rep-options { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.rep-button {
    padding: 10px 20px;
    background-color: var(--soft-bg);
    color: #66667a;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}
.rep-button:hover { color: white; }
.rep-button.selected { background-color: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.custom-mode-button,
.add-custom-set-button,
.add-timed-set-button,
.remove-custom-set-button {
    padding: 9px 12px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.custom-mode-button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.custom-set-editor,
.timed-set-editor { display: grid; gap: 10px; }
.custom-set-rows,
.timed-set-rows { display: grid; gap: 6px; }
/* Sets as one small table: the column names once, then a slim row per set. */
.custom-set-editor,
.timed-set-editor { padding: 12px; background: var(--soft-bg); border: 1px solid var(--border); border-radius: 8px; }
.custom-set-head,
.custom-set-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr) 30px;
    align-items: center;
    gap: 8px;
}
.timed-set-head,
.timed-set-row { grid-template-columns: 38px minmax(0, 1fr) 30px; }
.custom-set-head { color: var(--muted-text); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.custom-set-head > span:first-child { text-align: center; }
.custom-set-row strong { color: var(--accent); font-size: 13px; text-align: center; }
.custom-set-row input { min-width: 0; margin: 0; padding: 9px 10px; }
.custom-set-row .remove-custom-set-button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--muted-text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
}
.custom-set-row .remove-custom-set-button:hover:not(:disabled) { color: #ff6b6b; border-color: rgb(255 107 107 / 40%); }
.custom-set-row .remove-custom-set-button:disabled { opacity: 0.3; cursor: default; }
.set-type-key { margin: 0; color: var(--muted-text); font-size: 11px; line-height: 1.5; }
.set-type-key span { font-weight: 800; }
.set-type-key .is-warmup { color: #f2b84b; }
.set-type-key .is-drop { color: #7fb4ff; }
.set-type-key .is-failure { color: #ff6b6b; }

.custom-set-row .set-type-button {
    align-self: end;
    width: 38px;
    height: 36px;
    margin: 0;
    padding: 0;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.custom-set-row .set-type-button.is-warmup { color: #f2b84b; background: rgb(242 184 75 / 10%); border-color: rgb(242 184 75 / 45%); }
.custom-set-row .set-type-button.is-drop { color: #7fb4ff; background: rgb(127 180 255 / 10%); border-color: rgb(127 180 255 / 45%); }
.custom-set-row .set-type-button.is-failure { color: #ff6b6b; background: rgb(255 107 107 / 10%); border-color: rgb(255 107 107 / 45%); }
.custom-set-row .set-type-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.workout-form input[type="date"] { color-scheme: dark; }
.submit-button {
    padding: 12px;
    margin-top: 10px;
    background-color: var(--accent);
    color: var(--accent-ink);
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}
.submit-button:hover { background-color: color-mix(in srgb, var(--accent) 88%, black); }

.bike-container {
    display: none;
    width: 100%;
    padding: 20px;
    background-color: var(--muted-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-direction: column;
    gap: 10px;
}

.bike-container label { font-size: 14px; font-weight: bold; }
.bike-container input {
    width: 100%;
    padding: 11px;
    background-color: var(--soft-bg);
    color: white;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.workout-form textarea {
    width: 100%;
    min-height: 84px;
    padding: 11px;
    resize: vertical;
    background-color: var(--soft-bg);
    color: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}
.cardio-field-hint { color: #9292a3; font-size: 12px; line-height: 1.45; }
.cardio-metrics { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 6px; color: #9292a3; font-size: 13px; }
.cardio-metrics strong { margin-left: 5px; color: var(--accent); font-variant-numeric: tabular-nums; }
.distance-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 4px;
}

.distance-preset {
    padding: 8px 10px;
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.distance-preset:hover,
.distance-preset.active {
    background-color: var(--accent);
    color: var(--accent-ink);
}

@media (max-width: 600px) {
    .workout-form { padding: 22px; }
    .pr-row { grid-template-columns: 1fr; align-items: stretch; }
    .remove-pr-button { justify-self: start; }
}
.reset-draft-button { justify-self: end; margin-top: 8px; }

/* Coach's "Welcome back" note at the top of the form, for the first workout after a break. */
.coach-comeback-note { margin: 0 0 16px; padding: 11px 14px; }
.coach-comeback-note[hidden] { display: none; }
.coach-comeback-note strong { font-size: 14px; }
.coach-comeback-note .exercise-coach-tip-text { font-size: 13px; }

/* ----- Logging animations (js/pages/workoutForm.js, play()) ----- */
/* A new body part, cardio activity or exercise slides in. */
.additional-body-part-section.is-entering,
.exercise-card.is-entering { animation: log-enter 320ms cubic-bezier(0.2, 0.75, 0.25, 1) both; }
/* What you just picked (body part, activity, exercise, date, friend) glows once in the accent colour. */
.is-picked { animation: log-picked 620ms ease-out; }
.exercise-card.is-picked { animation: log-picked-card 700ms ease-out; }
.workout-friend-option.is-picked { animation: log-friend-pop 360ms cubic-bezier(0.2, 0.75, 0.25, 1.4); }
@keyframes log-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes log-picked { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes log-picked-card { 0% { border-color: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes log-friend-pop { 0% { transform: scale(1); } 45% { transform: scale(1.04); } 100% { transform: scale(1); } }
/* Saving packs the workout into the button: it swells while the blocks fly in, then shows a box. */
.submit-button.is-packing { animation: log-pack 620ms ease-in-out infinite; }
.submit-button.is-packed { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.workout-packed-box { display: inline-grid; width: 20px; height: 20px; place-items: center; animation: log-box 520ms cubic-bezier(0.2, 0.75, 0.25, 1.4); }
.workout-packed-box svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
@keyframes log-pack { 50% { transform: scale(1.04); } }
@keyframes log-box { 0% { transform: scale(0.3) rotate(-20deg); opacity: 0; } 70% { transform: scale(1.2) rotate(6deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .additional-body-part-section.is-entering, .exercise-card.is-entering, .is-picked, .exercise-card.is-picked,
    .workout-friend-option.is-picked, .submit-button.is-packing, .workout-packed-box { animation: none; }
}
