/* The stage measures its own content width. The main preview fits the space
   left by its source, controls and optional comparison at any frame ratio. */
html.graphite63.studio59 #motion-room50 .motion-stage50{
 container:motion-stage64 / inline-size;
 display:flex;flex-direction:column;gap:0;
 padding:14px clamp(16px,1.8vw,30px) clamp(16px,2.5dvh,28px)
}
html.graphite63.studio59 #motion-room50 .motion-stage50>.source56{
 margin:0 0 clamp(10px,1.8dvh,19px)
}
html.graphite63.studio59 #motion-room50 .motion-stage50>.motion-mat57,
html.graphite63.studio59 #motion-room50 .motion-stage50:has(#comparison56:not([hidden]))>.motion-mat57{
 container-type:size;flex:1 0 0;min-height:clamp(146px,20dvh,218px);
 width:100%;max-width:none;aspect-ratio:auto;border-radius:0;background:transparent
}
html.graphite63.studio59 #motion-room50 .motion-stage50>.motion-mat57>.motion-window57{
 width:min(100%,calc(100cqh * var(--motion-frame-ratio64,1.77777778)));
 border-radius:9px;background:var(--room-mat)
}
html.graphite63.studio59 #motion-room50 .transport63{
 margin:clamp(22px,3.6dvh,40px) 0 0;padding:9px 12px;flex:none
}
html.graphite63.studio59 #motion-room50 #comparison56:not([hidden]){
 margin:16px 0 0
}
@container motion-stage64 (min-width:800px){
 html.graphite63.studio59 #motion-room50 .transport63{
  display:flex;align-items:center;gap:clamp(12px,1.5cqw,22px)
 }
 html.graphite63.studio59 #motion-room50 .motion-transport50{
  flex:1;min-width:0;grid-template-columns:auto auto auto minmax(86px,1fr)
 }
 html.graphite63.studio59 #motion-room50 .motion-extra59{
  flex:none;flex-wrap:nowrap;gap:12px
 }
}
/* Keep the artwork and scrubber still as the transport changes state. */
html.graphite63.studio59 #motion-room50 .motion-source-id73,
html.graphite63.studio59 #motion-room50 .motion-source-actions73{
 display:flex;align-items:center;gap:8px;min-width:0
}
html.graphite63.studio59 #motion-room50 .motion-source-id73{flex:1}
html.graphite63.studio59 #motion-room50 #base-thumb56{flex:none}
html.graphite63.studio59 #motion-room50 #motion-single50{min-width:0;margin:0;overflow-wrap:anywhere}
html.graphite63.studio59 #motion-room50 #motion-use-frame71{min-inline-size:10.8em}
html.graphite63.studio59 #motion-room50 #motion-use-frame71:disabled{opacity:.52;cursor:default}
html.graphite63.studio59 #motion-room50 #motion-elapsed50{min-inline-size:10ch}
html.graphite63.studio59 #motion-room50 .motion-extra59{justify-content:flex-start;column-gap:8px}
html.graphite63.studio59 #motion-room50 #compare56{margin-inline-start:auto}
html.graphite63.studio59 #motion-room50 #motion-loop73{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;
 color:var(--room-dim);background:transparent;border:1px solid var(--room-rule)
}
html.graphite63.studio59 #motion-room50 #motion-loop73 svg{width:16px;height:16px;flex:none}
html.graphite63.studio59 #motion-room50 #motion-loop73[aria-pressed=true]{
 color:var(--g-stage);background:#e1e2e5;border-color:#e1e2e5
}
@media(hover:hover){
 html.graphite63.studio59 #motion-room50 #motion-loop73:hover{color:var(--room-ink);border-color:#a7a8ad}
 html.graphite63.studio59 #motion-room50 #motion-loop73[aria-pressed=true]:hover{color:var(--g-stage);background:white}
}
@media(forced-colors:active){
 html.graphite63.studio59 #motion-room50 #motion-loop73[aria-pressed=true]{border:2px solid Highlight}
}
@container motion-stage64 (max-width:530px){
 html.graphite63.studio59 #motion-room50 .motion-source-id73{flex-basis:100%}
}
@container motion-stage64 (max-width:405px){
 html.graphite63.studio59 #motion-room50 .motion-extra59{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px
 }
 html.graphite63.studio59 #motion-room50 #compare56{grid-column:1 / -1;justify-self:stretch;margin:0}
}
/* A full inspector beside the canvas leaves a narrow strip in portrait on
   smaller tablets. Use the existing vertical workspace at this breakpoint. */
@media(min-width:741px) and (max-width:900px) and (orientation:portrait){
 html.graphite63.studio59 #motion-room50[open]{display:flex;flex-direction:column}
 html.graphite63.studio59 #motion-room50 .motion-body50{display:block;flex:1;min-height:0;overflow:auto}
 html.graphite63.studio59 #motion-room50 .motion-stage50,
 html.graphite63.studio59 #motion-room50 .motion-inspect50{overflow:visible}
}
@media(max-width:740px),(max-width:900px) and (orientation:portrait){
 html.graphite63.studio59 #motion-room50 .motion-stage50{
  padding:12px 12px 23px
 }
 html.graphite63.studio59 #motion-room50 .motion-stage50>.motion-mat57,
 html.graphite63.studio59 #motion-room50 .motion-stage50:has(#comparison56:not([hidden]))>.motion-mat57{
  container-type:normal;flex:none;min-height:0;
  width:min(100%,calc(60dvh * var(--motion-frame-ratio64,1.77777778)));
  aspect-ratio:var(--motion-frame-ratio64,1.77777778);
 }
 html.graphite63.studio59 #motion-room50 .motion-stage50>.motion-mat57>.motion-window57{width:100%}
 html.graphite63.studio59 #motion-room50 .transport63{margin-top:22px}
}
