.studio-motion{max-width:60rem}
.studio-motion [hidden]{display:none!important}
.studio-motion .motion-switch,.studio-motion .motion-nav{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.studio-motion .motion-switch,.studio-motion .motion-nav{margin:.7rem 0}
.studio-motion button{background:#fffdf8;color:#254f45;border:1px solid #9aafa6;border-radius:.5rem;font:inherit;font-weight:600;padding:.55rem .85rem;min-height:44px;cursor:pointer}
.studio-motion button[aria-pressed="true"],.studio-motion #motionPlay{background:#305548;border-color:#305548;color:#fff}
.studio-motion button[aria-pressed="true"]{box-shadow:inset 0 0 0 2px #305548,inset 0 0 0 3px #fff}
.studio-motion button:focus-visible,.studio-motion summary:focus-visible,.studio-motion input:focus-visible{outline:3px solid #995e37;outline-offset:3px}
.studio-motion .motion-position{margin:1.1rem 0}
.studio-motion .motion-position>span{font-weight:600}
.studio-motion .motion-lesson{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-items:center;padding:1rem 0}
.studio-motion .motion-lesson h3{margin:.25rem 0 .7rem;color:#244a3f;font-size:clamp(1.35rem,2.9vw,1.8rem);line-height:1.2}
.studio-motion .motion-progress{margin:0;font-size:.92rem;color:#49645a;font-weight:650}
.studio-motion .motion-instructions ol{margin:.5rem 0;padding-left:1.4rem}
.studio-motion .motion-instructions li+li{margin-top:.4rem}
.studio-motion .motion-player{container-type:inline-size;overflow:hidden;background:#fcfbf7;border:1px solid #c3cec3;border-radius:1rem}
.studio-motion canvas{display:block;width:100%;height:auto;max-height:16rem;object-fit:contain}
.studio-motion .motion-credit{margin:.5rem 0;color:#455a50;font-size:.875rem}
.studio-motion .motion-care{font-size:.97rem;color:#455a50}
.studio-motion .motion-sources summary{cursor:pointer;font-weight:600;color:#315a4c}
.studio-motion .motion-sources ul{padding-left:1.3rem}
@media(min-width:48rem){.studio-motion .motion-lesson{grid-template-columns:minmax(15rem,.95fr) minmax(17rem,1.05fr);gap:2rem}}

.studio-motion .motion-picker{display:grid;gap:.35rem;margin:.85rem 0 1.15rem;max-width:28rem}
.studio-motion .motion-picker label{color:#254e42;font-weight:700}
.studio-motion .motion-picker select{width:100%;min-height:48px;padding:.55rem .8rem;background-color:#f8faf3;border:1px solid #849e8e;border-radius:.55rem;color:#254e42;font:inherit;font-weight:600;cursor:pointer}
.studio-motion .motion-picker select:focus-visible{outline:3px solid #995e37;outline-offset:3px}

.studio-motion .motion-picker a{justify-self:start;min-height:38px;display:inline-flex;align-items:center;text-underline-offset:.18em;color:#31584b;font-weight:600}
.studio-motion .motion-view{margin:0;padding:.65rem .85rem;border-bottom:1px solid #c8d1c4;background:#e7eee3;color:#294d42;font-size:.94rem;line-height:1.3;font-weight:650}
.studio-motion canvas{max-height:none}

.studio-motion .motion-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

.studio-motion .motion-music {
  margin:1.25rem 0; padding:.9rem 1rem 1rem; background:#edf3ed;
  border:1px solid #b6cabd; border-radius:.8rem; color:#274c40;
}
.studio-motion .motion-music h3 { margin:0 0 .6rem; font-family:inherit; font-size:1.14rem; font-weight:650; line-height:1.35; }
.studio-motion .motion-music-controls { display:grid; grid-template-columns:minmax(0,1.9fr) auto minmax(7.5rem,1fr); align-items:end; gap:.65rem 1rem; }
.studio-motion .motion-music label { display:block; font-weight:600; font-size:.94rem; }
.studio-motion .motion-music select { width:100%; min-height:44px; margin-top:.25rem; padding:.4rem .6rem; background-color:#fffefb; color:#23473d; border:1px solid #829b90; border-radius:.45rem; font:inherit; }
.studio-motion .motion-music select:focus-visible { outline:3px solid #995e37; outline-offset:3px; }
.studio-motion #motionMusicToggle { background:#345749; color:white; border-color:#345749; }
.studio-motion .motion-music-volume label { display:flex; align-items:baseline; justify-content:space-between; gap:.3rem; }
.studio-motion #motionMusicLevel { font-weight:400; font-size:.9rem; }
.studio-motion .motion-music-volume input { display:block; width:100%; min-height:44px; margin:.25rem 0 0; accent-color:#345749; }
.studio-motion #motionMusicStatus { font-size:.94rem; margin:.55rem 0 0; }
.studio-motion #motionMusicStatus:empty { margin:0; }
@media(max-width:42rem) {
  .studio-motion .motion-music-controls { grid-template-columns:auto minmax(0,1fr); }
  .studio-motion .motion-music-controls>div:first-child { grid-column:1/-1; }
  .studio-motion #motionMusicToggle { align-self:center; }
}

.studio-motion .motion-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 54rem;
  column-gap: 1rem;
}
.studio-motion .motion-picker label { display: block; margin-bottom: .3rem; }
.studio-motion .motion-picker a { grid-column: 1 / -1; }
.studio-motion #motionTimeline {
  display: block; appearance: none; width: 100%; height: .28rem;
  border: 0; background: #d7dfd1; color: #356453;
}
.studio-motion #motionTimeline::-webkit-progress-bar { background: #d7dfd1; }
.studio-motion #motionTimeline::-webkit-progress-value { background: #356453; }
.studio-motion #motionTimeline::-moz-progress-bar { background: #356453; }
@media (max-width: 47.99rem) {
  .studio-motion .motion-lesson { display: flex; flex-direction: column; align-items: stretch; gap: .65rem; }
  .studio-motion .motion-instructions { display: contents; }
  .studio-motion .motion-progress, .studio-motion .motion-lesson h3 { order: 0; margin: 0; }
  .studio-motion .motion-player { order: 1; }
  .studio-motion .motion-instructions ol { order: 2; }
}
@media (max-width: 34rem) {
  .studio-motion .motion-picker { grid-template-columns: 1fr; gap: .6rem; }
}

/* Playback, pose inspection and optional settings share one compact footer. */
.studio-motion .motion-caption { padding: .45rem .95rem .8rem; }
.studio-motion .motion-pose-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.studio-motion #smFrameLabel { color: #4c6759; font-size: .9rem; font-weight: 650; }
.studio-motion #smCue { color: #263f36; font-size: 1.04rem; line-height: 1.45; margin: .15rem 0 0; }
.studio-motion .motion-frames { display: inline-flex; gap: 2px; }
.studio-motion .motion-player button { margin: 0; line-height: 1.25; box-sizing: border-box; }
.studio-motion .motion-frames button {
  display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0;
  background: transparent; border: 0; color: #345e50; border-radius: 50%;
}
.studio-motion .motion-frames button:disabled { opacity: 1; color: #9ea99f; cursor: default; }
.studio-motion .motion-player svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linejoin: round; stroke-linecap: round; stroke-width: 1.7; flex: none; }
.studio-motion .motion-controls {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: stretch; gap: .45rem; padding: 0 .9rem .85rem;
}
.studio-motion .motion-controls button {
  display: inline-flex; align-items: center; justify-content: center; gap: .42rem;
  min-height: 46px; padding: .5rem .45rem; border-radius: 2rem; font-size: .94rem; font-weight: 650;
}
.studio-motion #motionPlay { background: #284e41; border: 1px solid #284e41; color: #fff; }
.studio-motion #motionPlay::before {
  content: ''; width: .8rem; height: .8rem; flex: none; background: currentColor;
  clip-path: polygon(12% 0, 98% 50%, 12% 100%);
}
.studio-motion #motionPlay[data-playing="true"]::before {
  clip-path: polygon(5% 0, 36% 0, 36% 100%, 5% 100%, 5% 0, 64% 0, 95% 0, 95% 100%, 64% 100%, 64% 0);
}
.studio-motion #motionReplay { background: #edf2e9; border: 1px solid #d4dfd1; color: #315647; }
.studio-motion .motion-settings { border-top: 1px solid #d9e1d5; background: #f5f7f0; padding-inline: .95rem; }
.studio-motion .motion-settings summary {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  list-style: none; min-height: 44px; padding: .4rem 0; color: #466153; font-weight: 550; font-size: .9rem; cursor: pointer;
}
.studio-motion .motion-settings summary::-webkit-details-marker { display: none; }
.studio-motion .motion-settings summary::after {
  content: ''; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg); margin-right: .3rem;
}
.studio-motion .motion-settings[open] summary::after { transform: rotate(225deg); }
.studio-motion .motion-settings-fields { display: grid; min-width: 0; padding: .15rem 0 .8rem; gap: .3rem; }
.studio-motion .motion-settings-fields label { color: #496253; font-size: .875rem; font-weight: 600; }
.studio-motion .motion-mode-field { position: relative; }
.studio-motion .motion-mode-field::after {
  content: ''; position: absolute; right: .95rem; top: calc(50% - .35rem); pointer-events: none;
  width: .45rem; height: .45rem; border: solid #476453; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.studio-motion #motionMode {
  appearance: none; margin: 0; box-sizing: border-box; width: 100%; min-height: 44px; border-radius: .6rem;
  border: 1px solid #9bae9d; background: #fffefa; padding: .45rem 2.1rem .45rem .7rem; color: #284b3e; font: inherit;
}
.studio-motion #smSlow {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  border: 0; border-radius: .4rem; background: transparent; color: #345446;
  padding: .25rem 0; font-size: .94rem; box-shadow: none; min-height: 44px;
}
.studio-motion #smSlow::after {
  content: ''; flex: none; box-sizing: border-box; width: 2.35rem; height: 1.4rem;
  border-radius: 1rem; border: 1px solid #879a89;
  background: radial-gradient(circle at .65rem 50%, #fff 0 .42rem, transparent .46rem), #718676;
}
.studio-motion #smSlow[aria-pressed="true"]::after {
  background: radial-gradient(circle at calc(100% - .65rem) 50%, white 0 .42rem, transparent .46rem), #315a48;
  border-color: #315a48;
}
.studio-motion .motion-settings summary:focus-visible, .studio-motion #motionMode:focus-visible,
.studio-motion #smSlow:focus-visible { outline: 3px solid #995e37; outline-offset: 2px; }
@container (max-width: 23rem) {
  /* Keep the playback scope in each button's accessible name on narrow players. */
  .motion-controls .motion-action-scope {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (hover: hover) {
  .studio-motion .motion-frames button:enabled:hover { background: #e8efe4; }
  .studio-motion #motionPlay:hover { background: #1f4035; }
  .studio-motion #motionReplay:hover { background: #e1eadc; }
  .studio-motion .motion-settings summary:hover { color: #233f32; }
}
@media (forced-colors: active) {
  .studio-motion #motionPlay::before { background: ButtonText; }
  .studio-motion #motionMode { appearance: auto; }
  .studio-motion .motion-mode-field::after { display: none; }
  .studio-motion #smSlow::after { content: 'Off'; width: auto; height: auto; padding: .15rem .55rem; }
  .studio-motion #smSlow[aria-pressed="true"]::after { content: 'On'; }
}
