:root {
    --ink: #0b0b0b;
    --panel: #15120c;
    --panel-soft: #211a10;
    --gold: #d8a329;
    --gold-soft: #f2c85b;
    --text: #fff8e3;
    --muted: #c7b88b;
    --work: #9e1f1f;
    --rest: #167044;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}
button, input, label { letter-spacing: 0; }
.landing-shell, .stats-shell {
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    padding: 22px;
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.12), transparent 34%), var(--ink);
}
.landing-panel {
    width: min(100%, 520px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}
.landing-topbar, .stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}
.landing-logo {
    width: 81px;
    height: 113px;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
}
.landing-actions {
    display: flex;
    gap: 10px;
}
.icon-link {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: var(--panel);
    color: var(--gold-soft);
    text-decoration: none;
}
.icon-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.icon-link:active,
.icon-link:hover {
    background: var(--gold);
    color: #110d05;
}
.icon-link.install-icon-link {
    border-color: var(--gold);
    background: var(--gold);
    color: #110d05;
}
.stats-link, .back-link {
    color: var(--gold-soft);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.82rem;
}
.back-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: var(--panel);
}
.back-link:active,
.back-link:hover {
    background: var(--gold);
    color: #110d05;
}
.icon-action {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
}
.icon-action svg,
.add-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--gold-soft);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.landing-copy h1, .stats-header h1 {
    margin: 0;
    max-width: 11ch;
    font-size: clamp(3rem, 14vw, 5.2rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
    min-width: 0;
    overflow-wrap: anywhere;
}
.page-subtitle {
    margin: 10px 0 0;
    color: var(--gold-soft);
    font-size: 0.84rem;
    font-weight: 950;
    line-height: 1.15;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.setup-header h1 {
    max-width: none;
}
.setup-intro {
    display: grid;
    gap: 8px;
}
.setup-intro .setup-summary {
    margin-top: 0;
}
.jar-count,
.setup-summary {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.32;
    font-weight: 750;
}
.setup-form { display: grid; gap: 18px; }
.setup-deck { display: grid; gap: 10px; }
.setup-deck > span {
    color: var(--gold-soft);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.segmented-control, .duration-grid, .more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.duration-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.segmented-control .btn, .duration-grid .btn {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 163, 41, 0.38);
    background: var(--panel);
    color: var(--text);
    border-radius: 8px;
    font-weight: 900;
}
.btn-check:checked + .btn { background: var(--gold); border-color: var(--gold); color: #110d05; }
.start-button, .finish-button, .more-grid button, .timer-button {
    min-height: 58px;
    border: 0;
    border-radius: 8px;
    font-weight: 950;
    text-transform: uppercase;
}
.start-button, .finish-button { background: var(--gold); color: #110d05; font-size: 1.05rem; }
.workout-shell {
    height: 100vh;
    height: 100svh;
    width: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--ink);
}
.card-panel, .timer-panel, .complete-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: max(22px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
}
.card-panel { background: linear-gradient(180deg, var(--panel), var(--panel-soft)); position: relative; padding-top: max(76px, env(safe-area-inset-top)); }
.workout-meta {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    left: 14px;
    right: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.workout-stat {
    min-width: 0;
    display: grid;
    gap: 4px;
    align-content: start;
}
.workout-stat span {
    color: var(--muted);
    font-size: clamp(0.58rem, 2.5vw, 0.78rem);
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
}
.workout-stat strong {
    color: var(--gold-soft);
    font-size: clamp(0.92rem, 4.2vw, 1.35rem);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}
.workout-stat:nth-child(2),
.workout-stat:nth-child(3) {
    text-align: center;
}
.workout-stat:last-child {
    text-align: right;
}
.reshuffle-notice {
    position: absolute;
    top: max(48px, calc(env(safe-area-inset-top) + 30px));
    left: 22px;
    right: 22px;
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}
.side-label {
    color: var(--gold-soft);
    font-size: clamp(1.1rem, 5vw, 1.6rem);
    font-weight: 950;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.card-panel h1 {
    margin: 0;
    font-size: clamp(2.5rem, 12vw, 5rem);
    line-height: 0.94;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.card-panel p {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 4.7vw, 1.55rem);
    line-height: 1.16;
    font-weight: 700;
}
.timer-panel { align-items: center; text-align: center; transition: background-color 180ms ease; position: relative; padding-bottom: max(126px, calc(env(safe-area-inset-bottom) + 104px)); }
.timer-panel.ready { background: #9a6f13; color: #130e05; }
.timer-panel.work { background: var(--work); }
.timer-panel.rest { background: var(--rest); }
.timer-panel.paused { background: #171717; }
.phase-label { font-weight: 950; text-transform: uppercase; font-size: clamp(1.1rem, 6vw, 2rem); }
.timer-value { font-size: clamp(7rem, 38vw, 16rem); line-height: 0.9; font-weight: 950; margin: 10px 0 20px; }
.timer-actions { position: absolute; left: 22px; right: 22px; bottom: max(42px, calc(env(safe-area-inset-bottom) + 34px)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; margin: 0 auto; }
.timer-button.secondary { background: rgba(0, 0, 0, 0.38); color: var(--text); }
.timer-button.danger { background: rgba(0, 0, 0, 0.58); color: #ffd8d8; }
.timer-button.save { background: var(--gold); color: #110d05; }
.timer-button.complete { background: var(--rest); color: #eafff2; }
.complete-panel {
    position: fixed;
    inset: 0;
    z-index: 5;
    background: var(--ink);
    gap: 28px;
}
.end-modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.72);
}
.end-modal-card {
    width: min(100%, 420px);
    padding: 22px;
    border: 1px solid rgba(216, 163, 41, 0.36);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}
.end-modal-card h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(2.1rem, 10vw, 3.2rem);
    line-height: 0.95;
    text-transform: uppercase;
    font-weight: 950;
}
.end-modal-card p:not(.eyebrow) {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 18px;
}
.end-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.end-modal-actions .save {
    grid-column: 1 / -1;
    min-height: 64px;
    font-size: 1.05rem;
}
.complete-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(3rem, 14vw, 5.4rem);
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 950;
}
.complete-panel p { margin: 6px 0; color: var(--muted); font-size: 1.2rem; }
.complete-actions { display: grid; gap: 14px; }
.more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more-grid button {
    background: var(--panel-soft);
    color: var(--gold-soft);
    border: 1px solid rgba(216, 163, 41, 0.36);
}
.stats-shell { display: block; max-width: 980px; margin: 0 auto; }
.stats-header h1 { font-size: clamp(2.4rem, 10vw, 4.2rem); max-width: none; }
.stats-tab-bar {
    margin-top: 24px;
}
.stats-grid, .leaderboard-grid { display: grid; gap: 12px; margin-top: 24px; }
.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid article, .leaderboard {
    border: 1px solid rgba(216, 163, 41, 0.2);
    background: var(--panel);
    border-radius: 8px;
    padding: 16px;
}
.stats-grid span, .leaderboard h2 { color: var(--gold-soft); font-size: 0.8rem; text-transform: uppercase; font-weight: 900; }
.stats-grid strong { display: block; font-size: clamp(1.8rem, 8vw, 3.1rem); line-height: 1; margin-top: 8px; }
.leaderboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.leaderboard h2 { margin-bottom: 12px; }
.leaderboard div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.leaderboard span { color: var(--text); }
.leaderboard strong { color: var(--gold-soft); }
.all-counts { margin-top: 12px; }
.history-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}
.history-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.86fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}
.history-card-main span,
.history-card-main strong,
.history-card-main small {
    display: block;
}
.history-card-main span,
.history-card-stats span,
.history-card-meta span {
    color: var(--gold-soft);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}
.history-card-main strong {
    margin-top: 7px;
    color: var(--text);
    font-size: clamp(1.25rem, 5vw, 2rem);
    line-height: 0.98;
    font-weight: 950;
    text-transform: uppercase;
}
.history-card-main small {
    margin-top: 7px;
    color: var(--muted);
    font-weight: 850;
    text-transform: uppercase;
}
.history-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.history-card-stats.single {
    grid-template-columns: minmax(0, 1fr);
}
.history-card-stats div {
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid rgba(216, 163, 41, 0.18);
    border-radius: 8px;
    background: #100e09;
}
.history-card-stats strong {
    color: var(--text);
    font-size: clamp(1.05rem, 4vw, 1.45rem);
    line-height: 1;
    font-weight: 950;
}
.history-card-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.history-card-meta span {
    padding: 7px 9px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: rgba(216, 163, 41, 0.1);
}
.history-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}
.history-pager strong {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 950;
    text-align: center;
    text-transform: uppercase;
}
.history-pager .back-link:last-child {
    justify-self: end;
}
@media (max-width: 520px) {
    .duration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-grid, .leaderboard-grid, .history-card { grid-template-columns: 1fr; }
    .history-card-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .history-card-stats div {
        min-height: 68px;
        padding: 10px;
    }
    .history-pager {
        grid-template-columns: 1fr;
    }
    .history-pager .back-link,
    .history-pager .back-link:last-child {
        width: 100%;
        justify-self: stretch;
    }
}



.exercise-list {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}
.exercise-row {
    display: block;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid rgba(216, 163, 41, 0.2);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
}
.exercise-row strong,
.exercise-row small,
.exercise-row em {
    display: block;
}
.exercise-row strong {
    font-size: 1.05rem;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 950;
}
.exercise-row small {
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.2;
}
.exercise-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.exercise-row em {
    flex: 0 0 auto;
    width: fit-content;
    min-width: 64px;
    margin-top: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(216, 163, 41, 0.14);
    color: var(--gold-soft);
    text-align: center;
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
    font-size: 0.72rem;
}
.picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.archive-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
    text-decoration: none;
}
.archive-link:hover {
    color: var(--gold-soft);
}
.exercise-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}
.exercise-form label:not(.toggle-card) {
    display: grid;
    gap: 8px;
}
.exercise-form label > span:first-child {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.exercise-form input[type="text"],
.exercise-form input[type="number"],
.exercise-form select,
.exercise-form textarea {
    width: 100%;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    padding: 14px;
    font: inherit;
    font-weight: 700;
}
.exercise-form textarea {
    resize: vertical;
}
.validation-message {
    color: #ffb8b8;
    font-size: 0.82rem;
    font-weight: 800;
}
.toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.exercise-toggle-grid {
    grid-template-columns: 1fr;
}
.count-field {
    width: min(100%, 150px);
}
.count-field input[type="number"] {
    text-align: center;
}
.toggle-card {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font-weight: 950;
    text-transform: uppercase;
}
.toggle-card input {
    width: 22px;
    height: 22px;
    accent-color: var(--gold);
}
@media (min-width: 760px) {
    .exercise-toggle-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


.login-shell {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.12), transparent 34%), var(--ink);
}
.login-panel {
    width: min(100%, 520px);
    display: grid;
    gap: 24px;
}
.login-field {
    display: grid;
    gap: 8px;
}
.login-field > span:first-child {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.login-field input {
    width: 100%;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    padding: 14px;
    font: inherit;
    font-weight: 700;
}
.tab-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
}
.tab-bar a,
.add-link {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: var(--panel);
    color: var(--gold-soft);
    text-decoration: none;
    font-weight: 950;
    text-transform: uppercase;
}
.tab-bar a.active,
.tab-bar a:hover,
.add-link:hover {
    background: var(--gold);
    color: #110d05;
}
.add-link {
    width: 100%;
    margin-top: 12px;
    gap: 8px;
}
.empty-state {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid rgba(216, 163, 41, 0.2);
    border-radius: 8px;
    background: var(--panel);
}
.empty-state strong {
    color: var(--text);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 950;
}
.empty-state span {
    color: var(--muted);
}
.mode-grid {
    display: grid;
    gap: 10px;
}
.mode-grid a {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(216, 163, 41, 0.28);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
}
.mode-grid strong {
    font-size: 1.15rem;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 950;
}
.mode-grid span {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}
.mode-grid a:active,
.mode-grid a:hover {
    border-color: var(--gold);
    background: rgba(216, 163, 41, 0.16);
}
.deck-pick-shell,
.arrange-shell {
    padding-bottom: max(110px, calc(env(safe-area-inset-bottom) + 92px));
}
.deck-search {
    margin-top: 22px;
}
.picker-list {
    margin-bottom: 90px;
}
.picker-row {
    width: 100%;
    text-align: left;
}
.picker-row.has-count {
    border-color: var(--rest);
    box-shadow: inset 0 0 0 1px var(--rest);
}
.picker-count {
    opacity: 1;
    background: rgba(22, 112, 68, 0.38) !important;
    color: #d9ffe9 !important;
}
.picker-row.has-count .picker-count {
    opacity: 1;
}
.sticky-action {
    position: fixed;
    left: 22px;
    right: 22px;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 4;
    max-width: 936px;
    margin: 0 auto;
}
.sticky-action .start-button {
    width: 100%;
}
.start-button:disabled {
    opacity: 0.58;
}
.arrange-list {
    display: grid;
    gap: 10px;
    margin: 24px 0 16px;
}
.arrange-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}
.arrange-row.dragging {
    opacity: 0.5;
}
.drag-handle,
.arrange-buttons button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--gold-soft);
    font-weight: 950;
}
.arrange-name {
    min-width: 0;
}
.arrange-name strong,
.arrange-name small {
    display: block;
}
.arrange-name strong {
    overflow-wrap: anywhere;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 950;
}
.arrange-name small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}
.mini-number {
    display: grid;
    gap: 4px;
    width: 72px;
}
.mini-number span {
    color: var(--gold-soft);
    font-size: 0.68rem;
    font-weight: 950;
    text-align: center;
    text-transform: uppercase;
}
.mini-number input {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--text);
    text-align: center;
    font-weight: 950;
}
.arrange-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.deck-choice-list {
    display: grid;
    gap: 8px;
}
.deck-choice {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.28);
    border-radius: 8px;
    background: var(--panel);
}
.deck-choice input {
    width: 22px;
    height: 22px;
    accent-color: var(--gold);
}
.deck-choice strong,
.deck-choice small {
    display: block;
}
.deck-choice strong {
    color: var(--text);
    text-transform: uppercase;
    font-weight: 950;
}
.deck-choice small {
    color: var(--muted);
}
.setup-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.rounds-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.workout-start-page {
    background: var(--ink);
}
@media (max-width: 520px) {
    .landing-actions { gap: 8px; }
    .icon-link { width: 44px; height: 44px; }
    .workout-start-page .landing-topbar {
        align-items: flex-start;
    }
    .workout-start-page .landing-logo {
        width: 69px;
        height: 96px;
        border-radius: 0;
        background: transparent;
    }
    .workout-start-page .landing-actions {
        width: 96px;
        display: grid;
        grid-template-columns: repeat(2, 44px);
        align-self: flex-start;
        justify-content: end;
        margin-left: auto;
    }
    .workout-start-page .landing-actions:has(.install-icon-link.d-none) {
        width: 148px;
        grid-template-columns: repeat(3, 44px);
    }
    .arrange-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
    .arrange-buttons {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .arrange-buttons button {
        width: 100%;
    }
}

.manual-workout-shell {
    height: 100vh;
    height: 100svh;
    width: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.1), transparent 42%), var(--ink);
}
.manual-header {
    display: grid;
    gap: 12px;
}
.manual-header .workout-meta {
    position: static;
}
.manual-title-row h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.7rem, 7.5vw, 3.1rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
}
.manual-row small {
    color: var(--muted);
    font-weight: 850;
}
.manual-list {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 10px;
    padding-right: 2px;
    padding-bottom: 6px;
    scrollbar-width: none;
}
.manual-list::-webkit-scrollbar {
    display: none;
}
.manual-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: center;
    min-height: 86px;
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.24);
    border-radius: 8px;
    background: var(--panel);
}
.manual-row.complete {
    border-color: rgba(22, 112, 68, 0.72);
    background: rgba(22, 112, 68, 0.18);
}
.manual-row strong {
    display: block;
    color: var(--text);
    font-size: clamp(1.05rem, 4.6vw, 1.45rem);
    line-height: 1.02;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.manual-row small {
    display: block;
    margin-top: 6px;
    line-height: 1.2;
}
.manual-row-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.manual-row-actions .timer-button {
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.78rem;
}
.manual-row-actions .timer-button:disabled {
    opacity: 0.62;
}
.manual-actions {
    display: grid;
    gap: 10px;
}
.manual-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.manual-end-full {
    width: 100%;
}
.manual-actions .timer-button,
.manual-actions .start-button,
.manual-actions .finish-button {
    width: 100%;
}
@media (max-width: 560px) {
    .manual-workout-shell {
        padding-left: 12px;
        padding-right: 12px;
    }
    .manual-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .manual-row-actions {
        grid-template-columns: 1fr;
    }
    .manual-row-actions .timer-button {
        width: 100%;
        min-height: 54px;
    }
}

.minute-workout-shell {
    height: 100vh;
    height: 100svh;
    width: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--ink);
}
.minute-card-panel,
.minute-timer-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: max(82px, calc(env(safe-area-inset-top) + 60px)) 22px 22px;
}
.minute-card-panel {
    position: relative;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
}
.minute-card-panel h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.7rem, 12vw, 6.6rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.minute-card-panel p:not(.eyebrow) {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 4.5vw, 1.5rem);
    line-height: 1.18;
    font-weight: 750;
}
.minute-card-panel .workout-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.minute-timer-panel {
    position: relative;
    align-items: center;
    padding-top: 24px;
    padding-bottom: max(124px, calc(env(safe-area-inset-bottom) + 104px));
    text-align: center;
    transition: background-color 180ms ease;
}
.minute-timer-panel.ready {
    background: #9a6f13;
    color: #130e05;
}
.minute-timer-panel.slot {
    background: var(--work);
}
.minute-timer-panel.paused {
    background: #171717;
}
.minute-challenge-note {
    padding: 14px;
}
@media (min-width: 900px) and (min-height: 680px) {
    .minute-workout-shell {
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    }
    .minute-card-panel {
        padding-top: 92px;
    }
    .minute-timer-panel {
        padding-top: 24px;
        padding-bottom: 88px;
    }
    .minute-timer-panel .timer-value {
        font-size: clamp(7rem, 22vh, 13rem);
        margin-top: 12px;
    }
}
@media (max-width: 520px) {
    .minute-workout-shell {
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    }
    .minute-card-panel,
    .minute-timer-panel {
        padding-left: 16px;
        padding-right: 16px;
    }
    .minute-card-panel {
        padding-top: max(76px, calc(env(safe-area-inset-top) + 56px));
    }
}
.picker-row.just-added {
    animation: picker-add-flash 320ms ease;
}
.sticky-action.bump .start-button {
    animation: footer-count-bump 260ms ease;
}
.picker-count {
    min-width: 44px;
}
@keyframes picker-add-flash {
    0% { transform: scale(1); border-color: rgba(216, 163, 41, 0.2); }
    45% { transform: scale(1.012); border-color: var(--rest); }
    100% { transform: scale(1); border-color: rgba(216, 163, 41, 0.2); }
}
@keyframes footer-count-bump {
    0% { transform: scale(1); }
    45% { transform: scale(1.035); }
    100% { transform: scale(1); }
}
.arrange-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.arrange-buttons button[data-remove-row] {
    color: #ffd8d8;
}
.picker-count {
    min-width: 44px;
    background: rgba(216, 163, 41, 0.14) !important;
    color: var(--gold-soft) !important;
}
.picker-row.has-count .picker-count {
    background: rgba(22, 112, 68, 0.38) !important;
    color: #d9ffe9 !important;
}
.arrange-buttons {
    min-width: 188px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.arrange-buttons button {
    width: 100%;
    padding: 0 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
}
@media (max-width: 520px) {
    .arrange-buttons {
        min-width: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.tab-bar {
    display: flex;
    gap: 18px;
    margin-top: 22px;
    border-bottom: 1px solid rgba(216, 163, 41, 0.22);
}
.tab-bar a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font-weight: 950;
    text-transform: uppercase;
}
.tab-bar a.active,
.tab-bar a:hover {
    background: transparent;
    color: var(--gold-soft);
    border-bottom-color: var(--gold);
}
.exercise-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 520px) {
    .exercise-toggle-grid {
        grid-template-columns: 1fr;
    }
}
.add-link {
    border-color: var(--gold);
    background: var(--gold);
    color: #110d05;
}
.add-link:active,
.add-link:hover {
    background: var(--gold-soft);
    color: #110d05;
}
.mode-grid a {
    align-items: flex-start;
}
.mode-grid a > span {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: inherit;
    text-transform: none;
    white-space: normal;
}
.mode-grid strong {
    display: block;
}
.mode-grid small {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.22;
}
.arrange-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}
.drag-handle {
    display: grid;
    grid-template-columns: repeat(2, 4px);
    grid-auto-rows: 4px;
    place-content: center;
    gap: 4px;
    cursor: grab;
    touch-action: none;
}
.drag-handle span,
.drag-handle::before,
.drag-handle::after {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}
.remove-row-button {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel-soft);
    color: #ffd8d8;
    font-weight: 950;
    text-transform: uppercase;
}
.autosave-status {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}
@media (max-width: 520px) {
    .arrange-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
    .arrange-row .mini-number {
        grid-column: 2 / 3;
    }
    .remove-row-button {
        grid-column: 3 / 4;
        width: auto;
    }
}
.drag-handle::before,
.drag-handle::after {
    display: none;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.drag-handle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.drag-handle span {
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}
.autosave-status {
    display: none;
}
@media (max-width: 520px) {
    .header-actions .back-link:not(.icon-action) {
        padding: 0 12px;
    }
}

.deck-type-control {
    display: grid;
    gap: 10px;
}
.deck-type-control .btn-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.deck-type-option {
    min-height: 68px;
    display: grid;
    gap: 4px;
    padding: 14px 16px 14px 48px;
    position: relative;
    border: 1px solid rgba(216, 163, 41, 0.28);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
}
.deck-type-option::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 22px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(242, 200, 91, 0.72);
    border-radius: 999px;
}
.deck-type-option::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 28px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: transparent;
}
.deck-type-option strong {
    font-size: 1rem;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 950;
}
.deck-type-option small {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.2;
}
.deck-type-control .btn-check:checked + .deck-type-option {
    border-color: var(--gold);
    background: rgba(216, 163, 41, 0.12);
}
.deck-type-control .btn-check:checked + .deck-type-option::before {
    border-color: var(--gold);
}
.deck-type-control .btn-check:checked + .deck-type-option::after {
    background: var(--gold);
}

.deck-details-panel {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}
.deck-details-panel label {
    display: grid;
    gap: 8px;
}
.deck-details-panel label > span:first-child {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.deck-details-panel input,
.deck-details-panel textarea {
    width: 100%;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    padding: 14px;
    font: inherit;
    font-weight: 700;
}
.deck-details-panel textarea {
    resize: vertical;
}
.deck-delete-link {
    width: 100%;
    min-height: 50px;
    margin-top: 18px;
    border: 1px solid rgba(255, 216, 216, 0.28);
    border-radius: 8px;
    background: transparent;
    color: #ffd8d8;
    font-weight: 950;
    text-transform: uppercase;
}
.end-modal[hidden] {
    display: none;
}

.arrange-add-link {
    margin-top: 22px;
}

.deck-delete-header {
    color: #ffd8d8;
    border-color: rgba(255, 216, 216, 0.32);
}
.delete-modal-actions .cancel-full {
    grid-column: 1 / -1;
    width: 100%;
    border: 1px solid rgba(216, 163, 41, 0.38);
}

.setup-select,
.custom-number-input {
    width: 100%;
    min-height: 54px;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    font-weight: 900;
}
.setup-select {
    text-transform: uppercase;
    background-position: right 18px center;
}
.custom-number-button {
    min-height: 54px;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font-weight: 900;
    text-transform: uppercase;
}
.custom-number-input {
    text-align: center;
}
.duration-grid.custom-active .custom-number-button {
    display: none;
}
.duration-grid.custom-active .custom-number-input {
    display: block;
}

.deck-dropdown {
    position: relative;
}
.deck-dropdown-toggle,
.deck-dropdown-option {
    width: 100%;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    text-align: left;
}
.deck-dropdown-toggle::after {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-right: 3px solid var(--gold-soft);
    border-bottom: 3px solid var(--gold-soft);
    transform: rotate(45deg) translateY(-2px);
}
.deck-dropdown.is-open .deck-dropdown-toggle::after {
    transform: rotate(225deg) translate(-2px, -2px);
}
.deck-dropdown-toggle strong,
.deck-dropdown-toggle small,
.deck-dropdown-option strong,
.deck-dropdown-option small {
    display: block;
}
.deck-dropdown-toggle strong,
.deck-dropdown-option strong {
    line-height: 1.05;
    font-size: 1.02rem;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.deck-dropdown-toggle small,
.deck-dropdown-option small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}
.deck-dropdown-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    max-height: min(52dvh, 420px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: #0f0d08;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}
.deck-dropdown-menu[hidden] {
    display: none;
}
.deck-dropdown-option {
    min-height: 60px;
    border-color: rgba(216, 163, 41, 0.22);
}
.deck-dropdown-option:hover,
.deck-dropdown-option:focus {
    border-color: var(--gold);
    background: rgba(216, 163, 41, 0.14);
}

.custom-number-input::-webkit-outer-spin-button,
.custom-number-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}
.custom-number-input {
    appearance: textfield;
    -moz-appearance: textfield;
}
.duration-grid.custom-selected .custom-number-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    border-color: var(--gold);
    color: #110d05;
}
.duration-grid.custom-selected .custom-number-input {
    display: none;
}

.sales-page {
    min-height: 100dvh;
    background: #0b0b0b;
    color: var(--text);
    overflow-x: hidden;
}
.sales-nav {
    width: min(100% - 32px, 1180px);
    height: 104px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.sales-brand,
.sales-nav-actions,
.sales-hero-actions,
.sales-proof {
    display: flex;
    align-items: center;
}
.sales-brand {
    gap: 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 950;
    text-transform: uppercase;
    font-size: clamp(1.18rem, 2.2vw, 1.55rem);
}
.sales-brand img {
    width: 58px;
    height: 86px;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
}
.sales-nav-actions {
    gap: 10px;
}
.sales-nav-actions a,
.sales-install-button,
.sales-primary,
.sales-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 8px;
    color: var(--gold-soft);
    text-decoration: none;
    text-align: center;
    font-weight: 950;
    text-transform: uppercase;
    font-size: 0.82rem;
}
.sales-install-button {
    cursor: pointer;
}
.sales-nav-actions a:not(.sales-nav-cta),
.sales-nav-actions .sales-install-button,
.sales-secondary {
    border: 1px solid rgba(216, 163, 41, 0.34);
    background: rgba(21, 18, 12, 0.82);
}
.sales-nav-cta,
.sales-primary {
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #110d05 !important;
}
.sales-hero {
    width: min(100% - 32px, 1180px);
    min-height: calc(100svh - 76px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: center;
    gap: clamp(28px, 6vw, 78px);
    padding: 28px 0 70px;
}
.sales-kicker {
    margin: 0 0 12px;
    color: var(--gold-soft);
    font-weight: 950;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.sales-hero h1,
.pain-section h2,
.benefit-copy h2,
.sales-final h2 {
    margin: 0;
    letter-spacing: 0;
    font-weight: 950;
    text-transform: uppercase;
}
.sales-hero h1 {
    max-width: 13ch;
    font-size: clamp(3.25rem, 7.2vw, 6.35rem);
    line-height: 0.9;
}
.sales-lede {
    max-width: 620px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1.08rem, 2vw, 1.34rem);
    line-height: 1.35;
    font-weight: 750;
}
.sales-hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.sales-primary,
.sales-secondary {
    min-height: 58px;
    padding: 0 22px;
    font-size: 0.88rem;
}
.sales-hero-actions .sales-install-button,
.sales-final-actions .sales-install-button {
    min-height: 58px;
}
.sales-proof {
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 24px;
}
.sales-proof span {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
    padding: 0 0 0 12px;
    border-left: 2px solid rgba(216, 163, 41, 0.72);
    color: var(--muted);
    font-weight: 850;
}
.sales-proof strong {
    color: var(--gold-soft);
    text-transform: uppercase;
}
.phone-showcase {
    display: flex;
    justify-content: center;
    perspective: 1200px;
}
.phone-frame {
    width: min(78vw, 360px);
    aspect-ratio: 0.48;
    position: relative;
    padding: 14px;
    border: 1px solid rgba(242, 200, 91, 0.22);
    border-radius: 42px;
    background: linear-gradient(145deg, #252015, #080807 62%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), 0 0 0 8px rgba(216, 163, 41, 0.05);
    transform: rotateX(4deg) rotateY(-10deg);
}
.phone-speaker {
    position: absolute;
    top: 18px;
    left: 50%;
    width: 76px;
    height: 8px;
    border-radius: 999px;
    background: #050505;
    transform: translateX(-50%);
    z-index: 2;
}
.phone-screen {
    height: 100%;
    overflow: hidden;
    border-radius: 32px;
    background: var(--ink);
    display: grid;
    grid-template-rows: 1fr 1fr;
}
.phone-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}
.phone-card-top {
    position: relative;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
}
.phone-meta {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
}
.phone-card p {
    margin: 0 0 8px;
    color: var(--gold-soft);
    font-size: 0.8rem;
    font-weight: 950;
    text-transform: uppercase;
}
.phone-card h2 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
}
.phone-card small {
    margin-top: 12px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 750;
}
.phone-card-bottom {
    align-items: center;
    text-align: center;
    background: var(--work);
}
.phone-card-bottom strong {
    font-size: clamp(5.8rem, 18vw, 9rem);
    line-height: 0.88;
    font-weight: 950;
}
.phone-card-bottom div {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
}
.phone-card-bottom span {
    padding: 12px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}
.pain-section,
.benefit-band,
.feature-section,
.sales-final {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
    padding: 74px 0;
}
.pain-section {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 36px;
    border-top: 1px solid rgba(216, 163, 41, 0.16);
}
.pain-section h2,
.benefit-copy h2,
.sales-final h2 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.92;
}
.pain-grid,
.steps-grid,
.feature-grid {
    display: grid;
    gap: 12px;
}
.pain-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pain-grid article,
.steps-grid article,
.feature-grid article {
    min-height: 160px;
    padding: 18px;
    border: 1px solid rgba(216, 163, 41, 0.2);
    border-radius: 8px;
    background: var(--panel);
}
.pain-grid strong,
.steps-grid strong,
.feature-grid strong {
    display: block;
    color: var(--text);
    font-size: 1.03rem;
    line-height: 1.08;
    font-weight: 950;
    text-transform: uppercase;
}
.pain-grid span,
.steps-grid p,
.feature-grid span,
.benefit-copy p {
    display: block;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.35;
    font-weight: 750;
}
.benefit-band {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 30px;
    align-items: start;
}
.steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.steps-grid article span {
    display: block;
    margin-bottom: 28px;
    color: var(--gold-soft);
    font-weight: 950;
}
.feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sales-final {
    text-align: center;
    border-top: 1px solid rgba(216, 163, 41, 0.16);
}
.sales-final .sales-primary {
    margin-top: 24px;
}
.sales-final-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.sales-final-actions .sales-primary {
    margin-top: 0;
}
@media (max-width: 900px) {
    .sales-hero,
    .pain-section,
    .benefit-band {
        grid-template-columns: 1fr;
    }
    .sales-hero {
        padding-top: 20px;
    }
    .sales-hero h1 {
        max-width: 9ch;
    }
    .pain-grid,
    .steps-grid,
    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }
    .phone-frame {
        transform: none;
    }
}
@media (max-width: 560px) {
    .sales-nav {
        width: min(100% - 24px, 1180px);
    }
    .sales-nav-actions a:not(.sales-nav-cta) {
        display: none;
    }
    .sales-hero,
    .pain-section,
    .benefit-band,
    .feature-section,
    .sales-final {
        width: min(100% - 24px, 1180px);
    }
    .sales-hero h1 {
        font-size: clamp(3.4rem, 17vw, 5.2rem);
    }
    .sales-hero-actions,
    .sales-primary,
    .sales-secondary,
    .sales-install-button {
        width: 100%;
    }
    .pain-grid,
    .steps-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .phone-frame {
        width: min(86vw, 330px);
    }
    .phone-card {
        padding: 20px;
    }
}

.sales-hero-v2 {
    grid-template-columns: minmax(0, 0.98fr) minmax(330px, 1.02fr);
}
.sales-hero-v2 .sales-hero h1,
.sales-hero-v2 h1 {
    max-width: 13ch;
}
.hero-product-stack {
    min-height: 660px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}
.hero-phone {
    z-index: 2;
    transform: rotateX(4deg) rotateY(-12deg) rotateZ(1deg);
    width: min(78vw, 390px);
}
.floating-snippet {
    position: absolute;
    z-index: 3;
    min-width: 170px;
    padding: 14px 16px;
    border: 1px solid rgba(216, 163, 41, 0.36);
    border-radius: 8px;
    background: rgba(21, 18, 12, 0.95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.floating-snippet span,
.ui-panel-head span,
.benefit-rail span {
    display: block;
    color: var(--gold-soft);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}
.floating-snippet strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
}
.floating-snippet small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 850;
    text-transform: uppercase;
}
.setup-snippet {
    left: 0;
    top: 90px;
    transform: rotate(-4deg);
}
.timer-snippet {
    right: 4px;
    bottom: 118px;
    min-width: 136px;
    text-align: center;
    background: var(--rest);
}
.timer-snippet span,
.timer-snippet small {
    color: #dbffec;
}
.timer-snippet strong {
    font-size: 3rem;
}
.mode-showcase,
.product-flow,
.split-story,
.benefit-rail {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
}
.mode-showcase {
    padding: 46px 0 86px;
    border-top: 1px solid rgba(216, 163, 41, 0.16);
}
.mode-showcase-header {
    max-width: 760px;
    margin-bottom: 22px;
}
.mode-showcase h2,
.flow-copy h2,
.story-panel h2 {
    margin: 0;
    font-size: clamp(2.5rem, 6.6vw, 5.4rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
}
.mode-cards {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr 0.9fr;
    grid-auto-rows: minmax(218px, auto);
    gap: 12px;
}
.mode-card {
    position: relative;
    overflow: hidden;
    min-height: 218px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 22px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}
.mode-card-featured {
    grid-row: span 2;
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.2), var(--panel));
}
.mode-card span {
    color: var(--gold-soft);
    font-weight: 950;
}
.mode-card strong {
    display: block;
    margin-top: 32px;
    font-size: clamp(1.55rem, 2.7vw, 2.85rem);
    line-height: 0.94;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: normal;
}
.mode-card p {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.33;
    font-weight: 750;
}
.mode-card-featured strong {
    margin-top: 54px;
    font-size: clamp(2.45rem, 4.8vw, 4.4rem);
}
.mode-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--gold);
    color: #110d05;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
}
.mini-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}
.mini-choice-grid b {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--gold);
    color: #110d05;
    font-weight: 950;
}
.product-flow {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 34px;
    align-items: center;
    padding: 88px 0;
}
.deck-story {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
    padding: 82px 0 58px;
    border-top: 1px solid rgba(216, 163, 41, 0.16);
}
.deck-story-copy {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}
.deck-story-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.35rem, 5.4vw, 4.9rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
}
.deck-story-copy p:not(.sales-kicker) {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.42;
    font-weight: 750;
}
.deck-story-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
    align-items: start;
}
.deck-story-list article {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.08), var(--panel));
}
.deck-story-list article:nth-child(even) {
    margin-top: 34px;
}
.deck-story-list span {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}
.deck-story-list strong {
    color: var(--text);
    font-size: clamp(2.15rem, 4vw, 3.4rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
}
.deck-story-list small {
    display: block;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.22;
    font-weight: 750;
}
.flow-copy p:not(.sales-kicker) {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.4;
    font-weight: 750;
}
.flow-board {
    min-height: 560px;
    position: relative;
}
.ui-panel {
    position: absolute;
    border: 1px solid rgba(216, 163, 41, 0.26);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}
.ui-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid rgba(216, 163, 41, 0.16);
}
.ui-panel-head b {
    color: var(--text);
    font-size: 0.72rem;
    text-transform: uppercase;
}
.deck-ui-panel {
    left: 0;
    top: 42px;
    width: 43%;
    transform: rotate(-3deg);
}
.setup-ui-panel {
    right: 2%;
    top: 0;
    width: 48%;
    transform: rotate(2deg);
}
.session-ui-panel {
    left: 18%;
    bottom: 0;
    width: 57%;
    overflow: hidden;
    transform: rotate(-1deg);
}
.deck-row-preview {
    margin: 10px 12px;
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.18);
    border-radius: 8px;
    background: #100e09;
}
.deck-row-preview strong,
.deck-row-preview small {
    display: block;
}
.deck-row-preview strong {
    color: var(--text);
    font-weight: 950;
    text-transform: uppercase;
}
.deck-row-preview small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
}
.setup-ui-panel label {
    display: grid;
    grid-template-columns: 0.72fr 1fr 1fr;
    gap: 8px;
    align-items: center;
    padding: 12px 14px 0;
}
.setup-ui-panel label span {
    color: var(--gold-soft);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}
.setup-ui-panel label strong {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    color: var(--text);
    font-weight: 950;
}
.setup-ui-panel label strong:last-child,
.setup-ui-panel button {
    background: var(--gold);
    color: #110d05;
}
.setup-ui-panel button {
    width: calc(100% - 28px);
    min-height: 54px;
    margin: 18px 14px 14px;
    border: 0;
    border-radius: 8px;
    font-weight: 950;
    text-transform: uppercase;
}
.session-preview-top {
    min-height: 230px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    align-content: center;
    padding: 20px;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
}
.session-preview-top span {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
}
.session-preview-top span:nth-child(2) {
    text-align: right;
}
.session-preview-top strong {
    grid-column: 1 / -1;
    margin-top: 16px;
    color: var(--text);
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
}
.session-preview-top small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 750;
}
.session-preview-bottom {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--work);
    color: var(--text);
}
.session-preview-bottom span {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 950;
    text-transform: uppercase;
}
.session-preview-bottom b {
    font-size: clamp(5.8rem, 18vw, 9rem);
    line-height: 0.88;
    font-weight: 950;
}
.split-story {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 12px;
    padding: 56px 0;
}
.story-panel {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(22px, 4vw, 42px);
    border-radius: 8px;
}
.story-dark {
    border: 1px solid rgba(216, 163, 41, 0.2);
    background: var(--panel);
}
.story-dark p:not(.sales-kicker) {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.42;
    font-weight: 750;
}
.story-gold {
    background: var(--gold);
    color: #110d05;
}
.story-gold strong {
    display: block;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
}
.story-gold span {
    display: block;
    margin-top: 18px;
    font-size: 1.05rem;
    line-height: 1.36;
    font-weight: 850;
}
.benefit-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 32px 0 54px;
}
.benefit-rail article {
    padding: 20px;
    border-top: 1px solid rgba(216, 163, 41, 0.32);
}
.benefit-rail strong {
    display: block;
    margin-top: 12px;
    font-size: clamp(1.15rem, 1.9vw, 1.65rem);
    line-height: 1.08;
    font-weight: 950;
    text-transform: uppercase;
}
.origin-story {
    width: min(100% - 32px, 980px);
    margin: 0 auto 82px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(216, 163, 41, 0.24);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.1), var(--panel));
    text-align: center;
}
.origin-story h2 {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text);
    font-size: clamp(2.3rem, 5vw, 4.8rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
}
.origin-story p:not(.sales-kicker) {
    max-width: 760px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.44;
    font-weight: 750;
}
.sales-final-v2 {
    padding-top: 90px;
}
@media (max-width: 900px) {
    .sales-hero-v2,
    .product-flow,
    .split-story {
        grid-template-columns: 1fr;
    }
    .hero-product-stack {
        min-height: 620px;
    }
    .mode-cards {
        grid-template-columns: 1fr 1fr;
    }
    .benefit-rail {
        grid-template-columns: 1fr 1fr;
    }
    .mode-card-featured {
        grid-column: 1 / -1;
        grid-row: auto;
    }
    .flow-board {
        min-height: 660px;
    }
    .deck-ui-panel,
    .setup-ui-panel,
    .session-ui-panel {
        width: min(100%, 430px);
    }
    .setup-ui-panel {
        right: 0;
    }
    .session-ui-panel {
        left: 10%;
    }
}
@media (max-width: 560px) {
    .hero-product-stack {
        min-height: 590px;
    }
    .mode-showcase,
    .deck-story,
    .product-flow,
    .split-story,
    .benefit-rail,
    .origin-story {
        width: min(100% - 24px, 1180px);
    }
    .mode-cards,
    .benefit-rail {
        grid-template-columns: 1fr;
    }
    .mode-card-featured strong {
        margin-top: 42px;
    }
    .flow-board {
        min-height: auto;
        display: grid;
        gap: 14px;
    }
    .sales-hero-v2 h1 {
        max-width: 12ch;
        font-size: clamp(2.85rem, 14vw, 4.6rem);
    }
    .deck-story-list {
        grid-template-columns: 1fr 1fr;
    }
    .deck-story-list article:nth-child(even) {
        margin-top: 0;
    }
    .sales-brand {
        gap: 10px;
        font-size: 1rem;
    }
    .sales-brand img {
        width: 54px;
        height: 78px;
        border-radius: 0;
        object-fit: contain;
        background: transparent;
    }
}
@media (max-width: 420px) {
    .deck-story-list {
        grid-template-columns: 1fr;
    }
    .sales-brand span {
        display: none;
    }
    .ui-panel {
        position: static;
        width: 100%;
        transform: none;
    }
    .session-preview-top {
        min-height: 210px;
    }
    .session-preview-bottom {
        min-height: 160px;
    }
}

.exercise-card-content {
    display: block;
}
.rest-preview {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(140px, 0.72fr);
    align-items: center;
    gap: 18px;
}
.rest-preview-copy span {
    display: block;
    margin-bottom: 10px;
    color: var(--gold-soft);
    font-size: clamp(0.82rem, 3.6vw, 1.1rem);
    font-weight: 950;
    text-transform: uppercase;
}
.rest-preview-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2rem, 9vw, 4.7rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.rest-preview-copy p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: clamp(0.95rem, 4vw, 1.28rem);
    line-height: 1.15;
    font-weight: 750;
}
.rest-preview-media {
    position: relative;
    min-height: 0;
    height: min(36svh, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(216, 163, 41, 0.24);
    border-radius: 8px;
    background: #050505;
}
.rest-preview-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}
.rest-preview-media strong {
    position: absolute;
    right: 12px;
    bottom: 12px;
    min-width: 54px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--gold);
    color: #110d05;
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 950;
}
@media (max-width: 520px) {
    .rest-preview {
        grid-template-columns: minmax(0, 1fr) minmax(116px, 0.62fr);
        gap: 12px;
    }
    .rest-preview-media {
        height: min(32svh, 250px);
    }
    .rest-preview-media strong {
        right: 8px;
        bottom: 8px;
        min-width: 46px;
        min-height: 46px;
        font-size: 1.35rem;
    }
}

.workout-shell.rest-preview-active {
    grid-template-rows: minmax(0, 4fr) minmax(96px, 1fr);
}
.workout-shell.rest-preview-active .card-panel {
    padding-top: max(66px, env(safe-area-inset-top));
    padding-bottom: 18px;
}
.workout-shell.rest-preview-active .timer-panel {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 22px max(14px, env(safe-area-inset-bottom));
}
.workout-shell.rest-preview-active .timer-panel.rest {
    background: var(--rest);
}
.workout-shell.rest-preview-active .phase-label {
    font-size: clamp(1rem, 5vw, 1.45rem);
}
.workout-shell.rest-preview-active .timer-value {
    margin: 0;
    font-size: clamp(3.8rem, 18vw, 6.5rem);
    line-height: 0.82;
}
.workout-shell.rest-preview-active .timer-actions {
    position: static;
    width: auto;
    min-width: 150px;
    max-width: 220px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    gap: 8px;
}
.workout-shell.rest-preview-active .timer-button {
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.76rem;
}
.workout-shell.rest-preview-active .rest-preview {
    height: 100%;
}
.workout-shell.rest-preview-active .rest-preview-media {
    height: min(56svh, 520px);
}
@media (max-width: 520px) {
    .workout-shell.rest-preview-active {
        grid-template-rows: minmax(0, 4fr) minmax(86px, 1fr);
    }
    .workout-shell.rest-preview-active .timer-panel {
        gap: 10px;
        padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    }
    .workout-shell.rest-preview-active .phase-label {
        font-size: 0.95rem;
    }
    .workout-shell.rest-preview-active .timer-value {
        font-size: clamp(3.2rem, 17vw, 5.2rem);
    }
    .workout-shell.rest-preview-active .timer-actions {
        min-width: 126px;
        gap: 6px;
    }
    .workout-shell.rest-preview-active .timer-button {
        min-height: 40px;
        padding: 0 6px;
        font-size: 0.68rem;
    }
    .workout-shell.rest-preview-active .rest-preview-media {
        height: min(48svh, 420px);
    }
}

.show-me-button {
    width: min(100%, 180px);
    min-height: 46px;
    margin-top: 18px;
    border: 1px solid rgba(216, 163, 41, 0.38);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
    color: var(--gold-soft);
    font-weight: 950;
    text-transform: uppercase;
}
.show-me-button:active,
.show-me-button:hover {
    background: var(--gold);
    color: #110d05;
}
.exercise-demo-modal {
    position: fixed;
    inset: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.82);
}
.exercise-demo-card {
    width: min(100%, 520px);
    max-height: calc(100svh - 36px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(216, 163, 41, 0.36);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.exercise-demo-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.1rem, 10vw, 4rem);
    line-height: 0.92;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.exercise-demo-copy p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.22;
    font-weight: 750;
}
.exercise-demo-media {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(216, 163, 41, 0.24);
    border-radius: 8px;
    background: #050505;
}
.exercise-demo-media img {
    width: 100%;
    height: 100%;
    max-height: 58svh;
    object-fit: cover;
    object-position: center 42%;
}
.exercise-demo-card .timer-button {
    width: 100%;
}
@media (max-width: 520px) {
    .show-me-button {
        width: min(100%, 156px);
        min-height: 42px;
        font-size: 0.78rem;
    }
    .exercise-demo-card {
        max-height: calc(100svh - 24px);
        padding: 14px;
    }
    .exercise-demo-media img {
        max-height: 56svh;
    }
}

@media (min-width: 900px) and (min-height: 680px) {
    .card-panel {
        align-items: center;
        text-align: center;
    }
    .card-panel h1,
    .card-panel p {
        max-width: 980px;
    }
    .timer-panel {
        padding-top: 46px;
        padding-bottom: 88px;
    }
    .timer-value {
        font-size: clamp(7rem, 22vh, 13rem);
        margin-top: 12px;
    }
    .timer-actions {
        bottom: 24px;
    }
}

.workout-summary-modal {
    position: fixed;
    inset: 0;
    z-index: 14;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.78);
}
.workout-summary-card {
    width: min(100%, 460px);
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(216, 163, 41, 0.36);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.workout-summary-card h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.5rem, 12vw, 4.4rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
}
.workout-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.workout-summary-grid article {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: #100e09;
}
.workout-summary-grid span {
    color: var(--gold-soft);
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1.05;
    text-transform: uppercase;
}
.workout-summary-grid strong {
    color: var(--text);
    font-size: clamp(1.45rem, 7vw, 2.25rem);
    line-height: 1;
    font-weight: 950;
}
.workout-summary-card .timer-button {
    width: 100%;
}
@media (max-width: 520px) {
    .workout-summary-grid {
        grid-template-columns: 1fr;
    }
    .workout-summary-grid article {
        min-height: 82px;
    }
}

.install-modal {
    position: fixed;
    inset: 0;
    z-index: 16;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.78);
}
.install-modal-card {
    width: min(100%, 440px);
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(216, 163, 41, 0.36);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.install-modal-card h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.4rem, 11vw, 4rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
}
.install-modal-copy {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 750;
}
.install-steps {
    display: grid;
    gap: 10px;
}
.install-steps article {
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: #100e09;
}
.install-steps strong,
.install-steps span {
    display: block;
}
.install-steps strong {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}
.install-steps span {
    margin-top: 6px;
    color: var(--text);
    line-height: 1.25;
    font-weight: 800;
}
.install-modal-card .timer-button {
    width: 100%;
}

.workout-start-page .landing-logo {
    width: 61px;
    height: 85px;
}
.start-menu {
    position: fixed;
    inset: 0;
    z-index: 18;
}
.start-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    transition: opacity 180ms ease;
}
.start-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 390px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
    border-left: 1px solid rgba(216, 163, 41, 0.34);
    background: linear-gradient(180deg, rgba(216, 163, 41, 0.12), transparent 34%), var(--panel);
    box-shadow: -24px 0 80px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 210ms ease;
}
.start-menu.is-open .start-menu-backdrop {
    opacity: 1;
}
.start-menu.is-open .start-menu-panel {
    transform: translateX(0);
}
.start-menu-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.start-menu-head h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.25rem, 10vw, 3.7rem);
    line-height: 0.9;
    font-weight: 950;
    text-transform: uppercase;
}
.start-menu-links {
    display: grid;
    gap: 10px;
}
.start-menu-links a,
.start-menu-links button {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(216, 163, 41, 0.32);
    border-radius: 8px;
    background: #100e09;
    color: var(--gold-soft);
    font: inherit;
    font-weight: 950;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}
.start-menu-links a:hover,
.start-menu-links a:active,
.start-menu-links button:hover,
.start-menu-links button:active {
    border-color: var(--gold);
    background: var(--gold);
    color: #110d05;
}
.start-menu-links a:last-child {
    margin-top: 14px;
    color: #ffd8d8;
    border-color: rgba(255, 216, 216, 0.26);
}
.profile-card {
    display: grid;
    gap: 12px;
}
.profile-card article {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}
.profile-card span {
    color: var(--gold-soft);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}
.profile-card strong {
    color: var(--text);
    font-size: clamp(1.1rem, 5vw, 1.55rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}
.profile-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
@media (min-width: 760px) {
    .workout-start-page .landing-logo {
        width: 66px;
        height: 92px;
    }
}body.menu-open {
    overflow: hidden;
}
.profile-saved {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(22, 112, 68, 0.65);
    border-radius: 8px;
    background: rgba(22, 112, 68, 0.24);
    color: #d9ffe9;
    font-weight: 950;
    text-transform: uppercase;
}
.profile-logout {
    background: rgba(158, 31, 31, 0.55);
    color: #ffd8d8;
}.exercise-row em.archive-badge {
    border: 1px solid rgba(255, 216, 216, 0.28);
    background: rgba(158, 31, 31, 0.28);
    color: #ffd8d8;
}
.list-intro {
    margin-top: 14px;
    max-width: 760px;
}
.field-help {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.32;
    font-weight: 750;
}
.delete-block-message {
    margin-top: 30px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 184, 184, 0.42);
    border-radius: 8px;
    background: rgba(158, 31, 31, 0.26);
    color: #ffd8d8;
}
.profile-heading {
    gap: 0;
}
.setup-mode-title {
    margin-bottom: 2px;
    color: var(--gold-soft);
    font-size: clamp(1.35rem, 6vw, 2.15rem);
    line-height: 0.96;
}
.segmented-control:has(.custom-number-button) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.segmented-control.custom-active .custom-number-button,
.duration-grid.custom-active .custom-number-button {
    display: none;
}
.segmented-control.custom-active .custom-number-input,
.duration-grid.custom-active .custom-number-input {
    display: block;
}
.segmented-control.custom-selected .custom-number-button,
.duration-grid.custom-selected .custom-number-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    border-color: var(--gold);
    color: #110d05;
}
.segmented-control.custom-selected .custom-number-input,
.duration-grid.custom-selected .custom-number-input {
    display: none;
}
.history-card-stats {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}
@media (max-width: 520px) {
    .segmented-control:has(.custom-number-button) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .rounds-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}






/* Workout session layout overrides */
.manual-workout-shell .workout-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.manual-workout-shell .workout-stat:first-child {
    text-align: left;
}
.manual-workout-shell .workout-stat:nth-child(2) {
    text-align: center;
}
.manual-workout-shell .workout-stat:last-child {
    text-align: right;
}
.manual-row {
    grid-template-columns: 1fr;
    align-items: stretch;
}
.manual-row-actions {
    grid-template-columns: 1fr;
}
.manual-row-actions .timer-button {
    width: 100%;
    min-height: 54px;
}
.manual-row-actions .timer-button.complete:disabled {
    opacity: 1;
}
.minute-card-panel .workout-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Final workout row/button fixes */
.rep-roulette-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rep-roulette-meta #roundStat {
    display: none !important;
}
.rep-roulette-meta .workout-stat:nth-child(3) {
    text-align: right;
}
.manual-row {
    display: block;
    min-height: 0;
    overflow: hidden;
}
.manual-row-copy {
    display: block;
}
.manual-row-actions {
    display: block;
    margin-top: 14px;
}
.manual-done-button {
    position: static;
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--gold);
    color: #110d05;
    font: inherit;
    font-weight: 950;
    text-transform: uppercase;
}
.manual-done-button.complete,
.manual-done-button:disabled {
    background: var(--rest);
    color: #eafff2;
    opacity: 1;
}

/* Manual workout direct button fallback */
.manual-row > .manual-done-button {
    position: static !important;
    width: 100% !important;
    min-height: 58px !important;
    margin-top: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Manual workout inline done buttons */
.manual-row-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}
.manual-row-header .manual-done-button {
    margin-top: 0 !important;
}
.manual-row > .manual-done-button {
    display: none !important;
}
@media (max-width: 420px) {
    .manual-row-header {
        gap: 8px;
    }
    .manual-row-header .manual-done-button {
        width: 88px !important;
        min-width: 88px !important;
        min-height: 44px !important;
        font-size: 0.78rem !important;
    }
}

/* Manual workout stacked compact cards */
.manual-row {
    padding: 10px 12px !important;
}
.manual-row-copy {
    display: grid !important;
    gap: 7px !important;
}
.manual-row-copy strong {
    font-size: clamp(0.98rem, 4.2vw, 1.28rem) !important;
    line-height: 0.98 !important;
}
.manual-row-copy small {
    margin-top: 0 !important;
    font-size: clamp(0.82rem, 3.5vw, 1rem) !important;
    line-height: 1.08 !important;
}
.manual-row-copy .manual-done-button {
    width: 100% !important;
    min-height: 42px !important;
    margin-top: 0 !important;
    display: flex !important;
}

/* Manual workouts should flow naturally */
.manual-workout-shell {
    height: auto !important;
    min-height: 100svh !important;
    overflow: visible !important;
    display: block !important;
    padding-bottom: max(18px, env(safe-area-inset-bottom)) !important;
}
.manual-header {
    margin-bottom: 12px !important;
}
.manual-list {
    min-height: 0 !important;
    overflow: visible !important;
    display: grid !important;
    gap: 10px !important;
    padding-right: 0 !important;
    padding-bottom: 12px !important;
}
.manual-actions {
    margin-top: 12px !important;
}
.manual-row {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}
.manual-row-copy {
    min-height: 0 !important;
}
.manual-row-copy .manual-done-button {
    flex: 0 0 auto !important;
}

.history-card-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.history-card-link:hover,
.history-card-link:focus-visible {
    border-color: rgba(216, 163, 41, 0.62);
    background: rgba(216, 163, 41, 0.1);
    color: inherit;
    transform: translateY(-1px);
}

.history-detail-summary {
    margin-top: 22px;
}

.history-detail-list {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.history-detail-list h2 {
    margin: 0 0 4px;
    color: var(--gold-soft);
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.history-exercise-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}

.history-exercise-row > span {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 163, 41, 0.28);
    border-radius: 8px;
    color: var(--gold-soft);
    background: rgba(216, 163, 41, 0.08);
    font-weight: 950;
}

.history-exercise-row strong,
.history-exercise-row small,
.history-exercise-row em {
    display: block;
}

.history-exercise-row strong {
    color: var(--text);
    font-size: clamp(1.05rem, 4vw, 1.55rem);
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
}

.history-exercise-row small {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.25;
    font-weight: 800;
}

.history-exercise-row em {
    margin-top: 8px;
    color: var(--gold-soft);
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
}

.history-exercise-table {
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}

.history-exercise-table .history-exercise-row {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(216, 163, 41, 0.16);
    background: transparent;
}

.history-exercise-table .history-exercise-row:last-child {
    border-bottom: 0;
}

.history-exercise-table .history-exercise-row > span {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    justify-content: flex-start;
    background: transparent;
    color: var(--gold-soft);
    font-size: 0.82rem;
}

.history-exercise-table .history-exercise-row strong {
    font-size: clamp(1rem, 3.4vw, 1.35rem);
    line-height: 1.05;
}

.history-card-link,
.history-card-link:visited,
.history-card-link:hover,
.history-card-link:focus,
.history-card-link:active,
.history-card-link * {
    color: inherit;
    text-decoration: none !important;
}

.history-card-link .history-card-main span,
.history-card-link .history-card-stats span {
    color: var(--gold-soft);
}

.history-card-link .history-card-main small {
    color: var(--muted);
}

.history-card-link .history-card-main strong,
.history-card-link .history-card-stats strong {
    color: var(--text);
}

.breakdown-shell {
    gap: 22px;
}

.breakdown-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.breakdown-metrics article,
.breakdown-user-row {
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}

.breakdown-metrics article {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.breakdown-metrics span,
.breakdown-user-row span {
    color: var(--gold-soft);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.breakdown-metrics strong {
    color: var(--text);
    font-size: clamp(1.35rem, 5vw, 2.25rem);
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
}

.breakdown-list {
    display: grid;
    gap: 10px;
}

.breakdown-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(100px, 0.5fr) minmax(150px, 0.8fr);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.breakdown-user-row strong,
.breakdown-user-row small,
.breakdown-user-row span {
    display: block;
}

.breakdown-user-row > div:first-child strong {
    color: var(--text);
    font-size: 1.12rem;
    line-height: 1.05;
    font-weight: 950;
    text-transform: uppercase;
}

.breakdown-user-row small {
    margin-top: 5px;
    color: var(--muted);
    font-weight: 800;
}

.breakdown-user-row > div:not(:first-child) strong {
    margin-top: 5px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 950;
}

@media (max-width: 640px) {
    .breakdown-metrics,
    .breakdown-user-row {
        grid-template-columns: 1fr;
    }
}

.breakdown-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
    .breakdown-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

.breakdown-metrics {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.breakdown-list {
    margin-top: 18px;
}

.history-card-stats strong {
    white-space: pre-line;
}

.split-stat-mobile {
    display: none;
}

.split-stat-desktop {
    display: block;
}

@media (max-width: 520px) {
    .split-stat-desktop {
        display: none;
    }

    .split-stat-mobile {
        display: block;
    }
}

.history-card-stats strong.split-stat {
    color: var(--text) !important;
    font-size: clamp(1.05rem, 4vw, 1.45rem);
    line-height: 1;
    font-weight: 950;
    white-space: normal;
}

.history-card-stats strong.split-stat > span {
    color: var(--text) !important;
    font-size: inherit !important;
    line-height: inherit;
    font-weight: inherit;
    text-transform: none;
}

.history-card-stats strong.split-stat .split-stat-desktop {
    display: block !important;
}

.history-card-stats strong.split-stat .split-stat-mobile {
    display: none !important;
}

@media (max-width: 520px) {
    .history-card-stats strong.split-stat .split-stat-desktop {
        display: none !important;
    }

    .history-card-stats strong.split-stat .split-stat-mobile {
        display: block !important;
    }
}

.history-card-stats strong.split-stat {
    color: var(--text) !important;
    font-size: clamp(1.05rem, 4vw, 1.45rem) !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    text-transform: none !important;
    white-space: normal !important;
}

.history-card-stats strong.split-stat-desktop {
    display: block !important;
}

.history-card-stats strong.split-stat-mobile {
    display: none !important;
}

@media (max-width: 520px) {
    .history-card-stats strong.split-stat-desktop {
        display: none !important;
    }

    .history-card-stats strong.split-stat-mobile {
        display: block !important;
    }
}

.trend-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(216, 163, 41, 0.22);
    border-radius: 8px;
    background: var(--panel);
}

.trend-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.trend-card h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: clamp(1.35rem, 5vw, 2.2rem);
    line-height: 0.95;
    font-weight: 950;
    text-transform: uppercase;
}

.trend-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.trend-legend span::before {
    content: "";
    width: 18px;
    height: 4px;
    border-radius: 999px;
    background: var(--gold);
}

.trend-legend .minutes::before {
    background: #49c789;
}

.trend-chart {
    width: 100%;
    height: clamp(150px, 32vw, 230px);
    margin-top: 12px;
    display: block;
    overflow: visible;
}

.trend-axis {
    stroke: rgba(216, 163, 41, 0.55);
    stroke-width: 1.25;
    vector-effect: non-scaling-stroke;
}

.trend-grid {
    stroke: rgba(216, 163, 41, 0.16);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.trend-line,
.trend-dot {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.trend-line {
    stroke-width: 3;
}

.trend-line.sets,
.trend-dot.sets {
    stroke: var(--gold);
}

.trend-line.minutes,
.trend-dot.minutes {
    stroke: #49c789;
}

.trend-dot {
    fill: var(--panel);
    stroke-width: 2;
}

.trend-labels {
    display: flex;
    justify-content: space-between;
    color: var(--gold-soft);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.trend-chart-wrap {
    position: relative;
    width: 100%;
    height: clamp(230px, 36vw, 340px);
    margin-top: 12px;
}

.trend-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}
