.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 0;
    margin: auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #2A2E35;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #C6F135;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: 50% 0 auto 0;
    transform: translateY(-50%);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Tema Pizarra. Los colores repiten los de FiteeTheme.cs. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
    --ground: #0E1013;
    --card: #1A1D22;
    --card-raised: #2A2E35;
    --bar: #15181C;
    --accent: #C6F135;
    --warning: #FFB547;
    --text: #F2F4F7;
    --muted: #A7AEB8;
    --display: "Barlow Condensed", sans-serif;
    --safe-bottom: env(safe-area-inset-bottom);
    --nav-height: 68px;
    color-scheme: dark;
}

html {
    -webkit-text-size-adjust: 100%;
}

html,
body {
    background: var(--ground);
    color: var(--text);
    font-family: Barlow, sans-serif;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
}

/* Estructura */
.app-shell {
    min-height: 100dvh;
}

.page-loader {
    display: grid;
    inset: 0;
    pointer-events: none;
    place-items: center;
    position: fixed;
}

.inline-loader {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.app-content {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(24px, calc(env(safe-area-inset-top) + 12px)) 20px calc(24px + var(--safe-bottom));
}

/* La pantalla ocupa todo el alto: sin esto, un campo suelto de MudBlazor se estira para llenarla. */
.app-content > .mud-input-control {
    flex: none;
}

.with-nav .app-content {
    padding-bottom: calc(var(--nav-height) + 24px + var(--safe-bottom));
}

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding-bottom: var(--safe-bottom);
    background: var(--bar);
}

.bottom-nav-items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 600px;
    height: var(--nav-height);
    margin: 0 auto;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.bottom-nav a.is-active {
    color: var(--accent);
}

.bottom-nav svg,
.rest-tool svg,
.set-check svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-nav svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Marca y títulos */
.brand {
    margin: 0;
    font-family: var(--display);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-header {
    margin: 32px 0 8px;
}

.auth-header .brand {
    color: var(--accent);
    font-size: 56px;
    line-height: 1;
}

.auth-header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--muted);
    opacity: 0.3;
}

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: #FFFFFF;
    color: #1F1F1F;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.section-title {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

/* Tarjeta principal */
.hero-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--ground);
}

.hero-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-title {
    margin: 0;
    font-family: var(--display);
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.hero-meta {
    font-size: 15px;
    font-weight: 500;
}

.hero-action,
.bar-action {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.hero-action {
    height: 56px;
    border-radius: 14px;
    background: var(--ground);
    color: var(--text);
    font-size: 22px;
    text-decoration: none;
}

/* Datos de Inicio */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 16px;
    background: var(--card);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
}

.stat-value {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.stat-placeholder {
    border-radius: 8px;
}

/* Listas */
.exercise-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    border: 0;
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.list-row:disabled {
    opacity: 0.5;
    cursor: default;
}

.list-row-meta {
    flex: none;
    color: var(--muted);
    font-size: 13px;
}

.exercise-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 16px;
    background: var(--card);
    color: inherit;
    text-decoration: none;
}

.exercise-thumb {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: #FFFFFF;
    object-fit: cover;
}

.exercise-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.exercise-name {
    font-weight: 600;
}

.exercise-meta {
    color: var(--muted);
    font-size: 13px;
}

.exercise-gif {
    display: block;
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    border-radius: 16px;
}

.exercise-steps {
    padding-left: 1.25rem;
}

.exercise-steps li {
    margin-bottom: 0.5rem;
}

/* Editor de rutinas */
.routine-day-header,
.routine-exercise-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.routine-exercise-header .exercise-name {
    flex: 1;
    min-width: 0;
}

.routine-exercise-gif {
    flex: none;
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    object-fit: cover;
}

.routine-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 0.75rem;
}

/* Sesión en vivo */
.workout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: calc(92px + var(--safe-bottom));
}

.workout-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
}

.text-action {
    color: var(--muted);
    font-size: 15px;
}

.text-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: none;
    text-decoration: none;
    cursor: pointer;
}

.workout-top > .text-action {
    padding-left: 0;
}

.exercise-picker .mud-button-root {
    color: var(--muted);
    font-size: 15px;
    font-weight: 400;
    text-transform: none;
}

.rir-hint {
    margin: 0 0 8px;
}

.picker-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.picker-item.is-current .picker-name {
    color: var(--accent);
    font-weight: 700;
}

.picker-status {
    color: var(--muted);
    font-size: 13px;
}

.workout-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 48px;
}

.workout-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--card-raised);
}

.workout-progress span {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
}

.workout-gif {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 18px;
    background: var(--card);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.workout-gif img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
}

.workout-gif span {
    display: none;
}

.workout-gif img[hidden] + span {
    display: block;
}

.workout-name {
    margin: 0;
    font-family: var(--display);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.05;
}

.workout-note {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.suggestion {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
    border: 1px solid var(--muted);
    border-radius: 16px;
}

.suggestion.is-up {
    border-color: var(--accent);
}

.suggestion.is-warning {
    border-color: var(--warning);
}

.suggestion-text {
    display: flex;
    flex: 1 1 160px;
    flex-direction: column;
    min-width: 0;
}

.suggestion-goal {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
}

.suggestion.is-up .suggestion-goal {
    color: var(--accent);
}

.suggestion.is-warning .suggestion-goal {
    color: var(--warning);
}

.suggestion-reason {
    color: #D5D9DF;
    font-size: 13px;
}

.suggestion-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.suggestion-apply {
    height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--ground);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.set-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.set-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(14, 16, 19, 0.72);
}

.tour-on {
    position: relative;
    z-index: 1401;
    border-radius: 12px;
    background: var(--ground);
    box-shadow: 0 0 0 3px var(--accent);
}

.tour-tip {
    position: fixed;
    right: 16px;
    bottom: calc(16px + var(--safe-bottom));
    left: 16px;
    z-index: 1402;
    max-width: 568px;
    margin: 0 auto;
    padding: 14px;
    border-radius: 14px;
    background: #F2F3F5;
    color: var(--ground);
}

.tour-title {
    display: block;
    font-family: var(--display);
    font-size: 20px;
}

.tour-text,
.tour-hint {
    margin: 4px 0 12px;
    font-size: 14px;
    line-height: 1.4;
}

.tour-hint {
    color: #5B616B;
}

.tour-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tour-skip {
    border: 0;
    background: none;
    color: #5B616B;
    font-size: 14px;
    cursor: pointer;
}

.tour-count {
    color: #5B616B;
    font-size: 12px;
}

.tour-next {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--ground);
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

.tutorial-link {
    align-self: center;
}

.summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-kicker {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.summary-title {
    margin: 0;
    font-family: var(--display);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.05;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.summary-value {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.summary-section {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.summary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--card);
}

.summary-row b {
    font-weight: 600;
}

.summary-icon {
    flex: none;
    color: var(--accent);
}

.summary-compare {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.summary-compare > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.summary-up {
    color: var(--accent);
    font-weight: 600;
}

.summary-record {
    border: 1px solid var(--accent);
}

.summary-record-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.summary-record-value {
    color: var(--accent);
    font-family: var(--display);
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.continuous-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.continuous-done {
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--ground);
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.continuous-done.is-done {
    background: var(--card-raised);
    color: var(--accent);
}

.continuous-done:disabled {
    opacity: 0.5;
    cursor: default;
}

.set-index {
    flex: none;
    width: 36px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.set-field {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 60px;
    border-radius: 12px;
    background: var(--card);
}

.set-field:focus-within {
    outline: 2px solid var(--accent);
}

.set-field-label {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
}

.set-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    color: var(--text);
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.set-predicted .set-field input {
    color: var(--accent);
    font-style: italic;
}

.set-done .set-field,
.set-done .set-index {
    opacity: 0.6;
}

.set-check {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--card-raised);
    color: var(--muted);
    cursor: pointer;
}

.set-check svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

.set-check[aria-pressed="true"] {
    background: var(--accent);
    color: var(--ground);
}

.set-check:disabled {
    opacity: 0.4;
    cursor: default;
}

.add-set {
    align-self: flex-start;
    padding-left: 0;
    color: var(--accent);
}

.workout-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding-bottom: var(--safe-bottom);
    background: var(--card);
}

.workout-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 20px;
}

.rest-block {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.rest-label {
    color: var(--muted);
    font-size: 13px;
}

.rest-time {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.rest-block.is-done .rest-time {
    color: var(--accent);
}

.rest-tool {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--card-raised);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rest-tool svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.bar-action {
    flex: none;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--accent);
    color: var(--ground);
    font-size: 20px;
}

.bar-action:only-child {
    flex: 1;
}

.bar-action:disabled {
    opacity: 0.5;
}

/* Historial */
.volume-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: var(--card);
}

.volume-card .stat-label {
    display: block;
}

.volume-total {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.volume-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.volume-week {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.volume-track {
    display: flex;
    align-items: flex-end;
    height: 100px;
}

.volume-bar {
    display: block;
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: #4A505A;
}

.volume-bar.is-current {
    background: var(--accent);
}

.volume-label {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--card);
}

.history-date {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    width: 44px;
}

.history-day {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.history-month {
    color: var(--muted);
    font-size: 12px;
}

.history-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.history-volume {
    flex: none;
    font-size: 13px;
    font-weight: 600;
}

/* Diagnóstico */
.diagnostics {
    max-width: 40rem;
    margin: 0 auto;
}

.diagnostics section {
    margin-top: 1.5rem;
}

.diagnostics dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
}

.diagnostics dd {
    margin: 0;
    font-weight: 600;
}

.diagnostics button {
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 12px;
    background: var(--card-raised);
    color: var(--text);
    font-size: 1rem;
}

.diagnostics .hint {
    color: var(--muted);
    font-size: 0.875rem;
}

.diagnostics .timer {
    font-size: 2.5rem;
    font-variant-numeric: tabular-nums;
}

.diagnostics .log {
    padding-left: 1.25rem;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

/* Progreso */
.segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--card);
}

.segmented button {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.segmented button[aria-pressed="true"] {
    background: var(--card-raised);
    color: var(--text);
}

.native-field {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--card);
}

.native-field input {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
}

.native-field:focus-within {
    outline: 2px solid var(--accent);
}

.kind-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kind-chip {
    flex: none;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.kind-chip[aria-pressed="true"] {
    background: var(--accent);
    color: var(--ground);
}

.measure-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.measure-form .set-field {
    flex: 0 0 84px;
}

.measure-form .suggestion-apply {
    flex: none;
    height: auto;
}

.measure-form .suggestion-apply:disabled {
    opacity: 0.4;
    cursor: default;
}

a.stat-card {
    color: inherit;
    text-decoration: none;
}

.trend-readout {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.trend-readout strong {
    color: var(--text);
    font-family: var(--display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.trend-chart {
    display: block;
    width: 100%;
    height: auto;
}

.trend-grid {
    stroke: var(--card-raised);
    stroke-width: 1;
}

.trend-axis {
    fill: var(--muted);
    font-size: 12px;
}

.trend-line {
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

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

.trend-hit {
    fill: transparent;
    cursor: pointer;
}

/* Corregir sesión */
a.history-item {
    color: inherit;
    text-decoration: none;
}

.back-link {
    align-self: flex-start;
    padding-left: 0;
}

.session-exercise {
    display: flex;
    flex-direction: column;
}

.set-remove {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
}

.set-remove svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.5;
}

/* Código de verificación */
.code-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--card);
}

.code-field:focus-within {
    outline: 2px solid var(--accent);
}

.code-field input {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    color: var(--text);
    font-family: var(--display);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 10px;
    text-align: center;
}


/* Carrusel de rutinas */
.hero-card.is-swipeable {
    touch-action: pan-y;
    user-select: none;
    animation: hero-in 0.18s ease-out;
}

@keyframes hero-in {
    from { opacity: 0.4; transform: translateX(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card.is-swipeable { animation: none; }
}

.hero-routine {
    font-size: 18px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.hero-card .hero-title {
    margin-top: -8px;
}

.hero-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: -12px;
}

.hero-dots button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.hero-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4A505A;
}

.hero-dots button[aria-pressed="true"] span {
    background: var(--accent);
}


/* Perfil */
.account-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
}

.user-avatar {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ground);
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
}

.user-avatar.is-large {
    width: 88px;
    height: 88px;
    font-size: 44px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Va al fondo de la pantalla; si el perfil es más largo, queda después del contenido. */
.profile-version {
    margin: auto 0 0;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 20px;
    background: var(--card);
}

.profile-identity {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-photo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-photo-actions .add-set {
    position: relative;
    cursor: pointer;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Términos, privacidad y la pantalla para aceptarlos. */
.legal-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 32px;
    line-height: 1.55;
}

.legal-page > .mud-button-root:first-child {
    align-self: flex-start;
}

.legal-page h1 {
    font-size: 1.6rem;
    margin: 4px 0 0;
}

.legal-page h2 {
    font-size: 1.1rem;
    margin: 16px 0 0;
}

.legal-page ul {
    margin: 0;
    padding-left: 20px;
}

.legal-page li + li {
    margin-top: 6px;
}

.legal-page a,
.legal-note a {
    color: var(--mud-palette-primary);
}

.consent-prompt {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
}

.legal-note {
    margin: 12px 0 0;
}

/* Crédito de la licencia de los textos de wger, debajo de la descripción del ejercicio. */
.text-credit {
    font-size: 0.8rem;
    margin-top: 4px;
}

.text-credit a {
    color: inherit;
    text-decoration: underline;
}

