/* ---------------------------------------------------------------------------
   Shop ÔÇö product grid, product detail page, training plans
   --------------------------------------------------------------------------- */

#assessment-questions-table {
    table-layout: fixed;
    min-width: 64rem;
}

#assessment-questions-table th,
#assessment-questions-table td {
    overflow-wrap: anywhere;
}

#assessment-questions-table thead tr:first-child th:nth-child(1) { width: 5%; }
#assessment-questions-table thead tr:first-child th:nth-child(2) { width: 10%; }
#assessment-questions-table thead tr:first-child th:nth-child(3) { width: 25%; }
#assessment-questions-table thead tr:first-child th:nth-child(4) { width: 20%; }
#assessment-questions-table thead tr:first-child th:nth-child(5) { width: 15%; }
#assessment-questions-table thead tr:first-child th:nth-child(6) { width: 25%; }

.ma-shop,
.ma-pdp,
.ma-plans,
.ma-plan-detail {
    padding-block: 1rem 4rem;
}

.ma-shop-header,
.ma-plans-header {
    margin-bottom: 2.5rem;
}

.ma-plans-header {
    text-align: left;
}

.ma-shop-title,
.ma-plans-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.ma-shop-intro,
.ma-plans-intro {
    color: var(--ma-on-light-faint);
    max-width: 46rem;
}

.ma-plans-intro {
    margin-inline: 0;
}

.ma-shop-crosslink {
    display: inline-block;
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
}

.ma-shop-crosslink:hover {
    text-decoration: underline;
}

/* --- Product grid --- */

.ma-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 2rem 1.5rem;
}

.ma-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ma-product-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--ma-surface-alt);
}

.ma-product-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.35s ease, transform 0.45s ease;
}

.ma-product-card-img--hover {
    opacity: 0;
}

/* Second gallery image cross-fades in on hover; falls back to a gentle zoom
   when the product has no second image. */
.ma-product-card:hover .ma-product-card-img--hover {
    opacity: 1;
}

.ma-product-card:hover .ma-product-card-img--primary {
    transform: scale(1.04);
}

.ma-product-card:hover .ma-product-card-img--hover {
    transform: scale(1.04);
}

.ma-product-card-placeholder {
    background: linear-gradient(135deg, var(--ma-placeholder-start), var(--ma-placeholder-end));
}

.ma-product-card-body {
    padding-top: 0.9rem;
}

.ma-product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.ma-product-card-price {
    margin: 0;
    font-weight: 700;
    color: var(--brand-primary);
}

.ma-product-card-interval {
    font-weight: 500;
    color: var(--ma-on-light-faint);
}

.ma-shop-empty,
.ma-plans-empty {
    color: var(--ma-on-light-faint);
}

/* --- Breadcrumb --- */

.ma-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    color: var(--ma-on-light-faint);
}

.ma-breadcrumb a {
    color: var(--ma-on-light-muted);
    font-weight: 600;
    text-decoration: none;
}

.ma-breadcrumb a:hover {
    text-decoration: underline;
}

.ma-breadcrumb-sep {
    margin-inline: 0.4rem;
}

/* --- Product detail --- */

.ma-pdp-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.ma-pdp-carousel {
    border-radius: 16px;
    overflow: hidden;
    background: var(--ma-surface-alt);
}

.ma-pdp-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.ma-pdp-carousel .carousel-control-prev-icon,
.ma-pdp-carousel .carousel-control-next-icon {
    filter: invert(1) grayscale(1);
}

.ma-pdp-thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.ma-pdp-thumb {
    width: 84px;
    height: 84px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ma-surface-alt);
    cursor: pointer;
}

.ma-pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ma-pdp-thumb.active {
    border-color: var(--brand-primary);
}

.ma-pdp-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.ma-pdp-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.ma-pdp-interval {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ma-on-light-faint);
}

.ma-pdp-summary {
    color: var(--ma-on-light-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.ma-pdp-unavailable {
    color: var(--ma-on-light-faint);
    font-style: italic;
}

.ma-pdp-details {
    margin-top: 3.5rem;
}

.ma-pdp-tabs .nav-link,
.ma-account-tabs .nav-link {
    color: var(--ma-on-light-faint);
    font-weight: 600;
}

.ma-pdp-tabs .nav-link.active,
.ma-account-tabs .nav-link.active {
    color: var(--brand-primary);
}

.ma-pdp-tabcontent,
.ma-account-tab-content {
    padding-top: 1.5rem;
    line-height: 1.7;
    color: var(--ma-on-light-muted);
}

@media (max-width: 860px) {
    .ma-pdp-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Training plans --- */
/* The page itself stays light like every other page; only the plan cards and
   the comparison table use the dark brand panel. */

.ma-plan-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.4rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--radius-lg);
    background: var(--ma-surface);
    color: var(--ma-on-light);
}

.ma-plan-card--highlight {
    border-color: var(--brand-warning);
    box-shadow: var(--ma-shadow-card);
}

/* Each block below reserves enough height for its longest realistic content
   (2-line title, 2-line tagline, 5 features, 2-line button note) so that a
   longer text in one card never shifts the price or button in its neighbours. */
.ma-plan-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 2.6rem;
}

.ma-plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--ma-on-light);
    min-width: 0;
}

.ma-plan-badge {
    flex-shrink: 1;
    min-width: 0;
    max-width: 55%;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    background: var(--brand-warning);
    color: var(--ma-ink);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    /* Truncates rather than spilling out of the card on narrow screens. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ma-plan-tagline {
    color: var(--ma-on-light-faint);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.00rem;
    min-height: 0.00rem;
}

.ma-plan-price-block {
    min-height: 2.6rem;
}

.ma-plan-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--brand-primary);
}

.ma-plan-price-suffix {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ma-on-light-faint);
}

.ma-plan-price-note {
    color: var(--brand-warning);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.35rem;
    margin-bottom: 0;
    min-height: 1.2rem;
}

.ma-plan-features {
    list-style: none;
    padding: 0;
    margin: 0.0rem 0 0;
    flex-grow: 1;
    /* 5 rows ├ù (1.26rem line + 0.6rem gap) */
    min-height: 9.3rem;
}

.ma-plan-feature {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.87rem;
    line-height: 1.45;
    color: var(--ma-on-light-muted);
    margin-bottom: 0.6rem;
}

.ma-plan-feature-mark {
    flex-shrink: 0;
    color: var(--ma-accent);
    font-weight: 700;
}

.ma-plan-feature--plus .ma-plan-feature-mark {
    color: var(--brand-warning);
}

.ma-plan-feature--more {
    font-style: italic;
    opacity: 0.85;
}

.ma-plan-cta {
    margin-top: 1.75rem;
}

.ma-plan-cta-note {
    text-align: center;
    color: var(--ma-on-light-faint);
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 0.5rem;
    margin-bottom: -1.05rem;
    /* Two lines reserved so a longer note never lifts the button above the
       others; the CTA block sits at the card bottom via flex-grow above. */
    min-height: 2.05rem;
}

/* --- Comparison matrix (dark panel) --- */

.ma-compare {
    margin-top: 4.5rem;
    background: var(--surface-muted);
    color: var(--ma-on-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--ma-border);
    padding: 2.5rem 2rem;
}

.ma-compare-heading {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--ma-on-light);
}

.ma-compare-table {
    width: 100%;
    border-collapse: collapse;
}

.ma-compare-table th,
.ma-compare-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--ma-border);
    text-align: center;
}

.ma-compare-table thead th {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ma-on-light);
    border-bottom-width: 2px;
}

.ma-compare-table tbody th {
    text-align: left;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ma-on-light);
}

.ma-compare-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--ma-on-dark);
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- Training plan detail (light page, reuses the .ma-pdp-* layout) --- */

.ma-pdp-price-note {
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.ma-pdp .ma-plan-features--detail {
    max-width: 34rem;
    margin: 0 0 1.75rem;
}

.ma-pdp .ma-plan-feature {
    color: var(--ma-on-light-muted);
}

.ma-pdp .ma-plan-feature-mark {
    color: var(--brand-success);
}

.ma-pdp .ma-plan-feature--plus .ma-plan-feature-mark {
    color: var(--brand-warning);
}

/* ---------------------------------------------------------------------------
   Basket ÔÇö navbar link/badge and cart page
   --------------------------------------------------------------------------- */

.ma-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.ma-cart-icon {
    font-size: 1.00rem;
    line-height: 1;
}

.ma-account-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ma-flag-icon {
    width: 1.1em;
    height: 0.8em;
    align-items: center;
    /*vertical-align: +0.1em; */
    border-radius: 2px;
}

.user-icon {
    width: 1.00rem;
    height: 1.00rem;
    fill: none;
    stroke: var(--ma-user-icon-stroke);
    stroke-width: 8;
    stroke-linecap: round;
}

.ma-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: var(--radius-pill);
    background: var(--brand-warning);
    color: var(--ma-ink);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.ma-timer-actions-width {
    max-width: 420px;
}

.ma-timer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.ma-timer-actions-full {
    grid-column: 1 / -1;
}

.ma-timer-next {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ma-border);
    color: var(--ma-on-light-faint);
    font-size: 0.95rem;
}

.ma-timer-next-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-right: 0.4rem;
}

.ma-timer-next-name {
    color: var(--ma-on-light);
    font-weight: 600;
}

.ma-timer-preset-editor {
    padding: 1rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--radius);
    background: var(--ma-surface);
    box-shadow: var(--ma-shadow-card);
}

@media (min-width: 992px) {
    /* max-height keeps the post-session assessment form reachable while sticky. */
    .ma-timer-sticky {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    html:has(.ma-timer-layout) {
        scroll-snap-type: y proximity;
        overflow-x: clip;
    }

    /* Full-bleed: break out of container + column padding. */
    .ma-timer-layout .ma-timer-card {
        min-height: 100vh;
        min-height: 100svh;
        scroll-snap-align: start;
        margin-inline: calc(50% - 50vw);
        border-radius: 0;
        border-inline: 0;
    }

    .ma-timer-layout .ma-timer-card > .card-body {
        display: flex;
        flex-direction: column;
    }

    /* Equal auto margins centre the timer and pin the next-interval line to the bottom. */
    .ma-timer-layout .ma-timer-card > .card-body > :first-child,
    .ma-timer-layout .ma-timer-next {
        margin-top: auto;
    }

    .ma-timer-layout #timer-display {
        font-size: clamp(4.5rem, 22vw, 8rem);
    }

    .ma-timer-layout .ma-timer-actions {
        margin-top: clamp(0.5rem, 8svh, 5rem);
    }

    .ma-timer-settings-card,
    .ma-saved-trainings-card {
        scroll-snap-align: start;
        scroll-margin-top: 0.75rem;
    }
}

/* Phones turned sideways: size the timer by height and put all actions in one row. */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 540px) {
    .ma-timer-layout .ma-timer-card > .card-body {
        padding-block: 0.5rem;
    }

    .ma-timer-layout #timer-phase {
        font-size: 1.1rem !important;
    }

    .ma-timer-layout #timer-display {
        font-size: clamp(2.75rem, 24svh, 6rem);
    }

    .ma-timer-layout #timer-vars {
        margin-bottom: 0.25rem !important;
    }

    .ma-timer-layout .ma-timer-actions-width {
        max-width: 640px;
    }

    .ma-timer-layout .ma-timer-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0.5rem;
    }

    .ma-timer-layout .ma-timer-actions-full {
        grid-column: auto;
    }

    .ma-timer-layout .ma-timer-next {
        padding-top: 0.4rem;
    }
}

.ma-input-w-160 {
    max-width: 160px;
}

.ma-input-w-220 {
    max-width: 220px;
}

.ma-cart {
    padding-block: 1rem 4rem;
}

.ma-cart-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.ma-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .ma-cart-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }
}

.ma-cart-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: start;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--ma-border);
}

.ma-cart-item:first-child {
    padding-top: 0;
}

.ma-cart-item-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--ma-surface-alt);
    display: block;
}

.ma-cart-item-placeholder {
    background: linear-gradient(135deg, var(--ma-placeholder-start), var(--ma-placeholder-end));
}

.ma-cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.ma-cart-item-unit {
    color: var(--ma-on-light-faint);
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}

.ma-cart-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ma-cart-qty-label {
    font-size: 0.8rem;
    color: var(--ma-on-light-faint);
}

.ma-cart-qty-input {
    width: 4rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--ma-border);
    border-radius: 8px;
    font-size: 0.9rem;
}

.ma-cart-qty-btn {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--ma-border);
    border-radius: 8px;
    background: transparent;
    color: var(--ma-on-light-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.ma-cart-qty-btn:hover {
    background: var(--ma-surface-alt);
}

.ma-cart-item-right {
    text-align: right;
}

.ma-cart-item-total {
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.ma-cart-remove {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ma-on-light-faint);
    font-size: 0.82rem;
    text-decoration: underline;
    cursor: pointer;
}

.ma-cart-remove:hover {
    color: var(--brand-danger);
}

.ma-cart-summary {
    padding: 1.5rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--radius-lg);
    background: var(--ma-surface-alt);
    position: sticky;
    top: 1.5rem;
}

.ma-cart-summary-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.ma-cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
}

.ma-cart-summary-row--muted {
    color: var(--ma-on-light-faint);
}

.ma-cart-summary-total {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--ma-border);
    font-size: 1.1rem;
    font-weight: 700;
}

.ma-cart-vat {
    color: var(--ma-on-light-faint);
    font-size: 0.78rem;
    margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------------------------
   Account - sidebar, tabs, profile image and crop modal
   --------------------------------------------------------------------------- */

.ma-account-layout {
    display: grid;
    grid-template-columns: minmax(240px, 25%) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.ma-account-sidebar {
    border: 1px solid var(--ma-border);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.ma-account-avatar-wrap {
    position: relative;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
}

#profile-image-input {
    display: none;
}

.ma-account-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--ma-surface);
    box-shadow: var(--ma-shadow-card);
    background: var(--ma-surface);
}

.ma-account-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.25rem;
    font-weight: 700;
    color: var(--ma-on-light-muted);
    background: linear-gradient(145deg, var(--ma-placeholder-start), var(--ma-placeholder-end));
}

.ma-account-avatar-actions {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
}

.ma-account-avatar-upload {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: var(--ma-on-dark);
    box-shadow: var(--ma-shadow-card);
}

.ma-account-avatar-upload:hover,
.ma-account-avatar-upload:focus {
    background: var(--brand-primary-dark);
}

.ma-account-avatar-menu {
    min-width: 13rem;
}

.ma-account-avatar-menu-item {
    cursor: pointer;
}

.ma-account-heading {
    word-break: break-word;
    border-bottom: 0;
    display: block;
    padding-bottom: 0;
}

.ma-account-email {
    color: var(--ma-on-light-faint);
    word-break: break-word;
}

.ma-account-tabs-shell {
    position: relative;
    margin-bottom: 1rem;
}

.ma-account-tabs-shell.is-overflowing::before,
.ma-account-tabs-shell.is-overflowing::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.ma-account-tabs-shell.is-overflowing::before {
    left: 0;
    background: linear-gradient(to right, var(--ma-surface) 28%, rgba(255, 255, 255, 0));
}

.ma-account-tabs-shell.is-overflowing::after {
    right: 0;
    background: linear-gradient(to left, var(--ma-surface) 28%, rgba(255, 255, 255, 0));
}

.ma-account-tabs-shell:not(.is-at-start)::before,
.ma-account-tabs-shell:not(.is-at-end)::after {
    content: "...";
    display: flex;
    align-items: flex-end;
    color: var(--ma-on-light-faint);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.ma-account-tabs-shell:not(.is-at-start)::before {
    justify-content: flex-start;
    padding: 0 0 0.45rem 0.45rem;
}

.ma-account-tabs-shell:not(.is-at-end)::after {
    justify-content: flex-end;
    padding: 0 0.45rem 0.45rem 0;
}

@media (max-width: 767.98px) {
    .ma-account-tabs-shell.is-overflowing:not(.is-at-start)::before,
    .ma-account-tabs-shell.is-overflowing:not(.is-at-end)::after {
        opacity: 1;
    }
}

.ma-account-tabs-shell.is-at-start::before {
    opacity: 0;
}

.ma-account-tabs-shell.is-at-end::after {
    opacity: 0;
}

.ma-account-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.ma-account-tabs {
    flex-wrap: nowrap;
    min-width: max-content;
}

.ma-account-tabs .nav-link {
    white-space: nowrap;
}

.ma-image-crop-preview {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    background: var(--ma-surface-alt);
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.ma-image-crop-preview--circle {
    max-width: 320px;
    border-radius: 50%;
}

.ma-image-crop-preview img,
.ma-image-crop-preview video {
    position: absolute;
    max-width: none;
    max-height: none;
    pointer-events: none;
}

.ma-image-crop-preview.is-dragging {
    cursor: grabbing;
}

.ma-image-crop-controls {
    max-width: 320px;
    margin-inline: auto;
}

@media (max-width: 992px) {
    .ma-account-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .ma-account-sidebar {
        padding: 1.25rem 1rem;
    }
}

.ma-cart-field {
    margin-bottom: 1rem;
}

.ma-cart-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.ma-cart-hint {
    color: var(--ma-on-light-faint);
    font-size: 0.78rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.ma-cart-secure {
    text-align: center;
    color: var(--ma-on-light-faint);
    font-size: 0.76rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.ma-cart-empty {
    padding: 3rem 0;
    color: var(--ma-on-light-faint);
}

/* ---------------------------------------------------------------------------
   Training dashboard - yearly activity heatmap + history table
   --------------------------------------------------------------------------- */

:root {
    --ma-activity-cell-size: 12.6px;
    --ma-activity-cell-gap: 4px;
}

.ma-activity-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
}

.ma-activity-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    align-items: start;
    width: max-content;
    min-width: max-content;
    margin-inline: auto;
}

.ma-activity-weekdays {
    display: grid;
    grid-template-rows: repeat(7, var(--ma-activity-cell-size));
    gap: var(--ma-activity-cell-gap);
    margin-top: calc(var(--ma-activity-cell-size) + var(--ma-activity-cell-gap));
    font-size: 0.72rem;
    color: var(--ma-on-light-faint);
    user-select: none;
}

.ma-activity-weekdays span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    line-height: 1;
    white-space: nowrap;
}

.ma-activity-board {
    width: max-content;
    min-width: max-content;
    margin-inline: auto;
}

.ma-activity-months {
    display: grid;
    grid-template-columns: repeat(53, var(--ma-activity-cell-size));
    gap: var(--ma-activity-cell-gap);
    font-size: 0.72rem;
    color: var(--ma-on-light-faint);
    margin-bottom: 0.35rem;
    user-select: none;
    width: max-content;
    min-width: max-content;
    margin-inline: auto;
}

.ma-activity-months span {
    white-space: nowrap;
    line-height: 1;
    overflow: visible;
}

.ma-activity-grid {
    display: grid;
    grid-template-columns: repeat(53, var(--ma-activity-cell-size));
    gap: var(--ma-activity-cell-gap);
    width: max-content;
    min-width: max-content;
    margin-inline: auto;
}

.ma-activity-week {
    display: grid;
    grid-template-rows: repeat(7, var(--ma-activity-cell-size));
    gap: var(--ma-activity-cell-gap);
}

.ma-activity-cell {
    display: block;
    width: var(--ma-activity-cell-size);
    height: var(--ma-activity-cell-size);
    border-radius: 3px;
    background: var(--ma-surface-alt);
}

.ma-activity-cell--out {
    opacity: 0.35;
}

.ma-activity-cell--0 {
    background: var(--ma-surface-alt);
}

.ma-activity-cell--2 {
    background: color-mix(in srgb, var(--brand-success) 45%, white);
}

.ma-activity-cell--4 {
    background: var(--brand-success);
}

.ma-activity-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ma-on-light-faint);
    font-size: 0.78rem;
}

.ma-activity-legend .ma-activity-cell {
    width: var(--ma-activity-cell-size);
    height: var(--ma-activity-cell-size);
}

.ma-history-table-wrap {
    overflow-x: auto;
}

.ma-history-table {
    min-width: 640px;
}

.ma-dashboard-chart-col {
    display: flex;
}

.ma-dashboard-chart-panel {
    width: 100%;
}

.ma-dashboard-chart-stage {
    position: relative;
    height: 320px;
}

.ma-dashboard-chart-panel canvas {
    width: 100%;
    height: 100%;
}

@media (max-width: 991.98px) {
    .ma-dashboard-chart-stage {
        height: 270px;
    }
}

.ma-points-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.ma-fatigue-bar {
    position: relative;
    height: 0.5rem;
    min-width: 6rem;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--ma-surface-alt);
}

/* The midpoint marks the readiness threshold. */
.ma-fatigue-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--ma-on-light-faint);
}

.ma-fatigue-bar span {
    display: block;
    height: 100%;
    background: var(--brand-warning);
}

.ma-note-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--ma-border);
    border-radius: 50%;
    background: var(--ma-surface-alt);
    color: var(--ma-on-light-faint);
    font-size: 0.78rem;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
}

.ma-note-bubble:hover,
.ma-note-bubble:focus {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    outline: none;
}

.ma-dashboard-method-link {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.ma-dashboard-method-link:hover,
.ma-dashboard-method-link:focus {
    text-decoration: underline;
}

.ma-dashboard-methodology {
    max-width: 900px;
}

.ma-method-formula {
    background: var(--ma-surface-alt);
    border: 1px solid var(--ma-border);
    border-radius: var(--radius);
    padding: 0.75rem;
    color: var(--ma-on-light-muted);
    overflow-x: auto;
}

/* Tindeq data */
.ma-tindeq-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.ma-tindeq-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: var(--radius-pill);
    font-size: 1.4rem;
    line-height: 1;
}

.ma-tindeq-upload:focus-within .ma-tindeq-add-btn {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.ma-tindeq-upload.is-uploading .ma-tindeq-add-btn {
    opacity: 0.6;
    pointer-events: none;
}

.ma-tindeq-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.ma-tindeq-stat {
    background: var(--ma-surface);
    border: 1px solid var(--ma-border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.ma-tindeq-stat-label {
    color: var(--ma-on-light-muted);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ma-tindeq-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.ma-tindeq-stat-value small {
    color: var(--ma-on-light-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.ma-tindeq-stat-sub {
    color: var(--ma-on-light-faint);
    font-size: 0.78rem;
}

.ma-tindeq-hint-icon,
.ma-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.6rem;
    font-style: italic;
    font-weight: 700;
    text-transform: none;
    vertical-align: 0.05em;
}

/* ---------------------------------------------------------------------------
   10-week plan - macrocycle timeline, weekly schedule, evaluation, library
   --------------------------------------------------------------------------- */
.ma-10w-phase--endurance,
.ma-10w-bar--endurance { --ma-10w-color: var(--ma-phase-endurance); }
.ma-10w-phase--power,
.ma-10w-bar--power { --ma-10w-color: var(--ma-phase-power); }
.ma-10w-phase--power_endurance,
.ma-10w-bar--power_endurance { --ma-10w-color: var(--ma-phase-power-endurance); }
.ma-10w-phase--tapering { --ma-10w-color: var(--ma-phase-tapering); }
.ma-10w-phase--supplementary,
.ma-10w-bar--supplementary { --ma-10w-color: var(--ma-phase-supplementary); }

.ma-10w-timeline {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(3.25rem, 1fr);
    gap: 4px;
    margin: 0;
    padding: 2rem 0.4rem 0.6rem;
    list-style: none;
    overflow-x: auto;
}

.ma-10w-week {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 3.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    background: var(--ma-10w-color);
    color: var(--ma-on-dark);
}

.ma-10w-peak-marker {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ma-readiness-yellow);
    font-size: 2.3rem;
    line-height: 1;
    cursor: help;
    text-shadow: 0 1px 2px rgb(0 0 0 / 22%);
}

.ma-10w-peak-marker:focus-visible {
    outline: 2px solid var(--ma-on-dark);
    outline-offset: 1px;
    border-radius: 50%;
}

.ma-10w-week.is-current {
    outline: 3px solid var(--ma-on-light);
    outline-offset: 2px;
}

.ma-10w-week-no {
    font-weight: 700;
}

.ma-10w-week-phase {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    width: max-content;
    max-width: calc(var(--ma-10w-phase-weeks) * (100% + 4px) - 12px);
    color: var(--ma-on-light);
    font-size: 0.72rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.ma-10w-phase--tapering .ma-10w-week-phase {
    left: auto;
    right: calc((1 - var(--ma-10w-phase-weeks)) * (100% + 4px));
    max-width: none;
    text-align: right;
    white-space: nowrap;
}

.ma-10w-chart {
    height: 260px;
}

.ma-10w-kicker {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ma-on-light-faint);
}

.ma-10w-headline {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ma-10w-color, var(--ma-on-light));
}

.ma-10w-headline--endurance { --ma-10w-color: var(--ma-phase-endurance); }
.ma-10w-headline--power { --ma-10w-color: var(--ma-phase-power); }
.ma-10w-headline--power_endurance { --ma-10w-color: var(--brand-warning-dark); }
.ma-10w-headline--supplementary { --ma-10w-color: var(--ma-phase-supplementary); }
.ma-10w-headline--balanced { --ma-10w-color: var(--ma-phase-tapering); }

.ma-10w-subhead {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ma-on-light-muted);
}

.ma-10w-bars {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ma-10w-bar-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.ma-10w-bar { accent-color: var(--ma-10w-color, var(--brand-primary)); }
.ma-10w-bar::-webkit-progress-value { background: var(--ma-10w-color, var(--brand-primary)); }
.ma-10w-bar::-moz-progress-bar { background: var(--ma-10w-color, var(--brand-primary)); }

.ma-10w-delta {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ma-on-light-faint);
}

.ma-10w-delta.is-up { color: var(--brand-success-dark); }
.ma-10w-delta.is-down { color: var(--brand-danger-dark); }

.ma-10w-weak {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ma-10w-weak summary {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.92rem;
}

.ma-10w-weak-detail {
    margin: 0.5rem 0 0.25rem 2.1rem;
    font-size: 0.88rem;
}

.ma-10w-weak-detail dt {
    font-weight: 600;
    color: var(--ma-on-light-muted);
}

.ma-10w-weak-detail dd {
    margin-bottom: 0.4rem;
}

.ma-10w-overview-layout { align-items: stretch; }
.ma-10w-overview-layout > [class*="col-"] { min-width: 0; }
@media (min-width: 1200px) {
    .ma-10w-evaluation-main { flex: 0 0 auto; width: 60%; }
    .ma-10w-weak-column { flex: 0 0 auto; width: 40%; }
}
.ma-10w-week-card { min-height: 0; overflow: hidden; }
.ma-10w-week-card [data-week-scroll] {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.ma-10w-weak-column {
    border-left: 1px solid var(--ma-border);
    padding-left: 1.25rem;
}

@media (max-width: 1199.98px) {
    .ma-10w-week-card {
        height: auto !important;
        max-height: none !important;
        overflow: visible;
    }

    .ma-10w-week-card [data-week-scroll] { overflow: visible; }

    .ma-10w-weak-column {
        border-top: 1px solid var(--ma-border);
        border-left: 0;
        padding-top: 1rem;
        padding-left: calc(var(--bs-gutter-x) * 0.5);
    }
}

.ma-10w-score {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ma-on-dark);
    background: var(--ma-on-light-faint);
}

.ma-10w-score--high { background: var(--brand-danger); }
.ma-10w-score--medium { background: var(--brand-warning); color: var(--ma-ink); }
.ma-10w-score--low { background: var(--brand-success); }
.ma-10w-score--open { background: var(--ma-surface-alt); color: var(--ma-on-light-muted); border: 1px dashed var(--ma-on-light-faint); }
.ma-10w-score--unlinked { background: var(--ma-surface-alt); color: var(--ma-on-light-faint); }
.ma-10w-score--excluded { background: var(--ma-surface-alt); color: var(--ma-on-light-faint); } /*background: var(--ma-readiness-red); color: var(--ma-on-dark);*/

.ma-10w-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    color: var(--ma-on-light-muted);
}

.ma-10w-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ma-10w-days {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ma-10w-day {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--radius);
}

.ma-10w-day.is-today {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.ma-10w-day-head {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.ma-10w-day-head span {
    font-size: 0.75rem;
    color: var(--ma-on-light-faint);
}

.ma-10w-day-items {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ma-10w-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--ma-10w-color);
    font-size: 0.85rem;
}

.ma-10w-item a {
    font-weight: 600;
    color: var(--ma-on-light);
}

.ma-10w-item.ma-10w-phase--supplementary {
    color: var(--ma-on-light-muted);
}

.ma-10w-item-duration {
    flex: 0 0 auto;
    color: var(--ma-on-light-faint);
}

.ma-10w-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.ma-10w-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.ma-10w-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--ma-10w-color);
}

.ma-10w-blocks .accordion-button {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
}

.ma-10w-block-title {
    font-weight: 600;
}

.ma-10w-block-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.5rem;
    font-size: 0.85rem;
    color: var(--ma-on-light-faint);
}

.ma-10w-block-desc {
    color: var(--ma-on-light-muted);
}

.ma-10w-chip {
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
}

.ma-10w-chip--focus {
    background: var(--brand-danger);
    color: var(--ma-on-dark);
}

.ma-10w-exercises {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ma-10w-ex {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--radius);
    background: var(--ma-surface);
    container-name: exercise-card;
    container-type: inline-size;
}

.ma-10w-ex.is-focus {
    border-color: var(--brand-danger);
}

.ma-10w-ex-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ma-10w-ex-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 11rem);
    grid-template-areas: "main media" "instructions media";
    align-items: start;
    gap: 0.75rem;
}

.ma-10w-ex-main { grid-area: main; min-width: 0; }
.ma-10w-ex-media { grid-area: media; width: 100%; max-width: 11rem; justify-self: end; }
.ma-10w-ex-desc { grid-area: instructions; min-width: 0; }

.ma-10w-ex-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
}

.ma-10w-ex-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0.3rem 0 0;
    font-size: 0.82rem;
}

.ma-10w-ex-meta > div {
    display: flex;
    gap: 0.3rem;
}

.ma-10w-ex-meta dt {
    font-weight: 500;
    color: var(--ma-on-light-faint);
}

.ma-10w-ex-meta dd {
    margin: 0;
    font-weight: 600;
}

.ma-10w-self-test {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--brand-primary-dark);
}

.ma-10w-ex-desc {
    margin-top: 0.35rem;
    font-size: 0.88rem;
}

.ma-10w-ex-desc summary {
    cursor: pointer;
    color: var(--brand-primary);
    font-weight: 600;
}

.ma-10w-ex-desc p {
    margin: 0.4rem 0 0;
    color: var(--ma-on-light-muted);
}

.ma-10w-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ma-10w-toggle {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--ma-form-border);
    border-radius: var(--radius-pill);
    background: var(--ma-form-bg);
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-check:checked + .ma-10w-toggle {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: var(--ma-on-dark);
}

.btn-check:focus-visible + .ma-10w-toggle {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.btn-check:disabled + .ma-10w-toggle {
    opacity: 0.4;
    cursor: not-allowed;
}

.ma-10w-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.5rem;
}

.ma-10w-level {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--ma-form-border);
    border-radius: var(--radius);
    background: var(--ma-form-bg);
    cursor: pointer;
}

.btn-check:checked + .ma-10w-level {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.btn-check:focus-visible + .ma-10w-level {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.ma-10w-level-title {
    font-weight: 600;
}

.ma-10w-level-help {
    font-size: 0.8rem;
    color: var(--ma-on-light-muted);
}

.ma-10w-chip--recommended {
    background: var(--brand-success);
    color: var(--ma-on-dark);
}

.ma-10w-chip--recovery {
    background: var(--ma-phase-endurance);
    color: var(--ma-on-dark);
}

.ma-10w-settings-heading {
    margin-bottom: 0.5rem;
    color: var(--ma-on-light);
    font-size: 1.05rem;
    font-weight: 700;
}

.ma-10w-settings-form .ma-10w-level { gap: 0.1rem; padding: 0.5rem 0.65rem; }
.ma-10w-settings-form h4.ma-10w-settings-heading { font-size: 0.95rem; }
.ma-10w-settings-form .ma-10w-level-title { font-size: 0.9rem; }
.ma-10w-settings-form .ma-10w-level-help { font-size: 0.75rem; }

.ma-10w-settings-form label[for="id_start_date"] {
    color: var(--brand-primary-dark);
    font-weight: 700;
}

.ma-10w-settings-form #id_start_date:not(:focus) {
    border-color: var(--brand-primary);
    background-color: color-mix(in srgb, var(--brand-primary) 6%, var(--ma-surface));
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.ma-10w-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border: 1px solid var(--ma-border);
}

.ma-10w-settings-grid > div {
    min-width: 0;
    padding: 1rem 1.25rem;
}

.ma-10w-settings-grid > div + div {
    border-top: 1px solid var(--ma-border);
}

@media (min-width: 992px) {
    .ma-10w-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ma-10w-settings-grid > div:nth-child(2) { border-top: 0; }
    .ma-10w-settings-grid > div:nth-child(even) { border-left: 1px solid var(--ma-border); }
}

@media (max-width: 575.98px) {
    .ma-10w-settings-heading { font-size: 1rem; }
}

.ma-10w-week-sessions {
    display: flex;
    gap: 3px;
    margin-top: auto;
}

.ma-10w-session-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border: 1px solid var(--ma-on-dark);
    border-radius: 50%;
    background: var(--ma-10w-color);
    vertical-align: middle;
}

.ma-10w-session-dot.is-converted {
    border-width: 2px;
}

.ma-10w-weeknav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ma-10w-navbtn {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--ma-border);
    border-radius: 50%;
    background: var(--ma-surface);
    color: var(--brand-primary);
    line-height: 1;
}

.ma-10w-navbtn:disabled {
    color: var(--ma-on-light-faint);
    opacity: 0.5;
}

.ma-10w-day.is-rest {
    background: var(--ma-surface-alt);
}

.ma-10w-item.is-done a {
    color: var(--brand-success-dark);
}

.ma-10w-item--rest {
    border-left-color: var(--ma-border);
    color: var(--ma-on-light-faint);
}

.ma-10w-overview th,
.ma-10w-overview td {
    min-width: 5.5rem;
}

.ma-10w-overview tr.is-current {
    --bs-table-bg: var(--ma-help-bg);
}

.ma-10w-overview td.is-today {
    box-shadow: inset 0 0 0 2px var(--brand-primary);
}

.ma-10w-overview td.is-rest {
    --bs-table-bg: var(--ma-surface-alt);
}

.ma-10w-overview-week {
    padding: 0;
    border: 0;
    background: none;
    font-weight: 700;
    color: var(--brand-primary);
}

.ma-10w-chip--session {
    display: inline-block;
    margin: 0 0.2rem 0.2rem 0;
    background: var(--ma-10w-color);
    color: var(--ma-on-dark);
    text-decoration: none;
}

.ma-10w-chip--session.is-done {
    box-shadow: 0 0 0 2px var(--brand-success);
}

.ma-10w-chip--scheduled {
    background: var(--ma-phase-supplementary);
    color: var(--ma-on-dark);
}

.ma-10w-extra-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.72rem;
    line-height: 1.25;
    color: var(--ma-on-light-muted);
}

.ma-10w-summary {
    font-size: 0.88rem;
}

.ma-10w-summary tfoot th {
    border-top: 2px solid var(--ma-on-light-faint);
}

.ma-10w-block-fit {
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    background: var(--ma-help-bg);
    color: var(--ma-help-text);
}

.ma-10w-ex-total dd {
    color: var(--brand-primary-dark);
}

.ma-10w-swap {
    flex: 0 0 auto;
    margin: 0;
}

.ma-10w-runner-progress {
    height: 10px;
}

.ma-10w-block-carousel {
    margin: 1rem 0;
}

.ma-10w-block-carousel-slide {
    touch-action: pan-y;
    user-select: none;
}

.ma-10w-exercise-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--ma-surface-alt);
}

.ma-10w-image-toggle {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.ma-10w-image-toggle:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: -3px;
}

.ma-10w-image-toggle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ma-10w-image-toggle video { position: absolute; max-width: none; max-height: none; object-fit: fill; }

.ma-10w-image-description {
    position: absolute;
    inset: 0 0 auto;
    max-height: 100%;
    overflow-y: auto;
    margin: 0;
    padding: 0.75rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
    color: var(--ma-on-light);
    background: rgb(255 255 255 / 85%);
    user-select: text;
}

#runner-carousel-navigation[hidden] { display: none !important; }

.ma-10w-variant-picker { min-width: 0; }

.ma-10w-variant-buttons {
    display: flex;
    gap: 0.35rem;
    width: 100%;
    margin-bottom: 0.6rem;
}

.ma-10w-variant-buttons .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.35rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ma-10w-variant-panel[hidden] { display: none; }

.ma-10w-runner-progress .progress-bar {
    transition: none;
}

.ma-10w-runner-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.ma-10w-runner-actions [data-runner-fail] { grid-column: 1 / -1; }

.ma-10w-session-layout { align-items: start; }
.ma-10w-session-timer-column,
.ma-10w-session-overview-column { min-width: 0; }

@media (min-width: 992px) {
    .ma-10w-session-layout > .ma-10w-session-timer-column { flex: 0 0 40%; max-width: 40%; }
    .ma-10w-session-layout > .ma-10w-session-overview-column { flex: 0 0 60%; max-width: 60%; }
}

.ma-10w-session-page .ma-10w-runner-heading { position: relative; padding-inline: 2.5rem; }
.ma-10w-session-page .ma-10w-runner-title-row { min-width: 0; }
.ma-10w-session-page .ma-10w-runner-title-row h2 { min-width: 0; }
.ma-10w-session-page .ma-timer-actions { grid-template-columns: auto minmax(0, 1fr) auto; }
.ma-10w-session-page .ma-timer-actions [data-runner-fail] { grid-column: 1 / -1; }
.ma-10w-session-page .ma-timer-actions { margin-top: clamp(0.5rem, 8svh, 5rem); }
.ma-10w-session-page #timer-phase { min-height: 1.5rem; }
.ma-10w-session-page #timer-display { font-size: clamp(3.5rem, 7vw, 5.5rem); }
.ma-10w-session-page #runner-target { min-height: 1.25rem; }
.ma-10w-session-page #runner-detail { min-height: 1.25rem; }
.ma-10w-session-page .ma-10w-session-overview-column details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    list-style: none;
}
.ma-10w-session-page .ma-10w-session-overview-column details > summary::-webkit-details-marker { display: none; }
.ma-10w-session-page .ma-10w-session-overview-column details > summary::after {
    content: "";
    flex: 0 0 0.55rem;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-0.12rem);
    transition: transform 0.16s ease;
}
.ma-10w-session-page .ma-10w-session-overview-column details[open] > summary::after { transform: rotate(225deg) translate(-0.1rem, -0.1rem); }
.ma-10w-session-page .ma-10w-session-overview-column details > summary:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: -3px; }

@media (max-width: 991.98px) {
    .ma-10w-session-page #timer-display { font-size: clamp(4.5rem, 22vw, 8rem); }
}

@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 540px) {
    .ma-10w-session-page #timer-phase { font-size: 1.1rem !important; }
    .ma-10w-session-page #timer-display { font-size: clamp(2.75rem, 24svh, 6rem); }
    .ma-10w-session-page .ma-timer-actions { margin-top: 0.5rem; }
}

.formula-box { 
    background-color: #f8f9fa; 
    border-left: 4px solid #0066cc; 
    padding: 15px; 
    margin: 20px 0; 
    border-radius: 4px; 
    
    /* Mobile Responsive Fixes */
    overflow-x: auto;          /* Scrollbar erscheint nur, wenn die Formel ausbricht */
    overflow-y: hidden;
    max-width: 100%;           /* Verhindert das Aufblähen des übergeordneten Containers */
    -webkit-overflow-scrolling: touch; /* Flüssiges Scrollen auf iOS-Geräten */
}

/* MathJax-Container auf 100% Breite zwingen */
.formula-box mjx-container[display="true"] {
    min-width: 100%;
    box-sizing: border-box;
}
        
.reference-list { 
    font-size: 0.9em; 
    color: #555; 
    margin-top: 30px; 
}

/* ---------------------------------------------------------------------------
   Gamification methodology - table of contents and calculator
   --------------------------------------------------------------------------- */
.ma-gami-toc {
    margin: 1rem 0 2rem;
    padding: 1rem 1.25rem;
    background: var(--ma-surface-alt);
    border-radius: var(--radius);
}

.ma-gami-toc ol {
    margin: 0;
    columns: 2 18rem;
}

.ma-gami {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ma-border);
}

.ma-gami h3 {
    margin-top: 2rem;
}

.ma-gami-toolbar {
    margin-bottom: 1rem;
}

.ma-gami-session > summary {
    cursor: pointer;
    font-weight: 700;
}

.ma-gami-paramset {
    margin: 0.75rem 0 1.25rem;
    padding: 0.6rem 0.85rem 0.15rem;
    border: 1px dashed var(--ma-form-border);
    border-radius: var(--radius);
    background: var(--ma-help-bg);
}

.ma-gami-paramset-title {
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ma-help-text);
}

.ma-gami-paramset .ma-gami-table {
    margin-bottom: 0.5rem;
}

.ma-gami-changed {
    border-color: var(--brand-warning);
    background: var(--ma-surface);
    box-shadow: 0 0 0 2px var(--brand-warning);
}

.ma-gami-check {
    justify-content: flex-start;
}

.ma-gami-check .form-check-input {
    margin: 0.35rem 0 0;
}

.ma-gami-load {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.ma-gami-load .form-select {
    width: auto;
}

.ma-gami-live {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 2rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    color: var(--ma-on-dark);
    background: var(--ma-ink);
    border-radius: var(--radius) var(--radius) 0 0;
}

.ma-gami-live a {
    margin-left: auto;
    color: var(--ma-accent);
}

.ma-gami-live-title {
    font-weight: 700;
}

.ma-gami-fields,
.ma-gami-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.ma-gami-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
    color: var(--ma-on-light-muted);
}

.ma-gami-table {
    font-size: 0.8rem;
    white-space: nowrap;
}

.ma-gami-table .form-control {
    min-width: 4.5rem;
}

.ma-gami-inline {
    width: 4.5rem;
}

.ma-gami-session {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--radius);
}

.ma-gami-session > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.ma-gami-session[open] > summary {
    margin-bottom: 0.5rem;
}

.ma-gami-session-title {
    min-width: 12rem;
}

.ma-gami-session-total {
    min-width: 4rem;
    text-align: right;
}

.ma-gami-bar {
    display: flex;
    flex: 1 1 12rem;
    height: 0.6rem;
    min-width: 8rem;
    margin: 0.25rem 0;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--ma-surface-alt);
}

.ma-gami-bar-climb_power { background: var(--ma-phase-power); }
.ma-gami-bar-climb_pe { background: var(--ma-phase-power-endurance); }
.ma-gami-bar-climb_endurance { background: var(--ma-phase-endurance); }
.ma-gami-bar-climb_health { background: var(--ma-accent); }
.ma-gami-bar-comp_power { background: var(--ma-phase-power); opacity: 0.45; }
.ma-gami-bar-comp_pe { background: var(--ma-phase-power-endurance); opacity: 0.45; }
.ma-gami-bar-comp_endurance { background: var(--ma-phase-endurance); opacity: 0.45; }
.ma-gami-bar-comp_health { background: var(--ma-accent); opacity: 0.45; }

.ma-exercise-catalog {
    width: 3015px;
    table-layout: fixed;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.ma-exercise-catalog-exercise { width: 442px; }
.ma-exercise-catalog-description { width: 663px; }
.ma-exercise-catalog-assessment { width: 90px; }
.ma-exercise-catalog-image-column { width: 144px; }

.ma-exercise-catalog-prescription > div {
    flex-wrap: wrap;
    max-width: 100%;
}

.ma-exercise-catalog-image {
    display: block;
    width: 128px;
    max-width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: contain;
    background: var(--ma-surface-alt);
}

.ma-exercise-slideshow { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ma-surface-alt); }
.ma-exercise-slideshow--thumbnail { width: 128px; max-width: 100%; }
.ma-exercise-slideshow > img,
.ma-exercise-slideshow > video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.ma-exercise-slideshow > video { max-width: none; max-height: none; }
.ma-exercise-slideshow > img[hidden],
.ma-exercise-slideshow > video[hidden] { display: none; }
.ma-image-slideshow-controls { position: absolute; bottom: 4px; right: 4px; display: flex; gap: 2px; z-index: 3; }
.ma-image-slideshow-controls[hidden] { display: none; }
.ma-image-slideshow-controls button { width: 24px; height: 24px; padding: 0; border: 1px solid var(--ma-border); border-radius: 3px; color: var(--ma-on-light); background: color-mix(in srgb, var(--ma-surface) 90%, transparent); font-size: 15px; line-height: 1; }

.ma-catalog-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
    gap: 2rem;
    align-items: start;
}

.ma-catalog-editor-section, .ma-catalog-variant {
    min-width: 0;
    padding: 1.25rem 0;
    border: 0;
    border-top: 1px solid var(--ma-border);
}

.ma-catalog-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ma-catalog-variant-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--ma-border); }
.ma-catalog-variant-tabs button { padding: 0.65rem 0.9rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ma-on-light-muted); }
.ma-catalog-variant-tabs button[aria-selected="true"] { color: var(--ma-on-light); border-bottom-color: var(--brand-primary); font-weight: 600; }
.ma-catalog-variant[hidden] { display: none; }

.ma-catalog-field { min-width: 0; }
.ma-catalog-field-wide { grid-column: 1 / -1; }
.ma-catalog-field .Draftail-Editor { min-width: 0; width: 100%; }
.ma-catalog-field input[type="file"] { width: 100%; }

.ma-catalog-preview {
    position: sticky;
    top: 1rem;
    min-width: 0;
    padding: 1rem;
    background: var(--ma-surface-alt);
    border: 1px solid var(--ma-border);
    border-radius: 4px;
}

.ma-catalog-preview-readonly { position: static; max-width: 480px; }
#exercise-image-crop-modal .modal-dialog { max-width: 720px; }
#exercise-image-crop-modal .modal-content { padding: 0; }
.ma-catalog-preview [data-preview-slide][hidden] { display: none; }
.ma-catalog-preview .ma-10w-image-description { white-space: normal; }
.ma-catalog-comparison { table-layout: fixed; overflow-wrap: anywhere; }
.ma-catalog-comparison th:first-child { width: 22%; }
.ma-catalog-review-image { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }

.ma-catalog-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
    padding: 1rem 0;
    background: var(--ma-surface);
    border-top: 1px solid var(--ma-border);
}

@media (max-width: 991px) {
    .ma-catalog-editor-layout { grid-template-columns: minmax(0, 1fr); }
    .ma-catalog-preview { position: static; }
}

@media (max-width: 575px) {
    .ma-catalog-field-grid { grid-template-columns: minmax(0, 1fr); }
}

@container exercise-card (max-width: 400px) {
    .ma-10w-ex-content {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "media" "instructions";
        gap: 0.5rem;
    }

    .ma-10w-ex-media {
        width: 100%;
        max-width: 13rem;
        justify-self: center;
    }
}