
:root {
    --bg: #eef7fb;
    --card: #ffffff;
    --text: #2f3b46;
    --muted: #6b7d8a;
    --line: #d8e8f0;
    --primary: #4f8fb3;
    --primary-hover: #3f7c9e;
    --accent: #d9eef8;
    --green: #72b394;
    --amber: #d7b96a;
    --red: #d07a7a;
    --shadow: 0 10px 30px rgba(41, 88, 117, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #f9fdff 0%, #eef7fb 100%);
    color: var(--text);
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    width: 100%;
    max-width: 760px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.86rem;
    color: var(--muted);
    background: #e8f4fa;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 18px;
}

h1, h2 {
    margin: 0 0 14px 0;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.6rem;
}

p {
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 14px 0;
}

.muted {
    color: var(--muted);
}

.sem-card-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.sem-item {
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: #f8fcff;
}

.sem-item strong {
    display: block;
    margin-bottom: 4px;
}

.green strong { color: var(--green); }
.amber strong { color: var(--amber); }
.red strong { color: var(--red); }

.actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.btn {
    appearance: none;
    border: none;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #e8f4fa;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    background: #dceef8;
}

.field {
    margin-top: 22px;
}

.field label.label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

textarea,
input[type="text"],
input[type="number"] {
    width: 100%;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    border-color: #8ec3dd;
    box-shadow: 0 0 0 4px rgba(79, 143, 179, 0.16);
}

textarea:focus,
input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 143, 179, 0.15);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.options {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8fcff;
}

.option input {
    margin-top: 3px;
}

.option label {
    cursor: pointer;
    line-height: 1.5;
    width: 100%;
}

.breathing-box {
    margin: 24px 0 10px;
    padding: 28px 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: radial-gradient(circle at top, #f7fcff, #e4f3fa);
    text-align: center;
}

.breathing-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #b9dff0;
    animation: respirar 6s ease-in-out infinite;
}

@keyframes respirar {
    0%   { transform: scale(0.88); opacity: 0.85; }
    50%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(0.88); opacity: 0.85; }
}

.helper {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 8px;
}

.progress {
    height: 8px;
    background: #d8eaf4;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
}

@media (max-width: 640px) {
    .card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

.audio-play-btn {
    width: 100%;
    margin-top: 18px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #eaf7fd 0%, #dceef8 100%);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(60, 110, 140, 0.08);
    transition: 0.2s ease;
}

.audio-play-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #f1fbff 0%, #d8edf8 100%);
}

.audio-play-btn.playing {
    color: #2f7896;
    background: #e5f4fb;
}

.audio-play-btn.finished {
    color: #2f7d6d;
    background: #e7f6f2;
}

.lista-ejercicios,
.sesiones-lista {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
}

.sesion-card {
    border: 1px solid #d7eaf2;
    border-radius: 22px;
    background: #f7fcff;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(48, 101, 128, 0.07);
}

.sesion-card summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 22px;
    font-weight: 700;
    color: var(--text);
    background: #dceef8;
    border-bottom: 1px solid #d7eaf2;
}

.sesion-card summary::-webkit-details-marker {
    display: none;
}

.sesion-card summary::after {
    content: "⌄";
    float: right;
    color: #6f8f9d;
    transition: transform 0.2s ease;
}

.sesion-card[open] summary::after {
    transform: rotate(180deg);
}

.item-ejercicio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 14px 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #d7eaf2;
    background: #ffffff;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.item-ejercicio:hover {
    background: #f0f9fd;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(48, 101, 128, 0.08);
}

.ejercicio-info {
    min-width: 0;
}

.titulo {
    font-weight: 650;
    font-size: 1rem;
    line-height: 1.35;
}

.estado {
    flex-shrink: 0;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.estado.completado {
    color: #2f7d6d;
    background: #e7f6f2;
}

.estado.en_progreso {
    color: #2f7896;
    background: #e5f4fb;
}

.estado.pendiente {
    color: #4f8fb3;
    background: #e8f4fa;
}

.audio-card,
.breathing-audio-card {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fcff 0%, #eef8fd 100%);
    box-shadow: 0 6px 18px rgba(60, 110, 140, 0.05);
}

.breathing-audio-card {
    background: linear-gradient(180deg, #f7fcff 0%, #e5f4fb 100%);
}

.audio-play-btn {
    width: 100%;
    margin-top: 12px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #eaf7fd 0%, #dceef8 100%);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.audio-play-btn.playing {
    color: #2f7896;
    background: #e5f4fb;
}

.audio-play-btn.finished {
    color: #2f7d6d;
    background: #e7f6f2;
}

.refuerzo-card {
    margin-top: 30px;
    text-align: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #f9fcfe;
}

.refuerzo-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
}

.refuerzo-card h2 {
    margin-bottom: 10px;
}

.refuerzo-card p {
    margin-bottom: 8px;
}



@media (max-width: 640px) {
    .lista-ejercicios,
    .sesiones-lista {
        gap: 14px;
    }

    .sesion-card {
        border-radius: 18px;
    }

    .sesion-card summary {
        padding: 16px;
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .item-ejercicio {
        align-items: flex-start;
        flex-direction: column;
        margin: 12px;
        padding: 15px;
    }

    .estado {
        align-self: flex-start;
    }
}