/* The Gym (GymScreen, GymScene): stations, sessions and the peek-in scenes */

.is-speed { --gym: #3fd0ff; --gym-rgb: 63, 208, 255; }
.is-health { --gym: #ff6b8a; --gym-rgb: 255, 107, 138; }
.is-signal { --gym: #a77bff; --gym-rgb: 167, 123, 255; }

.gym-screen {
    padding-top: 18px;
    padding-bottom: 32px;
}

.gym-title {
    margin: 0;
    font-family: var(--sc-font-display);
    font-size: 26px;
    font-weight: 700;
}

.gym-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-right: 44px;
    margin-bottom: 14px;
}

.gym-header .sc-coins {
    flex: none;
    margin-top: 6px;
}

/* ---------- Stations ---------- */
.gym-stations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gym-station {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(var(--gym-rgb), 0.4);
    border-radius: var(--sc-radius);
    background:
        radial-gradient(circle at 10% 50%, rgba(var(--gym-rgb), 0.22), transparent 60%),
        rgba(255, 255, 255, 0.04);
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease;
    animation: mm-rise-in 0.4s calc(var(--i) * 0.07s) cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.gym-station:hover {
    transform: translateY(-1px);
    border-color: var(--gym);
}

.gym-station:active {
    transform: scale(0.98);
}

.gym-station-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(var(--gym-rgb), 0.16);
    box-shadow: inset 0 0 0 1px rgba(var(--gym-rgb), 0.45);
    color: var(--gym);
    font-size: 24px;
}

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

.gym-station-text strong {
    font-size: 16px;
}

.gym-station-text small {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.gym-price {
    flex: none;
    font-size: 13px;
    font-weight: 800;
}

.gym-price.is-free {
    padding: 4px 10px;
    border-radius: var(--sc-radius-pill);
    background: var(--sc-gradient-success);
    color: #052014;
    letter-spacing: 0.06em;
    box-shadow: 0 0 12px rgba(61, 220, 132, 0.45);
    animation: gym-free-glow 2.2s ease-in-out infinite;
}

@keyframes gym-free-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(61, 220, 132, 0.3); }
    50% { box-shadow: 0 0 16px rgba(61, 220, 132, 0.65); }
}

.gym-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.gym-count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--sc-radius-pill);
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
}

.gym-empty {
    padding: 24px 12px;
}

/* ---------- Sessions ---------- */
.gym-session {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--sc-line-strong);
    border-radius: var(--sc-radius);
    background: rgba(255, 255, 255, 0.04);
    animation: mm-rise-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.gym-session.is-done {
    border-color: rgba(var(--gym-rgb), 0.6);
    box-shadow: 0 0 18px -6px var(--gym);
}

.gym-session-window {
    position: relative;
    flex: none;
    width: 110px;
    height: 110px;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: none;
    cursor: pointer;
}

.gym-peek-label {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: var(--sc-radius-pill);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.gym-session-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.gym-session-body small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gym);
    font-size: 12px;
    font-weight: 700;
}

.gym-progress {
    height: 6px;
    margin-top: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.gym-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(var(--gym-rgb), 0.6), var(--gym));
    box-shadow: 0 0 8px var(--gym);
    transition: width 1s linear;
}

.gym-commentary {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-style: italic;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gym-session-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
}

.gym-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.gym-boost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gym-boost:disabled,
.gym-confirm .mm-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gym-collect {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-color: var(--gym);
    background: var(--gym);
    animation: gym-collect-pulse 1.4s ease-in-out infinite;
}

@keyframes gym-collect-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--gym-rgb), 0.5); }
    50% { box-shadow: 0 0 0 7px rgba(var(--gym-rgb), 0); }
}

/* ---------- Picker ---------- */
.gym-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 10px;
    padding: 4px 10px 4px 4px;
    border: none;
    border-radius: var(--sc-radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.gym-picker-header {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-right: 40px;
}

.gym-roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 8px;
    padding-bottom: 96px;
}

.gym-roster-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px 8px;
    border: 1px solid var(--sc-line-strong);
    border-radius: var(--sc-radius);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
    animation: mm-rise-in 0.35s calc(var(--i) * 0.04s) cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.gym-roster-tile img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4));
}

.gym-roster-tile.is-selected {
    border-color: var(--gym);
    background: rgba(var(--gym-rgb), 0.14);
    box-shadow: 0 0 16px -4px var(--gym);
    transform: translateY(-2px);
}

.gym-roster-tile.is-blocked {
    cursor: not-allowed;
    opacity: 0.5;
}

.gym-roster-name {
    font-weight: 800;
    font-size: 13px;
}

.gym-roster-stat {
    color: var(--gym);
    font-size: 11px;
    font-weight: 700;
}

.gym-roster-pips {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.gym-roster-pips span {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.14);
}

.gym-roster-pips span.is-on {
    background: var(--gym);
    box-shadow: 0 0 4px var(--gym);
}

.gym-roster-blocker {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    text-align: center;
}

.gym-confirm {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -16px -32px;
    padding: 12px 16px calc(12px + var(--sc-safe-bottom, 0px));
    border-top: 1px solid var(--sc-line-strong);
    background: rgba(11, 13, 18, 0.92);
    backdrop-filter: blur(10px);
}

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

.gym-confirm-text small {
    color: rgba(255, 255, 255, 0.65);
}

.gym-confirm.is-ready .gym-confirm-text small {
    color: var(--gym);
    font-weight: 700;
}

.gym-confirm .mm-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-color: var(--gym);
    background: var(--gym);
}

/* ---------- Peek ---------- */
.gym-peek {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gym-peek .gym-back {
    align-self: flex-start;
}

.gym-peek-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.gym-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4d;
    box-shadow: 0 0 8px #ff4d4d;
    animation: gym-live 1.2s ease-in-out infinite;
}

.gym-peek-live.is-over .gym-live-dot {
    background: var(--sc-success);
    box-shadow: 0 0 8px var(--sc-success);
    animation: none;
}

@keyframes gym-live {
    50% { opacity: 0.25; }
}

.gym-peek-window {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--sc-radius-lg);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(var(--gym-rgb), 0.45), 0 18px 40px -12px rgba(var(--gym-rgb), 0.45);
}

.gym-peek-name {
    margin-top: 14px;
}

.gym-peek-commentary {
    min-height: 1.4em;
    margin: 2px 0 12px;
    color: var(--gym);
    font-weight: 700;
    animation: mm-fade 0.4s ease both;
}

.gym-peek-clock {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background:
        radial-gradient(closest-side, #12151d 82%, transparent 83%),
        conic-gradient(var(--gym) calc(var(--p) * 1%), rgba(255, 255, 255, 0.1) 0);
    transition: background 1s linear;
}

.gym-peek-time {
    font-family: var(--sc-font-display);
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gym-peek-clock small {
    color: var(--gym);
    font-weight: 800;
}

.gym-peek-actions {
    justify-content: center;
    margin: 16px 0 8px;
}

/* ---------- Reward ---------- */
.gym-reward {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100%;
    text-align: center;
}

.gym-reward-sprite {
    position: relative;
    z-index: 1;
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 22px rgba(var(--gym-rgb), 0.6));
    animation: gym-reward-hop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.gym-reward-gain {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--sc-radius-pill);
    background: rgba(var(--gym-rgb), 0.18);
    box-shadow: inset 0 0 0 1px var(--gym), 0 0 24px -4px var(--gym);
    color: var(--gym);
    font-family: var(--sc-font-display);
    font-size: 30px;
    font-weight: 700;
    animation: mm-pop 0.5s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.gym-reward-gain.is-none {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px var(--sc-line-strong);
    background: rgba(255, 255, 255, 0.06);
}

.gym-reward-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    margin-top: -60px;
}

.gym-reward-burst span {
    position: absolute;
    width: 6px;
    height: 26px;
    margin: -13px -3px;
    border-radius: 3px;
    background: var(--gym);
    transform: rotate(var(--a)) translateY(-40px) scaleY(0);
    animation: gym-ray 1.1s calc(var(--i) * 0.02s) ease-out both;
}

@keyframes gym-ray {
    40% { transform: rotate(var(--a)) translateY(-90px) scaleY(1); opacity: 1; }
    100% { transform: rotate(var(--a)) translateY(-130px) scaleY(0.2); opacity: 0; }
}

@keyframes gym-reward-hop {
    0% { transform: translateY(40px) scale(0.6); opacity: 0; }
    60% { transform: translateY(-14px) scale(1.06); opacity: 1; }
    100% { transform: none; }
}

.gym-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + var(--sc-safe-bottom, 0px));
    z-index: 30;
    max-width: min(90vw, 400px);
    padding: 10px 16px;
    border-radius: var(--sc-radius-pill);
    background: rgba(20, 22, 30, 0.95);
    box-shadow: inset 0 0 0 1px var(--sc-line-strong), var(--sc-shadow);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transform: translateX(-50%);
    animation: mm-fade 0.25s ease both;
}

/* =================== Scenes (GymScene) =================== */
.gym-scene {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    color: var(--gym);
    isolation: isolate;
    container-type: inline-size;
}

.gym-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(var(--gym-rgb), 0.28), transparent 65%),
        linear-gradient(180deg, #161b2b 0%, #0d1019 100%);
}

/* The Skanimal itself, centred over its equipment */
.gym-actor {
    position: absolute;
    left: 50%;
    bottom: 18%;
    width: 46%;
    aspect-ratio: 1;
    transform: translateX(-50%);
}

.gym-sprite {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.gym-shadow {
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: -4%;
    height: 8%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    filter: blur(2px);
}

/* ----- Speed: the Sprint Track ----- */
.gym-scene.is-speed .gym-sprite {
    animation: gym-run 0.32s ease-in-out infinite alternate;
    transform-origin: 50% 100%;
}

@keyframes gym-run {
    from { transform: translateY(0) rotate(-6deg) scaleY(0.97); }
    to { transform: translateY(-9%) rotate(-10deg) scaleY(1.02); }
}

.gym-scene.is-speed .gym-shadow {
    animation: gym-run-shadow 0.32s ease-in-out infinite alternate;
}

@keyframes gym-run-shadow {
    to { transform: scaleX(0.8); opacity: 0.6; }
}

.gym-treadmill {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 12%;
    height: 7%;
    border-radius: 999px;
    overflow: hidden;
    background: #232a3b;
    box-shadow: inset 0 0 0 2px rgba(var(--gym-rgb), 0.5), 0 0 14px -4px var(--gym);
}

.gym-belt {
    position: absolute;
    inset: 0 -40px 0 0;
    background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(var(--gym-rgb), 0.55) 14px 18px);
    animation: gym-belt 0.35s linear infinite;
}

@keyframes gym-belt {
    to { transform: translateX(-18px); }
}

.gym-speedlines span {
    position: absolute;
    left: 100%;
    top: calc(22% + var(--i) * 9%);
    width: calc(18% + var(--i) % 3 * 8%);
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7));
    animation: gym-whoosh calc(0.55s + var(--i) % 3 * 0.15s) calc(var(--i) * -0.17s) linear infinite;
}

@keyframes gym-whoosh {
    to { left: -40%; }
}

.gym-dust span {
    position: absolute;
    left: 36%;
    bottom: 17%;
    width: 8%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    animation: gym-dust 0.6s calc(var(--i) * 0.2s) ease-out infinite;
}

@keyframes gym-dust {
    from { transform: translate(0, 0) scale(0.4); opacity: 0.8; }
    to { transform: translate(-220%, -60%) scale(1.4); opacity: 0; }
}

.gym-gauge {
    position: absolute;
    top: 6%;
    right: 5%;
    width: 24%;
}

.gym-gauge-needle {
    transform-box: view-box;
    transform-origin: 30px 32px;
    animation: gym-needle 1.2s ease-in-out infinite alternate;
}

@keyframes gym-needle {
    from { transform: rotate(-55deg); }
    to { transform: rotate(65deg); }
}

/* ----- Health: the Iron Pit ----- */
.gym-scene.is-health .gym-actor {
    bottom: 14%;
}

.gym-scene.is-health .gym-sprite {
    transform-origin: 50% 100%;
    animation: gym-lift-body 1.6s ease-in-out infinite;
}

@keyframes gym-lift-body {
    0%, 100% { transform: scale(1.06, 0.9); }
    45%, 60% { transform: scale(0.97, 1.04); }
}

.gym-barbell {
    position: absolute;
    left: -32%;
    z-index: 3;
    width: 164%;
    top: 0;
    color: var(--gym);
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
    animation: gym-lift-bar 1.6s ease-in-out infinite;
}

@keyframes gym-lift-bar {
    0%, 100% { transform: translateY(42%) rotate(-2deg); }
    45%, 60% { transform: translateY(-38%) rotate(1deg); }
}

.gym-sweat {
    position: absolute;
    z-index: 3;
    top: 22%;
    left: calc(16% + var(--i) * 62%);
    width: 6%;
    aspect-ratio: 0.7;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: #9fe3ff;
    opacity: 0;
    animation: gym-sweat 1.6s calc(var(--i) * 0.8s) ease-in infinite;
}

@keyframes gym-sweat {
    0%, 40% { opacity: 0; transform: translate(0, 0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc((var(--i) * 2 - 1) * 120%), 260%); }
}

.gym-mat {
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 9%;
    height: 7%;
    border-radius: 6px;
    background: linear-gradient(180deg, #2a2f40, #1a1e2b);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(var(--gym-rgb), 0.35);
}

.gym-heart {
    position: absolute;
    top: 7%;
    right: 7%;
    color: var(--gym);
    font-size: clamp(16px, 9cqw, 34px);
    filter: drop-shadow(0 0 6px var(--gym));
    animation: gym-heartbeat 0.8s ease-in-out infinite;
}

@keyframes gym-heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
}

/* ----- Signal: the Signal Tower ----- */
.gym-tower {
    position: absolute;
    left: 8%;
    bottom: 10%;
    height: 72%;
    filter: drop-shadow(0 0 6px rgba(var(--gym-rgb), 0.5));
}

.gym-tower-light {
    animation: gym-live 1s ease-in-out infinite;
}

.gym-waves span {
    position: absolute;
    left: calc(8% + 2.6%);
    top: calc(18% + 2%);
    width: 30%;
    aspect-ratio: 1;
    margin: -15% 0 0 -12%;
    border: 2px solid var(--gym);
    border-radius: 50%;
    opacity: 0;
    animation: gym-wave 2.4s calc(var(--i) * 0.8s) ease-out infinite;
}

@keyframes gym-wave {
    0% { transform: scale(0.2); opacity: 0.9; }
    100% { transform: scale(3.2); opacity: 0; }
}

.gym-aura {
    position: absolute;
    left: 50%;
    bottom: 22%;
    width: 52%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--gym-rgb), 0.55), transparent 65%);
    transform: translateX(-50%);
    animation: gym-aura 2.2s ease-in-out infinite;
}

@keyframes gym-aura {
    0%, 100% { transform: translateX(-50%) scale(0.85); opacity: 0.6; }
    50% { transform: translateX(-50%) scale(1.12); opacity: 1; }
}

.gym-scene.is-signal .gym-actor {
    bottom: 24%;
    left: 56%;
}

.gym-scene.is-signal .gym-sprite {
    animation: gym-float 2.2s ease-in-out infinite;
}

@keyframes gym-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10%) rotate(2deg); }
}

.gym-scene.is-signal .gym-shadow {
    bottom: -18%;
    animation: gym-float-shadow 2.2s ease-in-out infinite;
}

@keyframes gym-float-shadow {
    50% { transform: scaleX(0.7); opacity: 0.4; }
}

.gym-eq {
    position: absolute;
    left: 30%;
    right: 12%;
    bottom: 8%;
    display: flex;
    align-items: flex-end;
    gap: 4%;
    height: 12%;
}

.gym-eq span {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(0deg, rgba(var(--gym-rgb), 0.4), var(--gym));
    transform-origin: bottom;
    animation: gym-eq calc(0.5s + var(--i) % 4 * 0.13s) calc(var(--i) * -0.11s) ease-in-out infinite alternate;
}

@keyframes gym-eq {
    from { transform: scaleY(0.15); }
    to { transform: scaleY(1); }
}

/* ----- Done: everything winds down and the Skanimal celebrates ----- */
.gym-scene.is-done .gym-sprite {
    animation: gym-cheer 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
}

.gym-scene.is-done .gym-barbell {
    animation: none;
    transform: translateY(150%) rotate(4deg);
    transition: transform 0.6s ease-in;
}

.gym-scene.is-done .gym-belt,
.gym-scene.is-done .gym-speedlines,
.gym-scene.is-done .gym-dust,
.gym-scene.is-done .gym-sweat,
.gym-scene.is-done .gym-waves {
    display: none;
}

@keyframes gym-cheer {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-14%) scale(1.04); }
}

.gym-done-burst {
    position: absolute;
    left: 50%;
    top: 42%;
}

.gym-done-burst span {
    position: absolute;
    width: 4px;
    height: 12px;
    margin: -6px -2px;
    border-radius: 2px;
    background: var(--sc-gold);
    animation: gym-done-ray 1.8s ease-out infinite;
}

@keyframes gym-done-ray {
    0% { transform: rotate(var(--a)) translateY(-20px) scaleY(0.2); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: rotate(var(--a)) translateY(-70px) scaleY(1); opacity: 0; }
}

/* Small windows in the list keep the motion but lose the clutter */
.gym-scene.is-compact .gym-gauge,
.gym-scene.is-compact .gym-heart,
.gym-scene.is-compact .gym-eq {
    display: none;
}

.gym-scene.is-compact .gym-actor {
    width: 58%;
}

.gym-scene.is-compact .gym-done-burst span {
    animation-name: gym-done-ray-small;
}

@keyframes gym-done-ray-small {
    0% { transform: rotate(var(--a)) translateY(-12px) scaleY(0.2); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: rotate(var(--a)) translateY(-40px) scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .gym-scene *,
    .gym-scene *::before,
    .gym-scene *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
