:root {
    color-scheme: light;
    --background: #f5f5f0;
    --surface: #ffffff;
    --ink: #222e29;
    --muted: #65716a;
    --border: #e1e6df;
    --green: #174c3c;
    --green-light: #eaf1e9;
    --lime: #d9edae;
    --radius: 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 24px; height: 24px; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
a:focus-visible { outline: 3px solid #8c651b; outline-offset: 5px; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 10; padding: 12px 20px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0, 0, 0, .03); }
.header-inner { max-width: 1168px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workout-nav { display: flex; align-items: center; gap: 8px; }
.workout-nav-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 44px; padding: 8px 16px; border-radius: 12px; font-weight: 800; font-size: 16px; line-height: 1; color: var(--ink); background: #f0f3ed; border: 1.5px solid #dce4d9; transition: all .15s ease; touch-action: manipulation; white-space: nowrap; }
.workout-nav-btn:hover { background: #e3ebd9; border-color: var(--green); }
.workout-nav-btn.is-active { background: var(--green); color: var(--lime); border-color: var(--green); box-shadow: 0 4px 12px rgba(23, 76, 60, .22); padding: 8px 20px; }
.logout-form { margin: 0; display: flex; align-items: center; }
.logout-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px 14px; border-radius: 12px; font-family: inherit; font-size: 13px; font-weight: 700; color: #823420; background: #fdf5f2; border: 1.5px solid #f2dad0; cursor: pointer; transition: all .15s ease; touch-action: manipulation; }
.logout-btn:hover { background: #fae8e1; border-color: #dca391; }
.logout-icon { font-size: 17px; line-height: 1; }
.logout-text { font-size: 13px; }
.page-shell { max-width: 1168px; margin: 0 auto; padding: 24px 20px 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 18px 0 24px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; line-height: 1.4; }
h1 { margin-top: 6px; font-size: clamp(28px, 4vw, 40px); font-weight: 650; letter-spacing: -1.5px; }
.page-description { margin-top: 8px; color: var(--muted); font-size: 15px; }
.personal-label { padding-bottom: 3px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: 1.26fr 1fr; gap: 20px; }
.next-workout { display: flex; flex-direction: column; justify-content: space-between; min-height: 363px; padding: 30px; overflow: hidden; color: #fff; background: var(--green); border: 1px solid var(--green); border-radius: var(--radius); }
.hero-topline { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.next-workout .eyebrow { color: #d0dfd6; }
.hero-badge { padding: 5px 10px; color: #e4ebdf; border: 1px solid #517664; border-radius: 6px; font-size: 10px; }
.hero-workout { display: flex; align-items: center; gap: 26px; margin: 24px 0 27px; }
.workout-letter { font-size: 125px; font-weight: 550; line-height: 1; letter-spacing: -7px; color: var(--lime); }
.hero-workout h2 { font-size: 25px; font-weight: 600; letter-spacing: -.6px; }
.workout-groups { max-width: 250px; margin-top: 8px; color: #dce5df; font-size: 17px; line-height: 1.45; }
.hero-meta { margin-top: 17px; color: #cedbd2; font-size: 12px; }
.hero-meta span { margin: 0 5px; }
.button { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 15px 20px; border-radius: 10px; font-weight: 750; letter-spacing: .5px; font-size: 13px; transition: background-color .15s; }
.button-light { color: var(--green); background: var(--lime); }
.button-light:hover { background: #e7f5c8; }
.button svg { width: 22px; height: 22px; }
.dashboard-side { display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.panel { padding: 23px 25px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.section-kicker { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.section-kicker svg { width: 18px; height: 18px; }
.section-kicker h2, .sequence-heading h2 { font-size: 13px; font-weight: 600; }
.last-workout-value { margin-top: 16px; font-size: 22px; font-weight: 650; letter-spacing: -.5px; }
.empty-value { font-size: 20px; }
.muted { color: var(--muted); font-size: 12px; }
.last-workout .muted { margin-top: 5px; }
.sequence-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sequence-heading > span { font-size: 10px; letter-spacing: 1px; color: var(--muted); white-space: nowrap; }
.sequence-track { display: flex; justify-content: space-around; align-items: flex-start; gap: 8px; margin: 21px 0 16px; }
.sequence-step { display: grid; justify-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.sequence-letter { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 11px; background: #fafbf8; font-size: 17px; font-weight: 650; }
.sequence-step.is-next { color: var(--green); font-weight: 700; }
.sequence-step.is-next .sequence-letter { color: var(--green); background: var(--green-light); border-color: #afc8b7; }
.sequence-arrow { margin-top: 5px; color: #879188; }
.sequence-panel > .muted { max-width: 340px; font-size: 11px; }
.exercise-preview { margin-top: 37px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-top: 7px; font-size: 23px; font-weight: 650; letter-spacing: -.5px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 9px; color: var(--green); font-size: 12px; font-weight: 650; }
.text-link:hover { text-decoration: underline; }
.text-link span { font-size: 19px; }
.preview-list, .exercise-grid { padding: 0; margin: 0; list-style: none; }
.preview-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.preview-row { display: flex; align-items: center; gap: 18px; padding: 18px 24px; }
.preview-row + .preview-row { border-top: 1px solid #ebeee8; }
.exercise-number { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: #f0f3ec; color: #61715f; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.preview-thumb { width: 46px; height: 46px; flex-shrink: 0; object-fit: contain; background: #fafbf9; border: 1px solid #e1e6df; border-radius: 9px; }
.preview-name { flex: 1; min-width: 0; }
.preview-name h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.preview-name p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.preview-name p span { padding: 0 4px; }
.load-pill { max-width: 140px; padding: 6px 11px; border: 1px solid #dfe8de; border-radius: 7px; color: var(--green); background: #f5f8f2; font-size: 12px; font-weight: 650; text-align: right; }
.load-pill.is-unset { color: #756440; border-color: #e9e2d1; background: #faf8f0; }
.stage-notice { display: flex; align-items: flex-start; gap: 11px; margin-top: 25px; padding: 17px 20px; border: 1px solid #e1e4d7; border-radius: 11px; color: #667057; background: #eff1e7; }
.stage-notice svg { width: 18px; height: 18px; margin-top: 1px; }
.stage-notice p { font-size: 12px; line-height: 1.65; }
.stage-notice strong { color: #4d5c46; font-weight: 650; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 26px; margin-top: 19px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.site-footer > span { white-space: nowrap; }
.next-label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #d6e2d3; border-radius: 7px; background: var(--green-light); color: var(--green); font-size: 12px; white-space: nowrap; }
.workout-tabs { display: flex; gap: 9px; max-width: 520px; margin: 0 0 31px; }
.workout-tab { display: flex; flex: 1; align-items: center; gap: 11px; min-height: 58px; padding: 11px 17px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 14px; font-weight: 600; }
.workout-tab:hover { border-color: #98b8a1; background: #edf3e9; }
.tab-letter { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #f0f2ed; font-size: 13px; }
.workout-tab.is-selected { color: #fff; border-color: var(--green); background: var(--green); }
.workout-tab.is-selected .tab-letter { color: var(--lime); background: #376754; }
html {
    height: 100%;
}

/* Carousel & Stepper Full View (Zero-Scroll Mode) */
body:has(.exercise-carousel) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}
body:has(.exercise-carousel) .site-header {
    flex-shrink: 0;
    z-index: 10;
}
body:has(.exercise-carousel) .header-inner {
    padding: 6px 12px;
}
body:has(.exercise-carousel) .workout-nav-btn {
    min-height: 40px;
    min-width: 38px;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 10px;
}
body:has(.exercise-carousel) .workout-nav-btn.is-active {
    padding: 6px 16px;
}
body:has(.exercise-carousel) .logout-btn {
    min-height: 40px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
}
body:has(.exercise-carousel) .page-shell {
    flex: 1;
    min-height: 0;
    height: 100%;
    padding: 4px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
body:has(.exercise-carousel) .site-footer {
    display: none;
}
body:has(.exercise-carousel) .workout-sheet {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 4px;
}

.sheet-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px;
    flex-shrink: 0;
}
.sheet-top-bar h1 {
    font-size: 14px;
    font-weight: 750;
    margin: 0;
    color: var(--muted);
    letter-spacing: -.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sheet-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--green-light);
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.exercise-carousel {
    display: grid;
    grid-template-rows: 1fr auto;
    flex: 1;
    min-height: 0;
    height: 100%;
    position: relative;
    overflow: hidden;
    gap: 6px;
}
.exercise-carousel-viewport {
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .03);
}
.exercise-carousel-track {
    display: flex;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.exercise-card-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    padding: 6px 8px;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
    background: linear-gradient(145deg, #fff7f7 0%, #fee2e2 100%);
    transition: background 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.exercise-card-slide.is-done {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
}
.card-inner-box {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    width: 100%;
    gap: 4px;
    box-sizing: border-box;
}

.exercise-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
}
.exercise-name {
    font-size: clamp(15px, 3.5vw, 18px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.muscle-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.exercise-media-box {
    min-height: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff 0%, #fee2e2 100%);
    border-radius: 10px;
    border: 1.5px solid #fca5a5;
    padding: 2px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: background 0.3s cubic-bezier(0.2, 0.9, 0.3, 1),
                border-color 0.3s cubic-bezier(0.2, 0.9, 0.3, 1),
                transform 0.15s ease;
}
.exercise-media-box.media-pulse {
    animation: mediaBoxPulse 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes mediaBoxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.96); }
    100% { transform: scale(1); }
}
.exercise-card-slide.is-done .exercise-media-box {
    background: linear-gradient(145deg, #ffffff 0%, #dcfce7 100%);
    border-color: #86efac;
}
.exercise-media-box .exercise-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: block;
    pointer-events: none;
}

.exercise-params-bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0 0;
    flex-shrink: 0;
    min-height: 48px;
}

.params-summary-btn {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all .15s ease;
    touch-action: manipulation;
    text-align: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.params-summary-btn:hover {
    background: #e7f2e4;
    border-color: var(--green);
}

.param-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.param-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    line-height: 1;
}
.param-val {
    font-size: 15px;
    font-weight: 850;
    color: var(--ink);
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
}
.param-stat-load .param-load-val {
    color: var(--green);
}
.param-stat-load .param-load-val.is-unset {
    color: #8c734b;
    font-size: 13px;
}

.param-divider {
    width: 1px;
    height: 22px;
    background: #d5e0d1;
    flex-shrink: 0;
}

.param-edit-icon {
    font-size: 13px;
    margin-left: 2px;
    opacity: 0.75;
    flex-shrink: 0;
}

.btn-log-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    padding: 6px 0;
    border-radius: 12px;
    background: #ffffff;
    color: #dc2626;
    border: 2px solid #ef4444;
    font-family: inherit;
    font-size: 19px;
    font-weight: 850;
    cursor: pointer;
    transition: all .18s cubic-bezier(0.2, 0.9, 0.3, 1);
    touch-action: manipulation;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}
.btn-log-done:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #b91c1c;
}
.btn-log-done:active {
    transform: scale(0.96);
    background: #fee2e2;
}

.btn-log-done.is-done {
    background: var(--green);
    color: var(--lime);
    border: 2px solid var(--green);
    box-shadow: 0 4px 12px rgba(23, 76, 60, .25);
    font-size: 20px;
    font-weight: 900;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    flex-shrink: 0;
    min-height: 46px;
}
.carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 8px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all .15s ease;
    touch-action: manipulation;
    border: 1.5px solid #d5e0d1;
    background: var(--surface);
    color: var(--ink);
    flex: 1;
}
.carousel-btn:hover {
    background: #eef5ea;
    border-color: var(--green);
}
.carousel-btn-prev {
    flex: 1;
}
.carousel-btn-next {
    background: var(--green);
    color: var(--lime);
    border-color: var(--green);
    box-shadow: 0 4px 12px rgba(23, 76, 60, .22);
    flex: 1.4;
}
.carousel-btn-next:hover {
    background: #113c2f;
}
.carousel-btn-next.is-last {
    background: #235438;
    color: #ffffff;
}
.carousel-step-counter {
    font-size: 13px;
    font-weight: 850;
    color: var(--muted);
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Modal Dialog */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.modal-backdrop.is-open {
    display: flex;
}
.modal-dialog {
    background: var(--surface);
    border-radius: 20px;
    width: min(100%, 380px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 850;
    color: var(--ink);
    margin: 0;
}
.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-param-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.param-row-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: #f7f9f6;
    border: 1.5px solid #dce8d8;
    border-radius: 14px;
    transition: all .2s ease;
}
.param-row-card.is-changed {
    background: #edf7eb;
    border-color: #3b8764;
    box-shadow: 0 0 0 1px #3b8764;
}

.param-row-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .6px;
    text-transform: uppercase;
}
.param-row-card.is-changed .param-row-label {
    color: var(--green);
}

.param-stepper-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.btn-param-step {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ffffff;
    border: 1.5px solid #c8dcc3;
    color: var(--green);
    font-size: 26px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.btn-param-step:hover {
    background: #eaf4e8;
    border-color: var(--green);
}
.btn-param-step:active {
    transform: scale(0.92);
    background: #dbeef7;
}

.param-val-center {
    flex: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}
.param-val-number {
    font-size: 28px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.param-row-card.is-changed .param-val-number {
    color: var(--green);
}
.param-val-unit {
    font-size: 14px;
    font-weight: 800;
    color: var(--muted);
}
.param-row-card.is-changed .param-val-unit {
    color: var(--green);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.btn-modal-cancel {
    flex: 1;
    min-height: 48px;
    background: #f2f5f1;
    border: 1.5px solid #d8e2d4;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s ease;
}
.btn-modal-cancel:hover {
    background: #e8ede7;
}
.btn-modal-save {
    flex: 1.4;
    min-height: 48px;
    background: var(--green);
    border: none;
    border-radius: 12px;
    font-weight: 850;
    font-size: 15px;
    color: var(--lime);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(23, 76, 60, .25);
    transition: all .15s ease;
}
.btn-modal-save:hover {
    background: #10382b;
}
.btn-modal-save:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* Toast / Popup Temporário Centralizado */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    background: rgba(18, 28, 22, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    padding: 16px 26px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-align: center;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.12);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-width: 88vw;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.22s;
}
.toast-notification.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.toast-notification.is-success {
    background: rgba(13, 38, 26, 0.88);
    border: 1px solid rgba(52, 211, 153, 0.35);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(16, 185, 129, 0.22);
}
.toast-notification.is-error {
    background: rgba(48, 16, 16, 0.9);
    border: 1px solid rgba(248, 113, 113, 0.35);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(239, 68, 68, 0.22);
}
.toast-notification .toast-icon {
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 680px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 12px 4px;
}
.dashboard-hero-card {
    background: var(--green);
    color: #ffffff;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(23, 76, 60, 0.18);
}
.hero-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--lime);
}
.hero-title {
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -.8px;
    color: #ffffff;
    margin-top: 4px;
}
.hero-subtitle {
    font-size: 15px;
    color: #d8e5de;
    margin-top: 2px;
}
.hero-meta-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #b7cebf;
    margin-top: 6px;
    font-weight: 600;
}
.hero-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    background: var(--lime);
    color: var(--green);
    font-weight: 850;
    font-size: 15px;
    border-radius: 12px;
    transition: all .15s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}
.hero-action-btn:hover {
    background: #eaf8cb;
    transform: translateY(-1px);
}

.dashboard-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 2px;
}
.quick-links-title {
    font-size: 12px;
    font-weight: 750;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.quick-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-weight: 750;
    font-size: 14px;
    color: var(--ink);
    transition: all .15s ease;
}
.quick-btn:hover {
    background: #edf4eb;
    border-color: var(--green);
}
.quick-btn.is-highlight {
    background: #eef6eb;
    border-color: var(--green);
    color: var(--green);
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}
.section-heading-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.4px;
}
.section-badge {
    font-size: 12px;
    font-weight: 750;
    color: var(--muted);
    background: #eef3ec;
    padding: 3px 8px;
    border-radius: 6px;
}
.empty-logs-panel {
    text-align: center;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.empty-icon {
    font-size: 32px;
    margin: 0;
}
.empty-logs-panel h3 {
    font-size: 17px;
    font-weight: 800;
}
.empty-logs-panel p {
    max-width: 400px;
    font-size: 13px;
    line-height: 1.5;
}

.logs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .02);
}
.log-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.log-workout-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--green);
    color: var(--lime);
    font-weight: 850;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.log-workout-b {
    background: #254a68;
    color: #bee5f7;
}
.log-workout-c {
    background: #4a3468;
    color: #ebddff;
}
.log-info {
    min-width: 0;
}
.log-exercise-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.log-meta {
    display: flex;
    gap: 5px;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 600;
}
.log-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.log-load-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 7px;
    background: #eaf4e6;
    color: var(--green);
    font-weight: 800;
    font-size: 13px;
    border: 1px solid #d2e8cc;
}
.btn-delete-log {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s ease;
    padding: 0;
    line-height: 1;
    touch-action: manipulation;
    flex-shrink: 0;
}
.btn-delete-log:hover {
    background: #fee2e2;
    border-color: #f87171;
    transform: scale(1.08);
}
.btn-delete-log:active {
    transform: scale(0.92);
    background: #fca5a5;
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .next-workout { padding: 25px; }
    .hero-badge { display: none; }
    .hero-workout { gap: 20px; }
    .workout-letter { font-size: 108px; }
    .hero-workout h2 { font-size: 23px; }
    .workout-groups { font-size: 16px; }
    .panel { padding: 21px; }
    .sequence-heading > span { display: none; }
    .personal-label { display: none; }
}

@media (max-width: 680px) {
    .header-inner { padding: 8px 12px; gap: 8px; }
    .workout-nav { gap: 6px; flex: 1; }
    .workout-nav-btn { min-height: 46px; min-width: 40px; padding: 6px 10px; flex: 1; justify-content: center; border-radius: 10px; font-size: 15px; }
    .workout-nav-btn.is-active { flex: 1.6; padding: 6px 12px; font-size: 15px; }
    .logout-btn { min-height: 46px; padding: 6px 11px; border-radius: 10px; }
    .logout-text { display: none; }
    .logout-icon { font-size: 20px; }
    .login-card { padding: 30px 24px; }
    .page-shell { padding: 16px 14px 0; }
    .page-heading { margin: 18px 0 16px; }
    h1 { letter-spacing: -1.2px; font-size: 26px; }
    .page-description { margin-top: 6px; font-size: 13px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .next-workout { min-height: 280px; padding: 20px; }
    .hero-badge { display: inline; }
    .hero-workout { gap: 20px; margin: 18px 0 20px; }
    .workout-letter { font-size: 96px; }
    .hero-workout h2 { font-size: 22px; }
    .hero-meta { margin-top: 11px; }
    .dashboard-side { gap: 14px; }
    .last-workout { padding: 18px; }
    .last-workout-value { margin-top: 10px; font-size: 18px; }
    .sequence-panel { padding: 18px; }
    .sequence-heading > span { display: inline; }
    .sequence-track { justify-content: space-between; margin: 16px 8px 12px; }
    .sequence-letter { width: 40px; height: 38px; }
    .sequence-panel > .muted { max-width: none; font-size: 11px; }
    .exercise-preview { margin-top: 24px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 3px; margin-bottom: 12px; }
    .section-heading h2 { font-size: 20px; }
    .text-link { min-height: 38px; }
    .preview-row { gap: 10px; padding: 14px 12px; }
    .preview-name h3 { font-size: 14px; }
    .preview-name p { font-size: 11px; }
    .exercise-number { width: 28px; height: 28px; font-size: 11px; }
    .preview-thumb { width: 40px; height: 40px; }
    .load-pill { max-width: 95px; padding: 4px 7px; font-size: 11px; }
    .stage-notice { padding: 14px; }
    .site-footer { flex-direction: column; gap: 10px; padding-top: 20px; }
    .site-footer > span { font-size: 10px; }
    .exercise-page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .workout-tabs { margin-bottom: 20px; gap: 6px; }
    .workout-tab { justify-content: center; gap: 6px; padding: 8px; font-size: 12px; min-height: 48px; }
    .tab-letter { width: 22px; height: 24px; font-size: 11px; }
    .sheet-heading { align-items: flex-start; flex-direction: column; gap: 8px; padding-bottom: 14px; }
    .sheet-heading h2 { font-size: 21px; }
    .sheet-summary { font-size: 12px; }
    .exercise-grid { grid-template-columns: 1fr; gap: 12px; }
    .exercise-card { padding: 16px; }
    .exercise-card .exercise-number { width: 30px; height: 30px; font-size: 11px; }
    .exercise-card h3 { margin-top: 12px; font-size: 18px; }
    .exercise-targets { margin-top: 16px; margin-bottom: 16px; gap: 24px; }
    .exercise-targets > div + div { padding-left: 24px; }
    .exercise-targets dd { font-size: 24px; }
    .exercise-load { min-height: 48px; padding: 10px 12px; }
}

@media (max-width: 360px) {
    .header-inner { padding: 6px 8px; }
    .workout-nav-btn { min-width: 40px; padding: 6px 6px; }
    .workout-nav-letter { font-size: 18px; }
    .logout-btn { padding: 6px 8px; }
    .page-shell { padding: 12px 10px 0; }
    .preview-row { flex-wrap: wrap; }
    .preview-name { flex-basis: calc(100% - 38px); }
    .load-pill { margin-left: 36px; text-align: left; }
    .tab-letter { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
