.animation-frame-card > div {
  overflow: hidden;
}

.animation-builder {
  margin-inline: auto;
}

.animation-library > header,
.animation-library-list,
.animation-player {
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
}

.animation-timeline {
  align-items: flex-start;
}

.animation-frame-card {
  align-content: start;
}

.animation-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 14px 0;
  padding: 11px 13px;
  border: 1px solid #c28e6c66;
  border-radius: 9px;
  background: linear-gradient(135deg, #443328, #271d17);
}

.animation-progress[hidden] {
  display: none;
}

.animation-progress > div {
  display: grid;
  gap: 2px;
}

.animation-progress b {
  color: #fef6f0;
  font-size: 11px;
}

.animation-progress small {
  color: #c8b1a2;
  font-size: 9px;
}

.animation-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 3px solid #e2a57d44;
  border-top-color: #fac6a4;
  border-right-color: #6fe0bd;
  border-radius: 999px;
  animation: animation-spin .72s linear infinite;
}

.animation-spinner-small {
  width: 14px;
  height: 14px;
  border-width: 2px;
  vertical-align: -2px;
}

.animation-create .animation-spinner-small,
.animation-clip-card button .animation-spinner-small {
  margin-right: 6px;
}

.animation-clip-card.is-generating {
  border-color: #e29e7188;
  box-shadow: 0 0 0 1px #e29e7122, 0 16px 42px #120d0966;
}

.animation-frame-card.running .animation-frame-visual {
  border-color: #f4b58b;
  box-shadow: inset 0 0 28px #e59c6b22, 0 0 18px #e59c6b22;
}

@keyframes animation-spin {
  to { transform: rotate(360deg); }
}

.animation-frame-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.animation-frame-card.locked .animation-frame-visual {
  border-color: #5ed9b4;
  box-shadow: inset 0 0 22px #42d6aa18;
}

.animation-frame-lock {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 5px;
  background: #173b33dd;
  color: #6ee4c0;
  font-size: 8px;
}

.animation-player {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.animation-player-stage {
  display: grid;
  width: 100%;
  min-height: 390px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #4b382c;
  border-radius: 9px;
  background: radial-gradient(circle at 50% 45%, #33251c, #120d0a 70%);
}

.animation-player-stage canvas {
  display: block;
  flex: none;
  box-sizing: content-box;
  max-width: calc(100% - 32px);
  max-height: 360px;
  object-fit: contain;
}

@media (max-width: 620px) {
  .animation-player-stage {
    min-height: 290px;
  }

  .animation-player-stage canvas {
    max-height: 260px;
  }
}
