/* Exercise player (js/content/exercise-*.js). Every class starts with "exercise-" so nothing collides. */
.exercise-root { position: relative; height: 100%; display: flex; flex-direction: column; background: #0f1b2d; color: #fff; overflow: hidden; -webkit-user-select: none; user-select: none; }
.exercise-back { position: absolute; top: 10px; left: 8px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; cursor: pointer; }
.exercise-back:active { background: rgba(255, 255, 255, .24); }
.exercise-back svg { display: block; }

/* loading */
.exercise-loading { background: linear-gradient(#17304f, #0f1b2d); }
.exercise-loading-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 28px 60px; text-align: center; }
.exercise-mascot { position: relative; display: grid; justify-items: center; padding-bottom: 14px; }
.exercise-mascot-art svg { display: block; animation: exercise-bob 1.1s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); transform-origin: 50% 100%; }
.exercise-mascot-shadow { width: 84px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .32); margin-top: 6px; animation: exercise-shadow 1.1s ease-in-out infinite; }
.exercise-loading-title { margin: 14px 0 0; font-size: 26px; font-weight: 800; }
.exercise-loading-line { margin: 0; font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, .82); word-break: keep-all; }
.exercise-loading-dots { display: flex; gap: 8px; margin-top: 18px; }
.exercise-loading-dots i { width: 10px; height: 10px; border-radius: 50%; background: #7fb0ff; opacity: .35; animation: exercise-dot 1.2s ease-in-out infinite; }
.exercise-loading-dots i:nth-child(2) { animation-delay: .2s; }
.exercise-loading-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes exercise-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes exercise-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.7); opacity: .6; } }
@keyframes exercise-dot { 0%, 100% { opacity: .3; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }

/* player */
.exercise-head { flex: none; height: 64px; display: flex; align-items: center; justify-content: center; padding: 0 60px; }
.exercise-title { font-size: 16px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exercise-stage { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.exercise-card { width: 100%; max-height: 100%; border-radius: 18px; overflow: hidden; background: #e4f2f7; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
.exercise-figure { display: block; width: 100%; height: 100%; }
.exercise-card canvas { display: block; width: 100%; height: 100%; }
.exercise-caption { flex: none; min-height: 112px; padding: 14px 20px 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.exercise-stepno { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(127, 176, 255, .22); color: #bcd6ff; }
.exercise-caption-lines { display: grid; align-self: stretch; }
.exercise-caption-lines > p { grid-area: 1 / 1; align-self: start; margin: 0; font-size: 20px; line-height: 1.45; font-weight: 700; word-break: keep-all; }
.exercise-caption-size { visibility: hidden; }
.exercise-text-in { animation: exercise-text-in .35s ease-out; }
@keyframes exercise-text-in { from { opacity: 0; } to { opacity: 1; } }
.exercise-bar { flex: none; padding: 4px 20px 0; }
.exercise-seek { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; margin: 10px 0; border-radius: 3px; outline: none; cursor: pointer; --p: 0%; background: linear-gradient(to right, #7fb0ff var(--p), rgba(255, 255, 255, .26) var(--p)); }
.exercise-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.exercise-seek::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; }
.exercise-seek:focus-visible { box-shadow: 0 0 0 3px rgba(127, 176, 255, .6); }
.exercise-times { display: flex; justify-content: space-between; font-size: 13px; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.exercise-controls { flex: none; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 10px 0 26px; }
.exercise-seekbtn { display: grid; justify-items: center; gap: 2px; width: 72px; border: 0; background: none; color: rgba(255, 255, 255, .85); cursor: pointer; padding: 4px 0; }
.exercise-seekbtn svg { display: block; }
.exercise-seekbtn small { font-size: 14px; font-weight: 700; }
.exercise-playbtn { width: 72px; height: 72px; border: 0; border-radius: 50%; background: #2b61c1; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(43, 97, 193, .55); }
.exercise-playbtn:active, .exercise-seekbtn:active { transform: scale(.95); }
@media (prefers-reduced-motion: reduce) { .exercise-mascot-art svg, .exercise-mascot-shadow, .exercise-loading-dots i, .exercise-text-in { animation: none; } }
